当前位置: 首页>>代码示例>>PHP>>正文


PHP PrintWAP函数代码示例

本文整理汇总了PHP中PrintWAP函数的典型用法代码示例。如果您正苦于以下问题:PHP PrintWAP函数的具体用法?PHP PrintWAP怎么用?PHP PrintWAP使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了PrintWAP函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: MakeThumb

        MakeThumb($middleFile, $middleFile, 128, 128);
        require_once R_P . 'require/imgfunc.php';
        if (!($img_size = GetImgSize($middleFile, 'jpg'))) {
            P_unlink($middleFile);
            wap_msg('upload_content_error', $basename);
        }
        list($img_w, $img_h) = getimagesize($normalFile);
        $smallFile = PwUpload::savePath($db_ifftp, $filename, $smallDir);
        $s_ifthumb = 0;
        PwUpload::createFolder(dirname($smallFile));
        if (MakeThumb($middleFile, $smallFile, 48, 48)) {
            $s_ifthumb = 1;
        }
        if ($db_ifftp) {
            PwUpload::movetoftp($middleFile, $middleDir . $filename);
            $s_ifthumb && PwUpload::movetoftp($smallFile, $smallDir . $filename);
        }
        pwFtpClose($GLOBALS['ftp']);
        $user_a = explode('|', $winddb['icon']);
        $user_a[2] = $img_w;
        $user_a[3] = $img_h;
        $usericon = setIcon("{$udir}/{$winduid}.{$ext}", 3, $user_a);
        $db->update("UPDATE pw_members SET icon=" . pwEscape($usericon, false) . " WHERE uid=" . pwEscape($winduid));
        wap_msg("operate_success", "index.php?a=myhome&t=" . $timestamp);
    } else {
        wap_msg('undefined_action', $basename);
    }
}
wap_header();
require_once PrintWAP('upface');
wap_footer();
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:upface.php

示例2: exit

<?php

!defined('W_P') && exit('Forbidden');
InitGP(array('uid', 'username', 'action', 'fr', 'tid'));
!$winduid && wap_msg('not_login');
$returnUrl = "index.php";
wap_header();
require_once PrintWAP('mybbs');
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:9,代码来源:mybbs.php

示例3: wap_msg

    $uid = $userdb['uid'];
} else {
    $userdb =& $winddb;
    $uid = $userdb['uid'];
}
if (empty($userdb)) {
    $errorname = '';
    wap_msg('user_not_exists');
}
require_once R_P . 'require/showimg.php';
list($usericon) = showfacedesign($userdb['icon'], 1, 's');
list($lastDate) = getLastDate($userdb['postdate']);
require_once W_P . 'include/db/myspace.db.php';
$myspace = new MyspaceDB();
$myspace->setPerPage(5);
$myArticles = $myspace->getArticlesByUser($uid);
$myReplaies = $myspace->getReplaysByUser($uid);
if ($winduid == $uid) {
    $collectionService = L::loadClass('Collection', 'collection');
    $mydata = $collectionService->findByUidAndTypeInPage($winduid, 'postfavor', 1, 5, 'all');
    $myFavThreads = array();
    foreach ($mydata as $key => $value) {
        $temp = array();
        $temp['url'] = "index.php?a=read&tid=" . $value['typeid'];
        $temp['subject'] = $value['content']['postfavor']['subject'];
        $myFavThreads[] = $temp;
    }
}
wap_header();
require_once PrintWAP('myhome');
wap_footer();
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:myhome.php

示例4: exit

<?php

