Beispiel #1
0
             				**/
             pwQuery::insert('pw_announce', array('fid' => $fid, 'ifopen' => $ifopen, 'vieworder' => $vieworder, 'author' => $windid, 'startdate' => $startdate, 'enddate' => $enddate, 'url' => $url, 'subject' => $atc_title, 'content' => $atc_content));
             if ($ifopen && (!$enddate || $enddate >= $timestamp)) {
                 require_once R_P . 'require/updatenotice.php';
                 updatecache_i_i($fid);
             }
         } else {
             $rt = $db->get_one('SELECT aid,fid,content FROM pw_announce WHERE aid=' . S::sqlEscape($aid));
             !$atc_title && Showmsg('annouce_title');
             !$atc_content && Showmsg('annouce_content');
             (!$rt['aid'] || $rt['fid'] != $fid) && Showmsg('data_error');
             $pwSQL = array('ifopen' => $ifopen, 'vieworder' => $vieworder, 'startdate' => $startdate, 'enddate' => $enddate, 'url' => $url, 'subject' => $atc_title, 'content' => $atc_content);
             //* $db->update("UPDATE pw_announce SET $pwSQL WHERE aid=".S::sqlEscape($aid));
             pwQuery::update('pw_announce', 'aid=:aid', array($aid), $pwSQL);
             require_once R_P . 'require/updatenotice.php';
             updatecache_i_i($fid);
         }
         refreshto("forumcp.php?action=edit&type=notice&fid={$fid}", 'operate_success');
     }
 } elseif ($type == 'report') {
     S::gp(array('page'), 'GP', 2);
     $page < 1 && ($page = 1);
     $limit = S::sqlLimit(($page - 1) * $db_perpage, $db_perpage);
     if ($forums['childid'] == 1) {
         foreach ($forum as $key => $value) {
             if ($value['fup'] == $fid) {
                 $fiddb[] = $key;
             }
             if (in_array($value['fup'], $fiddb)) {
                 $fiddb[] = $key;
             }
Beispiel #2
0
if ($winddb['shortcut']) {
    $myshortcut = 'true';
} else {
    $myshortcut = 'false';
}
if (defined('M_P') && file_exists(M_P . 'thread.php')) {
    require_once M_P . 'thread.php';
}
CloudWind::yunSetCookie(SCR, '', $fid);
require_once PrintEot($threadBehavior->template);
$noticecache = 900;
$foruminfo['enddate'] && $foruminfo['enddate'] <= $timestamp && ($foruminfo['aidcache'] = $timestamp - $noticecache);
if ($foruminfo['aidcache'] && $timestamp - $foruminfo['aidcache'] > $noticecache - 1 && ($foruminfo['startdate'] > $timestamp || $foruminfo['enddate'] && ($foruminfo['enddate'] <= $timestamp || $foruminfo['aids']))) {
    $foruminfo['aid'] && ($foruminfo['aids'] .= ",{$foruminfo['aid']}");
    require_once R_P . 'require/updatenotice.php';
    updatecache_i_i($fid, $foruminfo['aids']);
}
footer();
function getstart($start, $asc, $count)
{
    global $db_perpage, $page, $numofpage;
    $limit = $db_perpage;
    if ($page > 20 && $page > ceil($numofpage / 2)) {
        $asc = $asc == 'DESC' ? 'ASC' : 'DESC';
        $start = $count - $page * $db_perpage;
        if ($start < 0) {
            $limit = $db_perpage + $start;
            $start = 0;
        }
        return array($start, $limit, $asc, 1);
    } else {