Exemplo n.º 1
0
    if ($innernews['link'] && isset($away)) {
        Header("Location: " . $innernews['link']);
        exit;
    }
    list($y, $m, $d) = @split("-", $innernews['date']);
    $innernews['date'] = (int) $d . ".{$m}." . substr($y, -2, 2);
    $innernews['time'] = substr($innernews['time'], 0, 5);
    $where = "g.news_id={$news_id} AND g.type={$commenttype}";
    $sql = mysql_query("SELECT COUNT(*) FROM " . TABLE_OPINION . " g WHERE {$where}") or Error(1, __FILE__, __LINE__);
    $arr1 = mysql_fetch_array($sql);
    $innernews['all'] = $all = $arr1[0];
    list($limit, $pages) = pages($all, $url . "&");
    $opinion_list = array();
    $sql = mysql_query("\n\t\tSELECT \n\t\t\tg.* , u.name as uname\n\t\tFROM \n\t\t\t" . TABLE_OPINION . " g \n\t\t\tLEFT JOIN " . TABLE_USER . " u ON (u.user_id=g.user_id)\n\t\tWHERE\n\t\t\t{$where}\n\t\tORDER BY \n\t\t\tg.datetime, g.opinion_id \n\t\tLIMIT {$limit}") or Error(1, __FILE__, __LINE__);
    while ($arr1 = @mysql_fetch_array($sql)) {
        $arr1['uname'] = HtmlSpecialChars($arr1['uname'], ENT_COMPAT, 'cp1251');
        $arr1['text'] = comment_text($arr1['text']);
        list($date, $time) = explode(" ", $arr1['datetime']);
        $arr1['datetime'] = sql_to_text_date($date) . " " . substr($time, 0, 5);
        $arr1['del_link'] = $url . "&delopinion={$arr1['opinion_id']}";
        $opinion_list[] = $arr1;
    }
    if (@$_SESSION['message']) {
        $_SESSION['message'] = "\n\t<script language=\"JavaScript\">\n\talert('{$_SESSION['message']}');\n\t</script>";
    }
    require 'templ/shownews.htm';
    $_SESSION['message'] = '';
} else {
    $innernews = get_innernews(1);
    require 'templ/shownews_list.htm';
}
Exemplo n.º 2
0
Arquivo: index.php Projeto: nikuha/rs
//Unserialize($_SESSION['arrival_remind']) : '';
$siteorder_id = (int) @$siteorder_id;
list($curorder_block, $new_order) = get_curord_list($siteorder_id);
$attention_list = attention_list();
$event_list = event_list();
if ($attention_win) {
    if (($p == 'order' || $p == 'pay') && isset($order_id) && isset($attention_win[$order_id]) || $p == 'event' || $p == 'search' && isset($attention)) {
        unset($attention_win);
        $attention_win = '';
    }
    if (count($attention_win) <= $settings['attention_count']) {
        unset($attention_win);
        $attention_win = '';
    }
}
$innernews = get_innernews();
$title = '';
foreach ($nav as $v) {
    $s = $title ? " - " : "";
    $title .= $s . $v['name'];
}
if (@$_SESSION['message']) {
    $_SESSION['message'] = "\n<script language=\"JavaScript\">\nalert('{$_SESSION['message']}');\n</script>";
} else {
    $_SESSION['message'] = '';
}
if (@$_SESSION['confirm']) {
    $_SESSION['confirm'] = "\n\t<script language=\"JavaScript\">\n\tif(confirm('{$_SESSION['confirm']}')) window.location='{$_SESSION['confirm_url']}';";
    if ($_SESSION['confirm_nourl']) {
        $_SESSION['confirm'] .= "\n\telse window.location='{$_SESSION['confirm_nourl']}';";
    }