!defined('W_P') && exit('Forbidden');
if ($db_online) {
    $userinbbs = $guestinbbs = 0;
    $query = $db->query("SELECT uid!=0 as ifuser,COUNT(*) AS count FROM pw_online GROUP BY uid='0'");
    while ($rt = $db->fetch_array($query)) {
        if ($rt['ifuser']) {
            $userinbbs = $rt['count'];
        } else {
            $guestinbbs = $rt['count'];
        }
    }
} else {
    @(include_once D_P . 'data/bbscache/olcache.php');
}
$usertotal = $guestinbbs + $userinbbs;
$rt = $db->get_one("SELECT * FROM pw_bbsinfo WHERE id=1");
$rs = $db->get_one("SELECT SUM(fd.topic) as topic,SUM(fd.subtopic) as subtopic,SUM(fd.article) as article,SUM(fd.tpost) as tposts FROM pw_forums f LEFT JOIN pw_forumdata fd USING(fid) WHERE f.ifsub='0' AND f.cms!='1'");
$topic = $rs['topic'] + $rs['subtopic'];
$article = $rs['article'];
$tposts = $rs['tposts'];
$userService = L::loadClass('UserService', 'user');
$uinfo = $userService->getByUserName($rt['newmember']);
Cookie("wap_scr", serialize(array("page" => "bbsinfo")));
wap_header();
require_once PrintWAP('bbsinfo');
wap_footer();
开发者ID:jechiy,项目名称:PHPWind,代码行数:28,代码来源:bbsinfo.php

示例5: getCustom

