本文整理汇总了PHP中cplang函数的典型用法代码示例。如果您正苦于以下问题:PHP cplang函数的具体用法?PHP cplang怎么用?PHP cplang使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cplang函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: space_open
function space_open($uid, $username, $gid = 0, $email = '')
{
global $_SGLOBAL, $_SCONFIG;
if (empty($uid) || empty($username)) {
return array();
}
//验证空间是否被管理员删除
$query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spacelog') . " WHERE uid='{$uid}' AND flag='-1'");
if ($value = $_SGLOBAL['db']->fetch_array($query)) {
showmessage('the_space_has_been_closed');
}
$space = array('uid' => $uid, 'username' => $username, 'dateline' => $_SGLOBAL['timestamp'], 'groupid' => $gid);
inserttable('space', $space, 0, true);
inserttable('spacefield', array('uid' => $uid, 'email' => $email), 0, true);
//发送PM
if ($_SGLOBAL['supe_uid'] && $_SGLOBAL['supe_uid'] != $uid) {
include_once S_ROOT . './uc_client/client.php';
uc_pm_send($_SGLOBAL['supe_uid'], $uid, cplang('space_open_subject'), cplang('space_open_message', array(getsiteurl())), 1, 0, 0);
}
//产生feed
include_once S_ROOT . './source/function_cp.php';
$_uid = $_SGLOBAL['supe_uid'];
$_username = $_SGLOBAL['supe_username'];
$_SGLOBAL['supe_uid'] = $uid;
$_SGLOBAL['supe_username'] = addslashes($username);
feed_add('profile', cplang('feed_space_open'));
$_SGLOBAL['supe_uid'] = $_uid;
$_SGLOBAL['supe_username'] = $_username;
return $space;
}
示例2: admincp_show_simple
function admincp_show_simple($setting)
{
global $_G, $lang, $medal;
$medal['permission'] = is_array($medal['permission']) ? $medal['permission'] : unserialize($medal['permission']);
$medal['usergroups'] = (array) $medal['permission']['usergroups'];
$var = array();
$var['value'] = $medal['usergroups'] ? $medal['usergroups'] : $setting['usergroup'];
$query = DB::query("SELECT type, groupid, grouptitle, radminid FROM " . DB::table('common_usergroup') . " ORDER BY (creditshigher<>'0' || creditslower<>'0'), creditslower, groupid");
$groupselect = array();
while ($group = DB::fetch($query)) {
$group['type'] = $group['type'] == 'special' && $group['radminid'] ? 'specialadmin' : $group['type'];
$groupselect[$group['type']] .= '<option value="' . $group['groupid'] . '"' . (@in_array($group['groupid'], $var['value']) ? ' selected' : '') . '>' . $group['grouptitle'] . '</option>';
}
$var['type'] = '<select name="usergroup[]" size="10" multiple="multiple"><option value=""' . (@in_array('', $var['value']) ? ' selected' : '') . '>' . cplang('plugins_empty') . '</option>';
$var['type'] .= '<optgroup label="' . $lang['usergroups_member'] . '">' . $groupselect['member'] . '</optgroup>' . ($groupselect['special'] ? '<optgroup label="' . $lang['usergroups_special'] . '">' . $groupselect['special'] . '</optgroup>' : '') . ($groupselect['specialadmin'] ? '<optgroup label="' . $lang['usergroups_specialadmin'] . '">' . $groupselect['specialadmin'] . '</optgroup>' : '') . '<optgroup label="' . $lang['usergroups_system'] . '">' . $groupselect['system'] . '</optgroup></select>';
showsetting('用户组', '', '', $var['type'], '', '', '允许领取勋章的用户组,留空代表不限制');
}
示例3: virtualdata_set
function virtualdata_set()
{
global $head_url, $header_config;
if (!submitcheck('submit')) {
require_once libfile('function/forumlist');
$info = pick_common_get();
$info['vir_cache_time'] = $info['vir_cache_time'] ? $info['vir_cache_time'] : 10;
$info['vir_data_forum'] = unserialize($info['vir_data_forum']);
$info['vir_data_usergroup'] = unserialize($info['vir_data_usergroup']);
$info['forumselect'] = '<select name="set[vir_data_forum][]" size="10" multiple="multiple"><option value="">' . cplang('plugins_empty') . '</option>' . forumselect(FALSE, 0, $info['vir_data_forum'], TRUE) . '</select>';
return $info;
} else {
$set = $_GET['set'];
if (!$set['vir_data_forum'][0] && count($set['vir_data_forum']) == 1) {
$set['vir_data_forum'] = '';
}
pick_common_set($set);
save_syscache('milu_pick_vir_postdata', '');
save_syscache('milu_pick_vir_data', '');
save_syscache('milu_pick_vir_online', '');
cpmsg(milu_lang('op_success'), PICK_GO . "virtual_data", 'succeed');
}
}
示例4: getAtName
//调用检查函数将@后的内容进行验证,为UID对应的姓名相同则返回@与姓名,不相同则继续判断下一个@,没有找到匹配的最终将返回false
$ValidValue = getAtName($TmpString, $TmpName, $realname);
$ValidValue = trim($ValidValue);
$at_friend = "space.php?uid=" . $UserId;
if ($ValidValue != false) {
$Message = str_replace($ValidValue, "<a href={$at_friend}>@" . $realname . "</a> ", $Message);
$UserIds[] = $UserId;
}
}
}
//Add by Add by am 2013-12-07 end
$arr = array('tid' => intval($Commentid), "tagid" => intval($TagId), "uid" => intval($userid), "username" => getstr($username, 15, 1, 1, 1), "message" => getstr($Message, 5000, 1, 1, 1), "ip" => getonlineip(), 'dateline' => $_SGLOBAL['timestamp'], "isthread" => 0);
$pid = inserttable('post', $arr, 1);
//更新统计数据
$_SGLOBAL['db']->query("UPDATE " . tname('thread') . "\r\n\tSET replynum=replynum+1, lastpost='{$_SGLOBAL['timestamp']}', lastauthor='{$username}', lastauthorid='{$userid}'\r\n\tWHERE tid='{$Commentid}'");
//通知
$note = cplang('note_thread_reply') . " <a href=\"space.php?uid={$userid}&do=thread&id={$Commentid}&pid={$pid}\" target=\"_blank\">{$thread['subject']}</a>";
notification_add($userid, 'post', $note);
//统计
updatestat('post');
if ($pid) {
$arrs = array('flag' => 'success');
} else {
$arrs = array('flag' => 'fail');
}
}
}
$result = json_encode($arrs);
$result = preg_replace("#\\\\u([0-9a-f]+)#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", $result);
echo $result;
exit;
示例5: while
} else {
$sharecount = 0;
$query = DB::query("SELECT s.sid FROM " . DB::table('home_share') . " s WHERE 1 {$sql}");
while ($share = DB::fetch($query)) {
$sids .= ',' . $share['sid'];
$sharecount++;
}
$multi = '';
}
if (!$sharecount) {
$error = 'share_post_nonexistence';
}
}
showtagheader('div', 'postlist', $searchsubmit || $newlist);
showformheader('share&frame=no', 'target="shareframe"');
showhiddenfields(array('sids' => authcode($sids, 'ENCODE')));
showtableheader(cplang('share_result') . ' ' . $sharecount . (empty($newlist) ? ' <a href="###" onclick="$(\'searchposts\').style.display=\'\';$(\'postlist\').style.display=\'none\';$(\'shareforum\').pp.value=\'\';$(\'shareforum\').page.value=\'\';" class="act lightlink normal">' . cplang('research') . '</a>' : ''), 'fixpadding');
if ($error) {
echo "<tr><td class=\"lineheight\" colspan=\"15\">{$lang[$error]}</td></tr>";
} else {
if ($detail) {
showsubtitle(array('', 'author', 'share_title', 'share_body', 'share_type', 'time'));
echo $shares;
}
}
showsubmit('sharesubmit', 'delete', $detail ? 'del' : '', '', $multi);
showtablefooter();
showformfooter();
echo '<iframe name="shareframe" style="display:none"></iframe>';
showtagfooter('div');
}
示例6: emailcheck_send
function emailcheck_send($uid, $email) {
global $_SGLOBAL, $_SCONFIG;
if($uid && $email) {
$hash = authcode("$uid\t$email", 'ENCODE');
$url = getsiteurl().'do.php?ac=emailcheck&hash='.urlencode($hash);
$mailsubject = cplang('active_email_subject');
$mailmessage = cplang('active_email_msg', array($url));
smail(0, $email, $mailsubject, $mailmessage);
}
}
示例7: import_block
function import_block($xmlurl, $clientid, $xmlkey = '', $signtype = '', $ignoreversion = 1, $update = 0)
{
global $_G, $importtxt;
$_G['gp_importtype'] = $_G['gp_importtxt'] = '';
$xmlurl = strip_tags($xmlurl);
$clientid = strip_tags($clientid);
$xmlkey = strip_tags($xmlkey);
$parse = parse_url($xmlurl);
if (!empty($parse['host'])) {
$queryarr = explode('&', $parse['query']);
$para = array();
foreach ($queryarr as $value) {
$k = $v = '';
list($k, $v) = explode('=', $value);
if (!empty($k) && !empty($v)) {
$para[$k] = $v;
}
}
$para['clientid'] = $clientid;
$para['op'] = 'getconfig';
$para['charset'] = CHARSET;
$signurl = create_sign_url($para, $xmlkey, $signtype);
$pos = strpos($xmlurl, '?');
$pos = $pos === false ? strlen($xmlurl) : $pos;
$signurl = substr($xmlurl, 0, $pos) . '?' . $signurl;
$importtxt = @dfsockopen($signurl);
} else {
$importtxt = @implode('', file($xmlurl));
}
$blockarrays = getimportdata('Discuz! Block', 0);
if (empty($blockarrays['name']) || empty($blockarrays['fields']) || empty($blockarrays['getsetting'])) {
cpmsg(cplang('import_data_typeinvalid') . cplang($importtxt), '', 'error');
}
if (empty($ignoreversion) && strip_tags($blockarrays['version']) != strip_tags($_G['setting']['version'])) {
cpmsg(cplang('blockxml_import_version_invalid'), '', 'error', array('cur_version' => $blockarrays['version'], 'set_version' => $_G['setting']['version']));
}
$data = array('name' => htmlspecialchars($blockarrays['name']), 'version' => htmlspecialchars($blockarrays['version']), 'url' => $xmlurl, 'clientid' => $clientid, 'key' => $xmlkey, 'signtype' => !empty($signtype) ? 'MD5' : '', 'data' => serialize($blockarrays));
$data = daddslashes($data);
if (!$update) {
DB::insert('common_block_xml', $data);
} else {
DB::update('common_block_xml', $data, "`id`='{$update}'");
}
}
示例8: lang
case 'album':
$shareurl = "home.php?mod=space&uid={$share['fromuid']}&do=album&id={$share['itemid']}&modalbumkey={$share['modkey']}";
$sharetitle = lang('admincp', 'share_type_album');
break;
case 'article':
$shareurl = "portal.php?mod=view&aid={$share['itemid']}&modarticlekey={$share['modkey']}";
$sharetitle = lang('admincp', 'share_type_article');
break;
}
showtagheader('tbody', '', true, 'hover');
showtablerow("id=\"mod_{$share['sid']}_row1\"", array("id=\"mod_{$share['sid']}_row1_op\" rowspan=\"3\" class=\"rowform threadopt\" style=\"width:80px;\"", '', 'width="120"', 'width="120"', 'width="55"', 'width="55"'), array("<ul class=\"nofloat\"><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$share['sid']}]\" id=\"mod_{$share['sid']}_1\" value=\"validate\" onclick=\"mod_setbg({$share['sid']}, 'validate');\"><label for=\"mod_{$share['sid']}_1\">{$lang['validate']}</label></li><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$share['sid']}]\" id=\"mod_{$share['sid']}_2\" value=\"delete\" onclick=\"mod_setbg({$share['sid']}, 'delete');\"><label for=\"mod_{$share['sid']}_2\">{$lang['delete']}</label></li><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$share['sid']}]\" id=\"mod_{$doing['doid']}_3\" value=\"ignore\" onclick=\"mod_setbg({$share['sid']}, 'ignore');\"><label for=\"mod_{$share['sid']}_3\">{$lang['ignore']}</label></li></ul>", "<h3><a href=\"javascript:;\" onclick=\"display_toggle({$share[sid]});\">{$short_desc} {$share_censor_text}</a></h3>", $sharetitle, "<p><a target=\"_blank\" href=\"" . ADMINSCRIPT . "?action=members&operation=search&uid={$share['uid']}&submit=yes\">{$share['username']}</a></p> <p>{$share['dateline']}</p>", "<a target=\"_blank\" href=\"{$shareurl}\">{$lang['view']}</a>"));
showtablerow("id=\"mod_{$share['sid']}_row2\"", 'colspan="4" style="padding: 10px; line-height: 180%;"', '<div style="overflow: auto; overflow-x: hidden; max-height:120px; height:auto !important; height:100px; word-break: break-all;">' . $share['body_general'] . '</div>');
showtablerow("id=\"mod_{$share['sid']}_row3\"", 'class="threadopt threadtitle" colspan="4"', "<a href=\"?action=moderate&operation=shares&fast=1&sid={$share['sid']}&moderate[{$share['sid']}]=validate&page={$page}&frame=no\" target=\"fasthandle\">{$lang['validate']}</a> | <a href=\"?action=moderate&operation=shares&fast=1&sid={$share['sid']}&moderate[{$share['sid']}]=delete&page={$page}&frame=no\" target=\"fasthandle\">{$lang['delete']}</a> | <a href=\"?action=moderate&operation=shares&fast=1&sid={$share['sid']}&moderate[{$share['sid']}]=ignore&page={$page}&frame=no\" target=\"fasthandle\">{$lang['ignore']}</a>");
showtagfooter('tbody');
}
showsubmit('modsubmit', 'submit', '', '<a href="#all" onclick="mod_setbg_all(\'validate\')">' . cplang('moderate_all_validate') . '</a> <a href="#all" onclick="mod_setbg_all(\'delete\')">' . cplang('moderate_all_delete') . '</a> <a href="#all" onclick="mod_setbg_all(\'ignore\')">' . cplang('moderate_all_ignore') . '</a> <a href="#all" onclick="mod_cancel_all();">' . cplang('moderate_all_cancel') . '</a>', $multipage, false);
showtablefooter();
showformfooter();
} else {
$moderation = array('validate' => array(), 'delete' => array(), 'ignore' => array());
$validates = $deletes = $ignores = 0;
if (is_array($moderate)) {
foreach ($moderate as $sid => $act) {
$moderation[$act][] = $sid;
}
}
if (!empty($moderation['validate'])) {
require_once libfile('function/feed');
$validates = C::t('home_share')->update($moderation['validate'], array('status' => 0));
foreach (C::t('home_share')->fetch_all($moderation['validate']) as $share) {
switch ($share['type']) {
示例9: show_credit
function show_credit()
{
global $_SGLOBAL, $space;
$showcredit = getcount('show', array('uid' => $space['uid']), 'credit');
if ($showcredit > 0) {
if ($showcredit == 1) {
//ᅬᅡᄚᅪ뛹
notification_add($space['uid'], 'show', cplang('note_show_out'));
}
$_SGLOBAL['db']->query("UPDATE " . tname('show') . " SET credit=credit-1 WHERE uid='{$space['uid']}' AND credit>0");
}
}
示例10: intval
}
}
$updo['id'] = intval($updo['id']);
$updo['grade'] = intval($updo['grade']);
$setarr = array('doid' => $updo['doid'], 'upid' => $updo['id'], 'uid' => $_SGLOBAL['supe_uid'], 'username' => $_SGLOBAL['supe_username'], 'dateline' => $_SGLOBAL['timestamp'], 'message' => $message, 'ip' => getonlineip(), 'grade' => $updo['grade'] + 1);
//最多层级
if ($updo['grade'] >= 3) {
$setarr['upid'] = $updo['upid'];
//更母一个级别
}
$newid = inserttable('docomment', $setarr, 1);
//更新回复数
$_SGLOBAL['db']->query("UPDATE " . tname('doing') . " SET replynum=replynum+1 WHERE doid='{$updo['doid']}'");
//通知
if ($updo['uid'] != $_SGLOBAL['supe_uid']) {
$note = cplang('note_doing_reply', array("space.php?do=doing&doid={$updo['doid']}&highlight={$newid}"));
notification_add($updo['uid'], 'doing', $note);
}
$_POST['refer'] = preg_replace("/((\\#|\\&highlight|\\-highlight|\\.html).*?)\$/", '', $_POST['refer']);
if (strexists($_POST['refer'], '?')) {
$_POST['refer'] .= "&highlight={$newid}#dl{$updo[doid]}";
} else {
$_POST['refer'] .= "-highlight-{$newid}.html#dl{$updo[doid]}";
}
showmessage('do_success', $_POST['refer'], 0);
}
//删除
if ($_GET['op'] == 'delete') {
if (submitcheck('deletesubmit')) {
if ($id) {
$allowmanage = checkperm('managedoing');
示例11: searchgroups
function searchgroups($submit)
{
global $_G;
require_once libfile('function/group');
empty($_GET['selectgroupid']) && ($_GET['selectgroupid'] = array());
$groupselect = get_groupselect(0, $_GET['selectgroupid'], 0);
$monthselect = $dayselect = $birthmonth = $birthday = '';
for ($m = 1; $m <= 12; $m++) {
$m = sprintf("%02d", $m);
$monthselect .= "<option value=\"{$m}\" " . ($birthmonth == $m ? 'selected' : '') . ">{$m}</option>\n";
}
for ($d = 1; $d <= 31; $d++) {
$d = sprintf("%02d", $d);
$dayselect .= "<option value=\"{$d}\" " . ($birthday == $d ? 'selected' : '') . ">{$d}</option>\n";
}
showtagheader('div', 'searchgroups', !$submit);
echo '<script src="static/js/calendar.js" type="text/javascript"></script>';
showformheader("group&operation=manage");
showtableheader();
showsetting('groups_manage_name', 'srchname', $srchname, 'text');
showsetting('groups_manage_id', 'srchfid', $srchfid, 'text');
showsetting('groups_editgroup_category', '', '', '<select name="selectgroupid[]" multiple="multiple" size="10"><option value="all"' . (in_array('all', $_GET['selectgroupid']) ? ' selected' : '') . '>' . cplang('unlimited') . '</option>' . $groupselect . '</select>');
showsetting('groups_manage_membercount', array('memberlower', 'memberhigher'), array($_GET['memberlower'], $_GET['memberhigher']), 'range');
showsetting('groups_manage_threadcount', array('threadshigher', 'threadslower'), array($threadshigher, $threadslower), 'range');
showsetting('groups_manage_replycount', array('postshigher', 'postslower'), array($postshigher, $postslower), 'range');
showsetting('groups_manage_createtime', array('datelineafter', 'datelinebefore'), array($datelineafter, $datelinebefore), 'daterange');
showsetting('groups_manage_updatetime', array('lastupdateafter', 'lastupdatebefore'), array($lastupdateafter, $lastupdatebefore), 'daterange');
showsetting('groups_manage_founder', 'srchfounder', $srchfounder, 'text');
showsetting('groups_manage_founder_uid', 'srchfounderid', $srchfounderid, 'text');
showtagfooter('tbody');
showsubmit('submit');
showtablefooter();
showformfooter();
showtagfooter('div');
}
示例12: showtablerow
showtablerow('', array('class="vtop td24 lineheight"', 'class="lineheight team"'), array(cplang('home_dev_thanks'), '<a href="http://www.discuz.net/home.php?mod=space&uid=122246" class="lightlink2 smallfont" target="_blank">Heyond</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=632268" class="lightlink2 smallfont" target="_blank">JinboWang</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=15104" class="lightlink2 smallfont" target="_blank">Redstone</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=10407" class="lightlink2 smallfont" target="_blank">Qiang Liu</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=210272" class="lightlink2 smallfont" target="_blank">XiaoDunFang</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=86282" class="lightlink2 smallfont" target="_blank">Jianxieshui</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=9600" class="lightlink2 smallfont" target="_blank">Theoldmemory</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=2629" class="lightlink2 smallfont" target="_blank">Rain5017</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=26926" class="lightlink2 smallfont" target="_blank">Snow Wolf</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=17149" class="lightlink2 smallfont" target="_blank">Hehechuan</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=9132" class="lightlink2 smallfont" target="_blank">Pk0909</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=248" class="lightlink2 smallfont" target="_blank">feixin</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=675" class="lightlink2 smallfont" target="_blank">Laobing Jiuba</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=13877" class="lightlink2 smallfont" target="_blank">Artery</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=233" class="lightlink2 smallfont" target="_blank">Huli Hutu</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=122" class="lightlink2 smallfont" target="_blank">Lao Gui</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=159" class="lightlink2 smallfont" target="_blank">Tyc</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=177" class="lightlink2 smallfont" target="_blank">Stoneage</a>
<a href="http://www.discuz.net/home.php?mod=space&uid=7155" class="lightlink2 smallfont" target="_blank">Gregry</a>'));
/*vot*/
showtablerow('', array('class="vtop td24 lineheight"', 'class="lineheight"'), array('English version', '<a href="http://codersclub.org/discuzx/" class="lightlink2" target="_blank">Valery Votintsev at sources.ru</a>'));
showtablerow('', array('class="vtop td24 lineheight"', 'class="lineheight"'), array(cplang('home_dev_links'), '<a href="http://www.comsenz.com" class="lightlink2" target="_blank">Website</a>,
<a href="http://idc.comsenz.com" class="lightlink2" target="_blank">Web Hosting</a>,
<a href="http://www.comsenz.com/category-51" class="lightlink2" target="_blank">Purchase</a>,
<a href="http://www.discuz.com/" class="lightlink2" target="_blank">Discuz! Products</a>,
<a href="http://www.comsenz.com/downloads/styles/discuz" class="lightlink2" target="_blank">Templates</a>,
<a href="http://www.comsenz.com/downloads/plugins/discuz" class="lightlink2" target="_blank">Plugins</a>,
<a href="http://faq.comsenz.com" class="lightlink2" target="_blank">Documentation</a>,
<a href="http://www.discuz.net/" class="lightlink2" target="_blank">Forum</a>'));
showtablefooter();
echo '</div>';
示例13: rawurlencode
break;
case 2:
$order['orderstatus'] = '<b>' . $lang['ec_orders_search_status_auto_finished'] . '</b>';
break;
case 3:
$order['orderstatus'] = '<b>' . $lang['ec_orders_search_status_manual_finished'] . '</b><br />(<a href="home.php?mod=space&username=' . rawurlencode($order['admin']) . '" target="_blank">' . $order['admin'] . '</a>)';
break;
}
$order['submitdate'] = dgmdate($order['submitdate']);
$order['confirmdate'] = $order['confirmdate'] ? dgmdate($order['confirmdate']) : 'N/A';
list($orderid, $apitype) = explode("\t", $order['buyer']);
$apitype = $apitype ? $apitype : 'alipay';
$orderid = '<a href="' . $orderurl[$apitype] . $orderid . '" target="_blank">' . $orderid . '</a>';
showtablerow('', '', array("<input class=\"checkbox\" type=\"checkbox\" name=\"validate[]\" value=\"{$order['orderid']}\" " . ($order['status'] != 1 ? 'disabled' : '') . ">", "{$order['orderid']}<br />{$orderid}", $order[orderstatus], "<a href=\"home.php?mod=space&uid={$order['uid']}\" target=\"_blank\">{$order['username']}</a>", "{$_G[setting][extcredits][$_G[setting][creditstrans]]['title']} {$order['amount']} {$_G[setting][extcredits][$_G[setting][creditstrans]]['unit']}", "{$lang['rmb']} {$order['price']} {$lang['rmb_yuan']}", $order[submitdate], $order[confirmdate]));
}
showsubmit('ordersubmit', 'submit', '<input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll(\'prefix\', this.form, \'validate\')" /><label for="chkall">' . cplang('ec_orders_validate') . '</label>', '<a href="#" onclick="$(\'orderlist\').style.display=\'none\';$(\'ordersearch\').style.display=\'\';">' . cplang('research') . '</a>', $multipage);
showtablefooter();
showformfooter();
showtagfooter('div');
}
} else {
$numvalidate = 0;
if ($_G['gp_validate']) {
$orderids = $comma = '';
$confirmdate = dgmdate(TIMESTAMP);
$query = DB::query("SELECT * FROM " . DB::table('forum_order') . " WHERE orderid IN ('" . implode('\',\'', $_G['gp_validate']) . "') AND status='1'");
while ($order = DB::fetch($query)) {
updatemembercount($order['uid'], array($_G['setting']['creditstrans'] => $order['amount']));
$orderids .= "{$comma}'{$order['orderid']}'";
$comma = ',';
$submitdate = dgmdate($order['submitdate']);
示例14: showformheader
\tvar form = \$('cpform');
\tvar checkall = 'chkall';
\tfor(var i = 0; i < form.elements.length; i++) {
\t\tvar e = form.elements[i];
\t\tif(e.type == 'radio') {
\t\t\te.checked = '';
\t\t}
\t}
}
</script>
EOT;
showformheader('moderate&operation=members&do=mod');
showtableheader('moderate_members', 'fixpadding');
showsubtitle(array('operation', 'members_edit_info', 'moderate_members_message', 'moderate_members_info', 'moderate_members_remark'));
echo $members;
showsubmit('modsubmit', 'submit', '', '<a href="#all" onclick="checkAll(\'option\', $(\'cpform\'), \'invalidate\');set_bg_all(\'invalidate\');">' . cplang('moderate_all_invalidate') . '</a> <a href="#all" onclick="checkAll(\'option\', $(\'cpform\'), \'validate\');set_bg_all(\'validate\');">' . cplang('moderate_all_validate') . '</a> <a href="#all" onclick="checkAll(\'option\', $(\'cpform\'), \'delete\');set_bg_all(\'delete\');">' . cplang('moderate_all_delete') . '</a> <a href="#all" onclick="checkAll(\'option\', $(\'cpform\'), \'ignore\');set_bg_all(\'ignore\');">' . cplang('moderate_all_ignore') . '</a> <a href="#all" onclick="cancelallcheck();set_bg_all(\'cancel\');">' . cplang('moderate_all_cancel') . '</a><input class="checkbox" type="checkbox" name="apply_all" id="chk_apply_all" value="1" disabled="disabled" />' . cplang('moderate_apply_all') . ' <input class="checkbox" type="checkbox" name="sendemail" id="sendemail" value="1" ' . $checksendemail . ' /><label for="sendemail"> ' . cplang('moderate_members_email') . '</label>', $multipage);
showtablefooter();
showformfooter();
} else {
$moderation = array('invalidate' => array(), 'validate' => array(), 'delete' => array(), 'ignore' => array());
$uids = array();
$uidsql = '';
if (!$_GET['apply_all']) {
if (is_array($_GET['modtype'])) {
foreach ($_GET['modtype'] as $uid => $act) {
$uid = intval($uid);
$uids[$uid] = $uid;
$moderation[$act][$uid] = $uid;
}
$uidsql = 'v.uid IN (' . dimplode($uids) . ') AND';
}
示例15: array
$settings = array('mobilewechat' => serialize($setting));
C::t('common_setting')->update_batch($settings);
}
if (!submitcheck('settingsubmit')) {
if ($setting['wsq_siteid']) {
if (in_array('plugin', $_G['setting']['rewritestatus'])) {
$url = $_G['siteurl'] . rewriteoutput('plugin', 1, 'wechat', 'access');
} else {
$url = $_G['siteurl'] . 'plugin.php?id=wechat:access';
}
}
$apilisturl = ADMINSCRIPT . '?action=plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=wsq_setting&viewapi=yes';
$setting['wsq_siteurl'] = $setting['wsq_siteurl'] ? $setting['wsq_siteurl'] : $_G['siteurl'];
$setting['wsq_sitename'] = $setting['wsq_sitename'] ? $setting['wsq_sitename'] : $_G['setting']['bbname'];
require_once libfile('function/forumlist');
$forums = '<select name="setting[wsq_fid]"><option value="">' . cplang('plugins_empty') . '</option>' . forumselect(FALSE, 0, $setting['wsq_fid'], TRUE) . '</select>';
$sitelogo = $setting['wsq_sitelogo'] ? '<img src="' . $setting['wsq_sitelogo'] . '" width="150" />' : '';
$qrcode = $setting['wechat_qrcode'] ? '<img src="' . $_G['setting']['attachurl'] . 'common/' . $setting['wechat_qrcode'] . '" width="150" />' : '';
showtips(lang('plugin/wechat', 'wsq_tips', array('ADMINSCRIPT' => ADMINSCRIPT . '?action=', 'apiurl' => $apilisturl)));
showformheader('plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=wsq_setting', 'enctype');
showtableheader(lang('plugin/wechat', 'wechat_wsq_setting') . ' ' . ($setting['wsq_status'] ? ' (' . lang('plugin/wechat', 'wsq_status_open') . ')' : ($setting['wsq_siteid'] ? ' (' . lang('plugin/wechat', 'wsq_status_ing') . (TIMESTAMP - $setting['wsq_lastrequest'] > 3600 ? ' <a href="' . ADMINSCRIPT . '?action=plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=wsq_setting&recheck=yes">[' . lang('plugin/wechat', 'wsq_status_try') . ']</a>)' : ')') : ' (' . lang('plugin/wechat', 'wsq_status_close') . ')')));
showsetting(lang('plugin/wechat', 'wsq_allow'), 'setting[wsq_allow]', $setting['wsq_allow'], 'radio', 0, 0, lang('plugin/wechat', 'wsq_allow_comment'));
if ($setting['wsq_allow'] && $setting['wsq_siteid']) {
showtablefooter();
showtableheader();
showsetting(lang('plugin/wechat', 'wsq_url'), '', '', '<span style="white-space:nowrap">' . $url . '</span>');
showtablefooter();
showtableheader();
showsetting(lang('plugin/wechat', 'wsq_siteid'), '', '', $setting['wsq_siteid']);
showsetting(lang('plugin/wechat', 'wsq_sitetoken'), '', '', $setting['wsq_sitetoken']);
}