За последние 24 часа нас посетили 18523 программиста и 1606 роботов. Сейчас ищут 917 программистов ...

Как переделать код

Тема в разделе "Прочие вопросы по PHP", создана пользователем XelferX, 14 май 2009.

  1. XelferX

    XelferX Активный пользователь

    С нами с:
    14 май 2009
    Сообщения:
    2
    Симпатии:
    0
    Как сделать чтоюы строка отображалась определоным цветом где находится заголовак модуля ($files_logo = ""._FILES."";) Или чтобы этот код обращался к *.css к <div class="title"> и приобретал параметры которые заданы в *.css

    function files() {
    global $prefix, $db, $admin_file, $pagetitle, $conf, $confu, $conff, $home, $currentlang;
    $lang = ($conf['multilingual']) ? "AND (c.language='$currentlang' OR c.language='')" : "";
    $filenum = intval($conff['num']);
    $fbest = (isset($_GET['best'])) ? 1 : 0;
    $fhits = (isset($_GET['hits'])) ? 1 : 0;
    $fcat = (isset($_GET['cat'])) ? $_GET['cat'] : 0;
    if ($fbest && $conff['rate']) {
    $caton = 0;
    $field = "best=1&";
    $order = "WHERE date <= now() AND status!='0' ".$lang." ORDER BY totalvotes DESC";
    $ordernum = "date <= now() AND status!='0'";
    $files_logo = ""._BEST."";
    $pagetitle = "".$conf['defis']." "._FILES." ".$conf['defis']." $files_logo";
    } elseif ($fhits && $conff['rate']) {
    $caton = 0;
    $field = "hits=1&";
    $order = "WHERE date <= now() AND status!='0' ".$lang." ORDER BY hits DESC";
    $ordernum = "date <= now() AND status!='0'";
    $files_logo = ""._POP."";
    $pagetitle = "".$conf['defis']." "._FILES." ".$conf['defis']." $files_logo";
    } elseif ($fcat) {
    $caton = 1;
    $field = "cat=$fcat&";
    list($cat_title, $cat_description) = $db->sql_fetchrow($db->sql_query("SELECT title, description FROM ".$prefix."_categories WHERE id='$fcat'"));
    $order = "WHERE cid='$fcat' AND date <= now() AND status!='0' ".$lang." ORDER BY date DESC";
    $ordernum = "cid='$fcat' AND date <= now() AND status!='0'";
    $pagetitle = "".$conf['defis']." "._FILES." ".$conf['defis']." $cat_title";
    } else {
    $caton = 1;
    $field = "";
    $order = "WHERE date <= now() AND status!='0' ".$lang." ORDER BY date DESC";
    $ordernum = "date <= now() AND status!='0'";
    ---------->>>> $files_logo = ""._FILES."";
    $pagetitle = "".$conf['defis']." $files_logo";
    -----------------------------------------------------------------------------------------------
    Или можна как нибуть внедрить (title(""._FILES."");), бо когда вставляю этот код в файл то модул в CMS неработает
     
  2. Cron

    Cron Активный пользователь

    С нами с:
    10 июл 2008
    Сообщения:
    289
    Симпатии:
    0
    Адрес:
    Украина, Сумы
    можно сначала код нормально оформить...