$db_union[7] && (list($customdata, $custominfo) = getCustom($userdb['customdata']));
$userdb['rvrc'] = floor($userdb['rvrc'] / 10);
if ($db_ifonlinetime && $userdb['onlinetime']) {
    $userdb['onlinetime'] = floor($userdb['onlinetime'] / 3600);
} else {
    $userdb['onlinetime'] = 0;
}
if (!$userdb['todaypost'] || $userdb['lastpost'] < $tdtime) {
    $userdb['todaypost'] = 0;
}
$averagepost = floor($userdb['postnum'] / ceil(($timestamp - $userdb['regdate']) / (3600 * 24)));
$userdb['regdate'] = get_date($userdb['regdate'], 'Y-m-d');
$userdb['lastvisit'] = get_date($userdb['lastvisit'], 'Y-m-d');
$userdb['onlineip'] = explode('|', $userdb['onlineip']);
$userdb[gender] = getGender($userdb[gender]);
require_once PrintWAP('showu');
function getGender($gender)
{
    if ($gender == 1) {
        return '男';
    } elseif ($gender == 2) {
        return '女';
    } else {
        return '保密';
    }
}
function getCustom($data, $unserialize = true, $strips = null)
{
    global $db_union;
    $customdata = array();
    if (!$data || ($unserialize ? !is_array($data = unserialize($data)) : !is_array($data))) {
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:showu.php

示例6: wap_footer

function wap_footer()
{
    global $wind_version, $db_obstart, $windid, $db_charset, $db_wapcharset, $chs, $timestamp, $db_online, $db, $db_wapregist, $rg_allowregister, $online_info, $db_bbsurl;
    Update_ol();
    $userinbbs = $guestinbbs = 0;
    if (empty($db_online)) {
        extract(pwCache::getData(D_P . 'data/bbscache/olcache.php', false));
    } else {
        if (count($online_info = explode("\t", GetCookie('online_info'))) == 3 && $timestamp - $online_info[0] < 60) {
            list(, $userinbbs, $guestinbbs) = $online_info;
        } else {
            $onlineService = L::loadClass('OnlineService', 'user');
            $userinbbs = $onlineService->countOnlineUser();
            $guestinbbs = $onlineService->countOnlineGuest();
            Cookie('online_info', $timestamp . "\t" . $userinbbs . "\t" . $guestinbbs);
        }
    }
    $usertotal = $guestinbbs + $userinbbs;
    $ft_time = get_date($timestamp);
    require_once PrintWAP('footer');
    $output = ob_get_contents();
    ob_end_clean();
    $db_obstart && function_exists('ob_gzhandler') ? ob_start('ob_gzhandler') : ob_start();
    if ($db_charset != 'utf8') {
        L::loadClass('Chinese', 'utility/lang', false);
        $chs = new Chinese();
        $output = $chs->Convert($output, $db_charset, $db_wapcharset ? 'UTF8' : 'UNICODE');
    }
    $output = str_replace(array('<!--<!---->', '<!---->-->', '<!---->', "\r\n\r\n"), '', $output);
    $wap_view = S::getGP('wap_view');
    if ($wap_view) {
        $output = preg_replace('/<a[^>]*>([^<]+|.*?)?<\\/a>/i', "\\1", $output);
    }
    echo $output;
    ob_flush();
    exit;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:37,代码来源:wap_mod.php

示例7: viewAids

    if ($rt['ifupload'] != 0) {
        $imgs = viewAids($tid, 0);
        $downloads = viewDownloads($tid, 0);
    }
    $yxqw = "";
    if ($maxp > 1) {
        $content = wap_substr($content, $db_waplimit * ($page - 1), $db_waplimit, $db_charset);
        $content = wap_img2($content);
        if (empty($content)) {
            wap_msg("已到最后一页", "index.php?a=read&tid={$tid}");
        }
        if ($page == 1) {
            $yxqw = "<a href='index.php?a=read&tid=" . $tid . "&amp;all=1&amp;page={$nextp}'>下一页</a>";
        } elseif ($page == $maxp) {
            $yxqw = "<a href='index.php?a=read&tid=" . $tid . "&amp;all=1&amp;page={$prep}'>上一页</a>&nbsp;";
        } else {
            $yxqw = "<a href='index.php?a=read&tid=" . $tid . "&amp;all=1&amp;page={$nextp}'>下一页</a>";
            $yxqw .= "<a href='index.php?a=read&tid=" . $tid . "&amp;all=1&amp;page={$prep}'>上一页</a>&nbsp;";
        }
        $yxqw .= "&nbsp;({$page}/{$maxp})<br/>";
    } else {
        $content = wap_img2($content);
    }
    $postdb = viewReply($tid, 1, $rt['replies'], 3, 90, $rt['ptable'], 2);
} else {
    wap_msg('illegal_tid');
}
Cookie("wap_scr", serialize(array("page" => "read", "extra" => array("tid" => $tid))));
wap_header();
require_once PrintWAP('read');
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:read.php

示例8: array

        $collectionService = L::loadClass('Collection', 'collection');
        $myFavThreads = $collectionService->findByUidAndTypeInPage($winduid, 'postfavor', $page, $wap_perpage, 'all');
        $mydata = array();
        foreach ($myFavThreads as $key => $value) {
            $temp = array();
            $temp['url'] = "index.php?a=read&tid=" . $value['typeid'];
            $temp['subject'] = $value['content']['postfavor']['subject'];
            $mydata[] = $temp;
        }
    }
    $url = "index.php?a=myfav&" . ($type ? "&amp;type={$type}" : "") . "&amp;" . ($uid ? "&amp;uid={$uid}" : "") . "&amp;";
    $pages = getPages($page, count($mydata), $url);
} else {
    $myArticles = $myspace->getArticlesByUser($uid);
    $myReplaies = $myspace->getReplaysByUser($uid);
    if ($winduid == $uid) {
        $collectionService = L::loadClass('Collection', 'collection');
        $results = $collectionService->findByUidAndTypeInPage($winduid, 'postfavor', 1, 5, 'all');
        //$myFavThreads = $myspace->getFavsByUser($uid);
        $myFavThreads = array();
        foreach ($results as $key => $value) {
            $temp = array();
            $temp['url'] = "index.php?a=read&tid=" . $value['typeid'];
            $temp['subject'] = $value['content']['postfavor']['subject'];
            $myFavThreads[] = $temp;
        }
    }
}
wap_header();
require_once PrintWAP('myfav');
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:myfav.php

示例9: exit

<?php

