Exemplo n.º 1
0
function multi($num, $perpage, $curpage, $mpurl, $maxpages = 0, $page = 10, $autogoto = FALSE, $simple = FALSE, $jsfunc = FALSE)
{
    return $num > $perpage ? helper_page::multi($num, $perpage, $curpage, $mpurl, $maxpages, $page, $autogoto, $simple, $jsfunc) : '';
}
Exemplo n.º 2
0
                     $currpage = $_GET['page'] ? $_GET['page'] : 1;
                     $perpage = 15;
                     $start = ($currpage - 1) * $perpage;
                     $num = C::t('#aljwsq#aljwsq_keywordlog')->count();
                     $recordlist = C::t('#aljwsq#aljwsq_keywordlog')->range($start, $perpage, 'desc');
                     $paging = helper_page::multi($num, $perpage, $currpage, 'admin.php?action=plugins&operation=config&do=' . $_GET['do'] . '&identifier=aljwsq&pmod=advanced&wid=keywordlog&act=keywordlog', 0, 11, false, false);
                     include template('aljwsq:advanced/keywordlog');
                 } else {
                     if ($_GET['act'] == 'keywordlogcount') {
                         $currpage = $_GET['page'] ? $_GET['page'] : 1;
                         $perpage = 15;
                         $start = ($currpage - 1) * $perpage;
                         $num = DB::fetch_all('select count(*) num from %t group by keyword', array('aljwsq_keywordlog'));
                         $num = count($num);
                         $recordlist = DB::fetch_all('select keyword,count(*) num from %t group by keyword limit %d,%d', array('aljwsq_keywordlog', $start, $perpage));
                         $paging = helper_page::multi($num, $perpage, $currpage, 'admin.php?action=plugins&operation=config&do=' . $_GET['do'] . '&identifier=aljwsq&pmod=advanced&wid=keywordlogcount&act=keywordlogcount', 0, 11, false, false);
                         include template('aljwsq:advanced/keywordlogcount');
                     } else {
                         $_GET['gettype'] = 'form';
                         if (file_exists('source/plugin/aljwsq/com/' . $_GET['gettype'] . '.php')) {
                             include 'source/plugin/aljwsq/com/' . $_GET['gettype'] . '.php';
                         } else {
                             include template('aljwsq:adminadvancednav');
                             include template('aljwsq:com');
                         }
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 3
0
    } else {
        if ($_GET['act'] == 'delete') {
            if ($_GET['formhash'] == formhash()) {
                if ($_GET['aid']) {
                    C::t('#aljwsq#aljwsq_autoreply')->delete($_GET['aid']);
                }
                cpmsg(lang('plugin/aljwsq', 'autoreply20'), 'action=plugins&operation=config&do=' . $_GET['do'] . '&identifier=aljwsq&pmod=autoreply', 'succeed');
            }
        } else {
            $page = intval($_GET['page']);
            $currpage = $page ? $page : 1;
            $perpage = 11;
            $start = ($currpage - 1) * $perpage;
            $num = C::t('#aljwsq#aljwsq_autoreply')->count_by_status('', $_GET['msgtype']);
            $replys = C::t('#aljwsq#aljwsq_autoreply')->fetch_all_by_status('', $_GET['msgtype'], $start, $perpage);
            $paging = helper_page::multi($num, $perpage, $currpage, 'admin.php?action=plugins&operation=config&do=' . $_GET['do'] . '&identifier=aljwsq&pmod=autoreply', 0, 11, false, false);
            include template('aljwsq:autoreply');
        }
    }
}
function img2thumb($src_img, $dst_img, $width = 75, $height = 75, $cut = 0, $proportion = 0)
{
    if (!is_file($src_img)) {
        return false;
    }
    $ot = fileext($dst_img);
    $otfunc = 'image' . ($ot == 'jpg' ? 'jpeg' : $ot);
    $srcinfo = getimagesize($src_img);
    $src_w = $srcinfo[0];
    $src_h = $srcinfo[1];
    $type = strtolower(substr(image_type_to_extension($srcinfo[2]), 1));
Exemplo n.º 4
0
$gg = $config['gg'];
$tips = $config['tips'];
$banquan = $config['banquan'];
$timestamp = $_G['timestamp'];
$jljifen = $config['jljifen'];
$zhouqi = $config['zhouqi'];
$beishu = $config['beishu'];
$mytime = $timestamp;
$mytime = date('Y-m-d', $mytime);
$currpage = $_GET['page'] ? $_GET['page'] : 1;
$perpage = 25;
$curnum = ($currpage - 1) * $perpage;
$num = C::t('#ljdaka#plugin_daka_user')->count();
$query = C::t('#ljdaka#plugin_daka_user')->fetch_all_by_allday($curnum, $perpage);
$query_br = C::t('#ljdaka#plugin_daka_user')->fetch_all_by_allday();
$ranklist_br = array();
$i = 1;
foreach ($query_br as $k => $rank_br) {
    $ranklist_br[$rank_br[uid]]['rank_br'] = $i;
    $ranklist_br[$rank_br[uid]]['alldays'] = $rank_br['allday'];
    $ranklist_br[$rank_br[uid]]['jljifen1'] = $rank_br['money'];
    $creditname = $_G['setting']['extcredits'][$config['leixing']]['title'];
    $ranklist_br[$rank_br[uid]]['jljifen2'] = $rank_br['fen'];
    $ranklist_br[$rank_br[uid]]['money'] = $rank_br['money'];
    $ranklist_br[$rank_br[uid]]['day'] = $rank_br['day'];
    $i++;
}
$paging = helper_page::multi($num, $perpage, $currpage, 'plugin.php?id=ljdaka:ranklist', 0, 10, false, false);
//debug($ranklist);
$leixing = 'extcredits' . $config['leixing'];
include template('ljdaka:ranklist');