Ejemplo n.º 1
0
    $num = $empire->gettotal($totalquery);
} else {
    //需审核
    if ($class_r[$classid][checkpl]) {
        $totalquery = "select count(*) as total from {$dbtbpre}enewspl_" . $n_r['restb'] . " where pubid='{$pubid}' and checked=0";
        $num = $empire->gettotal($totalquery);
    } else {
        $num = $n_r['plnum'];
    }
}
//排序
$addorder = 'plid desc';
$myorder = (int) $_GET['myorder'];
if ($myorder == 1) {
    $addorder = 'plid';
    $search .= '&myorder=' . $myorder;
}
$query .= " order by " . $addorder . " limit {$offset},{$line}";
$sql = $empire->query($query);
//伪静态
$pagefunr = eReturnRewritePlUrl($classid, $id, $rewritedoaction, $myorder, $rewritetempid, 0);
$pagefunr['repagenum'] = 0;
//分页
if ($pagefunr['rewrite'] == 1) {
    $listpage = InfoUsePage($num, $line, $page_line, $start, $page, $search, $pagefunr);
} else {
    $listpage = page1($num, $line, $page_line, $start, $page, $search);
}
@(require ECMS_PATH . DASHBOARD . '/data/filecache/template/pl' . $tempid . '.php');
db_close();
$empire = null;
Ejemplo n.º 2
0
require "../../class/q_functions.php";
require "../class/user.php";
require "../../data/dbcache/class.php";
require "../" . LoadLang("pub/fun.php");
$link = db_connect();
$empire = new mysqlquery();
$editor = 1;
eCheckCloseMods('member');
//关闭模块
//是否登陆
$user = islogin();
$page = (int) $_GET['page'];
$page = RepPIntvar($page);
$start = 0;
$line = 25;
//每页显示条数
$page_line = 10;
//每页显示链接数
$offset = $page * $line;
//总偏移量
$totalquery = "select count(*) as total from {$dbtbpre}enewsdownrecord where userid='{$user['userid']}'";
$num = $empire->gettotal($totalquery);
//取得总条数
$query = "select * from {$dbtbpre}enewsdownrecord where userid='{$user['userid']}'";
$query = $query . " order by truetime desc limit {$offset},{$line}";
$sql = $empire->query($query);
$returnpage = page1($num, $line, $page_line, $start, $page, $search);
//导入模板
require ECMS_PATH . DASHBOARD . '/template/member/downbak.php';
db_close();
$empire = null;
Ejemplo n.º 3
0
  </tr>
  <tr>
   <th class="errormessage">{$mes}</th>

  </tr>
 </table>
 </center>