!defined('W_P') && exit('Forbidden');
include_once D_P . "data/bbscache/dbreg.php";
InitGP(array('lgt', 'pwuser', 'pwpwd', 'question', 'customquest', 'answer'), 'P');
if ($windid) {
    wap_msg('login_have');
} elseif ($pwuser && $pwpwd) {
    $safecv = $db_ifsafecv ? wap_quest($question, $customquest, $answer) : '';
    wap_login($pwuser, md5($pwpwd), $safecv, $lgt);
}
$returnUrl = getReturnUrl();
wap_header();
require_once PrintWAP('login');
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:15,代码来源:login.php

示例10: wap_msg

    }
    if (!$rt) {
        wap_msg('illegal_tid');
    }
    $fid = $rt['fid'];
    forumCheck($fid, 'read');
    $forumName = wap_cv(strip_tags($forum[$fid]['name']));
    $page == 'e' && ($page = 65535);
    (int) $page < 1 && ($page = 1);
    $content = $rt['content'];
    $replies = $rt['replies'];
    $per = 10;
    $total = ceil($replies / $per);
    $total == 0 ? $page = 1 : ($page > $total ? $page = $total : '');
    $nextp = $page + 1;
    if ($nextp > $total) {
        $nextp = 1;
    }
    $prep = $page - 1;
    if ($prep < 1) {
        $prep = $total;
    }
    $rt['subject'] = str_replace('&nbsp;', '', wap_cv($rt['subject']));
    $postdb = viewReply($tid, $page, $replies, $per, 90, $rt['ptable'], $order);
} else {
    wap_msg('illegal_tid');
}
Cookie("wap_scr", serialize(array("page" => "reply", "extra" => array("tid" => $tid))));
wap_header();
require_once PrintWAP('reply_all');
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:reply_all.php

示例11: GetVerify

    // 发送邮件
    @(include_once D_P . 'data/bbscache/mail_config.php');
    if ($rg_emailcheck) {
        $verifyhash = GetVerify();
        $rg_yz = md5($rg_yz . substr(md5($db_sitehash), 0, 5) . substr(md5($regname), 0, 5));
        require_once R_P . 'require/sendemail.php';
        $sendinfo = sendemail($regemail, 'email_check_subject', 'email_check_content', 'email_additional');
        if ($sendinfo === true) {
            ObHeader("{$db_registerfile}?step=finish&email={$regemail}&verify={$verifyhash}");
        } else {
            wap_msg(is_string($sendinfo) ? $sendinfo : 'reg_email_fail', $basename);
        }
    } elseif ($rg_regsendemail && $ml_mailifopen) {
        require_once R_P . 'require/sendemail.php';
        sendemail($regemail, 'email_welcome_subject', 'email_welcome_content', 'email_additional');
    }
    // 发送结束
    if ($db_pptifopen && $db_ppttype == 'server' && ($db_ppturls || $forward)) {
        $action = 'login';
        $jumpurl = $forward ? $forward : $db_ppturls;
        empty($forward) && ($forward = $db_bbsurl);
        require_once R_P . 'require/passport_server.php';
    }
    $verifyhash = GetVerify($winduid);
    wap_msg('reg_success', 'index.php');
    exit;
}
$returnUrl = getReturnUrl();
wap_header();
require_once PrintWAP('register');
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:register.php

示例12: exit

<?php

!defined('W_P') && exit('Forbidden');
$defaultType = '';
if ($db_waprecommend) {
    InitGP(array('type', 'page'), 'GP');
    require_once W_P . 'include/db/recommend.db.php';
    $recommend = new RecommendDB();
    $recommendTypes = $recommend->getRecommendActiveType();
    $recommendbs = $recommend->getRecommendByType($type, $page);
    $url = "index.php?a=recommend&" . ($type ? "&amp;type={$type}" : "") . '&amp;';
    $pages = getPages($page, count($recommendbs), $url);
} else {
    wap_msg('recommend_close');
}
Cookie("wap_scr", serialize(array("page" => "recommend")));
wap_header();
require_once PrintWAP('recommend');
wap_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:19,代码来源:recommend.php