</body>
</html>
HTML;
    if (isset($link)) {
        mysql_close();
    }
    die;
}
// Inicio
switch ($_GET['step']) {
    case 2:
        page2();
        break;
    case 3:
        page3();
        break;
    case 4:
        page4();
        break;
    default:
        page1();
        // pagina de bienvenida
}
// Created by Perberos. All rights reversed (C) 2006
Ejemplo n.º 4
0
function DtGetHtml($add, $newstemp_r, $mid, $tbname, $line, $page_line, $start, $page, $search)
{
    global $public_r, $class_r, $class_zr, $class_tr, $fun_r, $empire, $dbtbpre, $emod_r, $level_r;
    //更新点击
    $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='{$add['id']}' limit 1");
    $add['onclick'] = $add['onclick'] + 1;
    //模板参数
    $newstemptext = $newstemp_r[temptext];
    $formatdate = $newstemp_r[showdate];
    //页面
    $pagetitle = htmlspecialchars($add[title]);
    $url = ReturnClassLink($add[classid]);
    //导航
    $newstemptext = Info_ReplaceSvars($newstemptext, $url, $add[classid], $pagetitle, $add[keyboard], $pagetitle);
    //相关信息
    if (strstr($newstemptext, '[!--other.link--]')) {
        $keyboardtext = GetKeyboard($add[keyboard], $add[keyid], $add[classid], $add[id], $class_r[$add[classid]][link_num]);
    }
    //分页字段
    $ptitle = $add['title'];
    $truepage = '';
    $titleselect = '';
    $expage = '[!--empirenews.page--]';
    //分页符
    $pf = $emod_r[$mid]['pagef'];
    if ($pf && strstr($add[$pf], $expage)) {
        $n_r = explode($expage, $add[$pf]);
        $thispagenum = count($n_r);
        if ($page < 0 || $page > $thispagenum - 1) {
            $page = 0;
        }
        $add[$pf] = $n_r[$page];
        if ($page) {
            $ti_r = explode('[/!--empirenews.page--]', $n_r[$page]);
            if (count($ti_r) >= 2) {
                $ptitle = $ti_r[0];
                $add[$pf] = $ti_r[1];
            } else {
                $ptitle = $add['title'] . '(' . ($page + 1) . ')';
            }
        }
        //取得分页
        $truepage = page1($thispagenum, $line, $page_line, $start, $page, $search);
        //下拉式分页
        if (strstr($newstemptext, '[!--title.select--]')) {
            for ($j = 0; $j < $thispagenum; $j++) {
                $spurl = "ShowInfo.php?classid={$add['classid']}&id={$add['id']}&page={$j}";
                if ($j == 0) {
                    $sptitle = $add[title];
                } else {
                    $ti_r = explode('[/!--empirenews.page--]', $n_r[$j]);
                    $sptitle = count($ti_r) >= 2 ? $ti_r[0] : $add[title] . '(' . ($j + 1) . ')';
                }
                $select = '';
                if ($page == $j) {
                    $ptitle = $sptitle;
                    $select = ' selected';
                }
                $titleselect .= '<option value="' . $spurl . '"' . $select . '>' . $sptitle . '</option>';
            }
            $titleselect = '<select name="titleselect" onchange="self.location.href=this.options[this.selectedIndex].value">' . $titleselect . '</select>';
        }
        //下一页链接
        if ($page == $thispagenum - 1) {
            $thisnextlink = "ShowInfo.php?classid={$add['classid']}&id={$add['id']}&page=0";
        } else {
            $thisnextlink = "ShowInfo.php?classid={$add['classid']}&id={$add['id']}&page=" . ($page + 1);
        }
    }
    //返回替换验证字符
    $docheckrep = ReturnCheckDoRepStr();
    if ($add[newstext]) {
        if (empty($public_r['dorepword']) && $docheckrep[3]) {
            $add[newstext] = ReplaceWord($add[newstext]);
            //过滤字符
        }
        if (empty($public_r['dorepkey']) && $docheckrep[4] && !empty($add[dokey])) {
            $add[newstext] = ReplaceKey($add[newstext]);
        }
        if ($public_r['opencopytext']) {
            $add[newstext] = AddNotCopyRndStr($add[newstext]);
            //随机复制字符
        }
    }
    //变量
    $tempf = $emod_r[$mid]['tempf'];
    $fr = explode(',', $tempf);
    $fcount = count($fr) - 1;
    //变量替换
    $newstempstr = $newstemptext;
    //模板
    for ($i = 1; $i < $fcount; $i++) {
        $f = $fr[$i];
        $value = $add[$f];
        if ($f == 'downpath') {
            if (strstr($newstemptext, '[!--downpath--]')) {
                $value = ReturnDownSoftHtml($add);
            }
        } elseif ($f == 'onlinepath') {
            if (strstr($newstemptext, '[!--onlinepath--]')) {
                $value = ReturnOnlinepathHtml($add);
            }
        } elseif ($f == 'morepic') {
            if (strstr($newstemptext, '[!--morepic--]')) {
                $value = ReturnMorepicpathHtml($add);
            }
        } elseif ($f == 'newstime') {
            if (strstr($newstemptext, '[!--newstime--]')) {
                $value = date($formatdate, $value);
            }
        } elseif ($f == 'befrom') {
            if ($docheckrep[1] && strstr($newstemptext, '[!--befrom--]')) {
                $value = ReplaceBefrom($value);
            }
        } elseif ($f == 'writer') {
            if ($docheckrep[2] && strstr($newstemptext, '[!--writer--]')) {
                $value = ReplaceWriter($value);
            }
        } elseif ($f == 'titlepic') {
            if (empty($value)) {
                $value = $public_r[newsurl] . 'e/data/images/notimg.gif';
            }
        } elseif ($f == 'title') {
        } else {
            if (!strstr($emod_r[$mid]['editorf'], ',' . $f . ',')) {
                if (strstr($emod_r[$mid]['tobrf'], ',' . $f . ',')) {
                    $value = nl2br($value);
                }
                if (!strstr($emod_r[$mid]['dohtmlf'], ',' . $f . ',')) {
                    $value = RepFieldtextNbsp(htmlspecialchars($value));
                }
            }
        }
        $newstempstr = str_replace('[!--' . $f . '--]', $value, $newstempstr);
    }
    //固定变量
    $newstempstr = str_replace('[!--id--]', $add[id], $newstempstr);
    $newstempstr = str_replace('[!--classid--]', $add[classid], $newstempstr);
    $newstempstr = str_replace('[!--class.name--]', $class_r[$add[classid]][classname], $newstempstr);
    $newstempstr = str_replace('[!--ttid--]', $add[ttid], $newstempstr);
    $newstempstr = str_replace('[!--tt.name--]', $class_tr[$add[ttid]][tname], $newstempstr);
    $newstempstr = str_replace('[!--onclick--]', $add[onclick], $newstempstr);
    $newstempstr = str_replace('[!--userfen--]', $add[userfen], $newstempstr);
    $newstempstr = str_replace('[!--username--]', $add[username], $newstempstr);
    //带链接的用户名
    if ($add[ismember] == 1 && $add[userid]) {
        $newstempstr = str_replace('[!--linkusername--]', "<a href='" . $public_r[newsurl] . "e/space/?userid=" . $add[userid] . "' target=_blank>" . $add[username] . "</a>", $newstempstr);
    } else {
        $newstempstr = str_replace('[!--linkusername--]', $add[username], $newstempstr);
    }
    $newstempstr = str_replace('[!--userid--]', $add[userid], $newstempstr);
    $newstempstr = str_replace('[!--other.link--]', $keyboardtext, $newstempstr);
    $newstempstr = str_replace('[!--news.url--]', $public_r[newsurl], $newstempstr);
    $newstempstr = str_replace('[!--plnum--]', $add[plnum], $newstempstr);
    $newstempstr = str_replace('[!--totaldown--]', $add[totaldown], $newstempstr);
    $newstempstr = str_replace('[!--keyboard--]', $add[keyboard], $newstempstr);
    //链接
    $titleurl = sys_ReturnBqTitleLink($add);
    $newstempstr = str_replace('[!--titleurl--]', $titleurl, $newstempstr);
    $newstempstr = str_replace('[!--page.stats--]', '', $newstempstr);
    $classurl = sys_ReturnBqClassname($add, 9);
    $newstempstr = str_replace('[!--class.url--]', $classurl, $newstempstr);
    //下一篇
    if (strstr($newstemptext, '[!--info.next--]')) {
        $next_r = $empire->fetch1("select titleurl,groupid,classid,newspath,filename,id,title from {$dbtbpre}ecms_" . $class_r[$add[classid]][tbname] . " where id>{$add['id']} and classid='{$add['classid']}' and checked=1 order by id limit 1");
        if (empty($next_r[id])) {
            $infonext = "<a href='" . $classurl . "'>" . $fun_r['HaveNoNextLink'] . "</a>";
        } else {
            //链接
            $nexttitleurl = sys_ReturnBqTitleLink($next_r);
            $infonext = "<a href='" . $nexttitleurl . "'>" . $next_r[title] . "</a>";
        }
        $newstempstr = str_replace('[!--info.next--]', $infonext, $newstempstr);
    }
    //上一篇
    if (strstr($newstemptext, '[!--info.pre--]')) {
        $next_r = $empire->fetch1("select titleurl,groupid,classid,newspath,filename,id,title from {$dbtbpre}ecms_" . $class_r[$add[classid]][tbname] . " where id<{$add['id']} and classid='{$add['classid']}' and checked=1 order by id desc limit 1");
        if (empty($next_r[id])) {
            $infonext = "<a href='" . $classurl . "'>" . $fun_r['HaveNoNextLink'] . "</a>";
        } else {
            //链接
            $nexttitleurl = sys_ReturnBqTitleLink($next_r);
            $infonext = "<a href='" . $nexttitleurl . "'>" . $next_r[title] . "</a>";
        }
        $newstempstr = str_replace('[!--info.pre--]', $infonext, $newstempstr);
    }
    //投票
    if (strstr($newstemptext, '[!--info.vote--]')) {
        $myvotetext = sys_GetInfoVote($add[classid], $add[id]);
        $newstempstr = str_replace('[!--info.vote--]', $myvotetext, $newstempstr);
    }
    //评分
    if (strstr($newstemptext, '[!--pinfopfen--]')) {
        $pinfopfen = $add[infopfennum] ? round($add[infopfen] / $add[infopfennum]) : 0;
        $newstempstr = str_replace('[!--pinfopfen--]', $pinfopfen, $newstempstr);
        $newstempstr = str_replace('[!--infopfennum--]', $add[infopfennum], $newstempstr);
    }
    $string = $newstempstr;
    //替换变量
    $string = str_replace('[!--p.title--]', $ptitle, $string);
    $string = str_replace('[!--next.page--]', $thisnextlink, $string);
    $string = str_replace('[!--page.url--]', $truepage, $string);
    $string = str_replace('[!--title.select--]', $titleselect, $string);
    return $string;
}
Ejemplo n.º 5
0
             }
             $data1 .= '</td>';
         }
         $data1 .= '</table><td>';
     }
     $data3 .= $data2 . '</table></td></td><td style="width: 1600px; overflow: auto; display: block;"><table>' . $data1 . '</table></td></tr></table>';
     $data['aaData'] = $data3;
     break;
 case "get_edit_page":
     $data['page'][] = page();
     break;
 case 'disable':
     mysql_query("UPDATE `person_work_graphic` SET `actived`='0' WHERE (`id`='{$_REQUEST['graphic_id']}')");
     break;
 case 'get_add_page':
     $data['page'][] = page1($_REQUEST[id]);
     break;
 case 'save_dialog':
     //---------------- save / edit ---------------
     $date = split(' - ', $_REQUEST[graphic_time]);
     if (empty($_REQUEST[id])) {
         $qvr = mysql_query("SELECT * FROM `person_work_graphic`\r\n                        WHERE person_id='{$_REQUEST['user']}' AND  (date(`start`)='{$_REQUEST['date']}' OR date(`end`)='{$_REQUEST['date']}') AND actived=1;");
         if (mysql_num_rows($qvr) > 0) {
             $error = "ამ დღეს ამ მომხმარებელზე უკვე არსებობს გრაფიკი";
         } else {
             mysql_query("\r\n\tINSERT INTO `person_work_graphic` (`user_id`, `start`, `end`,`person_id`)\r\n\tVALUES ('{$user_id}', '{$_REQUEST['date']} {$date['0']}' , IF('{$date['0']}'<'{$date['1']}', '{$_REQUEST['date']} {$date['1']}',ADDTIME('{$_REQUEST['date']} {$date['1']}','24:00:00')),'{$_REQUEST['user']}')\r\n");
         }
     } else {
         mysql_query("UPDATE `person_work_graphic` \r\n            SET \r\n            `user_id`='{$user_id}',\r\n            `start` ='{$_REQUEST['date']} {$date['0']}', \r\n            `end`   =IF('{$date['0']}'<'{$date['1']}', '{$_REQUEST['date']} {$date['1']}',ADDTIME('{$_REQUEST['date']} {$date['1']}','24:00:00'))\r\n    WHERE (`id`='{$_REQUEST['id']}')");
     }
     //------------------------------------
Ejemplo n.º 6
0
     }
     break;
 case "get_edit_page":
     $data['page'][] = page();
     break;
 case 'getworc':
     $code[] = dateRange($_REQUEST[start], $_REQUEST[end]);
     print_r($code);
     break;
     /////////////////////////////////////////////////////////////////////9999999999999999999999999999999999
 /////////////////////////////////////////////////////////////////////9999999999999999999999999999999999
 case 'disable':
     mysql_query("UPDATE `work_graphic` SET `actived`='0' WHERE (`id`='{$_REQUEST['id']}')");
     break;
 case 'get_add_page':
     $data['page'][] = page1();
     break;
 case 'get_list1':
     $count = $_REQUEST['count'];
     $hidden = $_REQUEST['hidden'];
     $res1 = mysql_fetch_array(mysql_query("SELECT work_graphic_id\r\n\t\t\t\tFROM person_work_graphic\r\n\t\t\t\tWHERE `date`=\r\n\t\t\t\t ('" . date('Y-m-d', strtotime($_REQUEST[date])) . "') + INTERVAL {$_REQUEST['id']}-1 DAY\r\n\t\t\t\t AND user_id={$user_id}"));
     //return 0;
     $rResult = mysql_query(" SELECT \twork_graphic.id,\r\n\t\t\t\t\t\t\t\t\twork_graphic.`start`,\r\n\t\t\t\t\t\t\t\t\twork_graphic.`breack_start`,\r\n\t\t\t\t\t\t\t\t\twork_graphic.`breack_end`,\r\n\t\t\t\t\t\t\t\t\twork_graphic.`end`\r\n\t\t\t\t\t\t\t\t\tFROM `work_graphic`\r\n\t\t\t\t\t\t\t\t\tleft JOIN person_work_graphic ON person_work_graphic.work_graphic_id = work_graphic.id\r\n\t\t\t\t\t\t\t\t\tWHERE work_graphic.week_day_id = {$_REQUEST['id']} AND work_graphic.actived=1");
     $data = array("aaData" => array());
     while ($aRow = mysql_fetch_array($rResult)) {
         $row = array();
         for ($i = 0; $i < $count; $i++) {
             /* General output */
             if ($i == $count - 1) {
                 //	echo "$res1[0]__$aRow[id]";
                 if ($res1[0] == $aRow[$hidden]) {