示例13: nextReply

        $prer = nextReply($tid, $pid, $rt['ptable'], -1);
    } else {
        wap_msg('illegal_tid');
    }
} elseif ($action == 'modify') {
    InitGP(array('step'), 'GP', 2);
    $pw_tmsgs = GetTtable($tid);
    $rt = $db->get_one("SELECT t.fid,t.tid,t.subject,t.author,t.authorid,t.replies,t.locked,t.postdate,t.anonymous,t.ptable,tm.content FROM pw_threads t LEFT JOIN {$pw_tmsgs} tm ON tm.tid=t.tid WHERE t.tid=" . pwEscape($tid) . " AND ifcheck=1");
    //读取板块信息
    if (!($foruminfo = L::forum($rt[fid]))) {
        wap_msg('data_error');
    }
    $isBM = admincheck($foruminfo['forumadmin'], $foruminfo['fupadmin'], $windid);
    //获得管理权限
    $pw_posts = GetPtable($rt['ptable']);
    $reply = $db->get_one("SELECT * FROM {$pw_posts} WHERE pid = " . pwEscape($pid));
    $editright = $isGM || pwRights($isBM, 'deltpcs') || $reply['authorid'] == $winduid;
    !$editright && wap_msg('您没有权限编辑此回复', 'index.php?a=reply&tid=' . $tid . '&pid=' . $pid);
    if (empty($step)) {
        $reply['content'] = str_replace(array('<', '>', '&nbsp;'), array('&lt;', '&gt;', ' '), $reply['content']);
    } elseif ($step == 2) {
        InitGP(array('content'), 'GP');
        $pw_posts = GetPtable('N', $tid);
        $db->update("UPDATE {$pw_posts} SET content = " . pwEscape(wap_cv($content)) . " WHERE pid = " . pwEscape($pid));
        wap_msg('operate_success', 'index.php?a=reply&tid=' . $tid . '&pid=' . $pid);
    }
}
Cookie("wap_scr", serialize(array("page" => "reply", "extra" => array("tid" => $tid, "pid" => $pid))));
wap_header();
require_once PrintWAP('reply');
wap_footer();
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:reply.php

示例14: wap_msg

        }
        if (!array_key_exists($ext, $db_uploadfiletype)) {
            wap_msg('非法图片类型', $returnedit);
        }
        $filesize = $db_uploadfiletype[$ext];
        if ($_FILES['attachment_']['size'] < 1 || $_FILES['attachment_']['size'] > $filesize * 1024) {
            wap_msg('pro_loadimg_limit_wap', $returnedit);
        }
        $postdata->att = new WapUpload($winduid);
        checkupload($postdata->att);
    }
    $postmodify->execute($postdata);
    wap_msg('post_success', "index.php?a=read&tid={$tid}&amp;fid={$fid}&amp;page=e");
} else {
    wap_header();
    require_once PrintWAP('upload');
    wap_footer();
}
function checkupload(&$upatt)
{
    global $db_allowupload, $returnedit;
    if (!$db_allowupload) {
        wap_msg('upload_close', $returnedit);
    } elseif (!$upatt->forum->allowupload($upatt->post->user, $upatt->post->groupid)) {
        wap_msg('upload_forum_right', $returnedit);
    } elseif (!$upatt->forum->foruminfo['allowupload'] && $upatt->post->_G['allowupload'] == 0) {
        wap_msg('upload_group_right', $returnedit);
    }
    if ($upatt->post->user['uploadtime'] < $GLOBALS['tdtime']) {
        $upatt->post->user['uploadnum'] = 0;
    }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:upload.php

示例15: exit

<?php

!defined('W_P') && exit('Forbidden');
wap_header();
$rg_config = L::reg();
require_once PrintWAP('items');
wap_footer();
开发者ID:jechiy,项目名称:PHPWind,代码行数:7,代码来源:items.php


注:本文中的PrintWAP函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。