本文整理汇总了PHP中ispluginkey函数的典型用法代码示例。如果您正苦于以下问题:PHP ispluginkey函数的具体用法?PHP ispluginkey怎么用?PHP ispluginkey使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ispluginkey函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check
public function check()
{
require_once libfile('function/admincp');
require_once libfile('function/plugin');
require_once libfile('function/cloudaddons');
$pluginarray = C::t('common_plugin')->fetch_all_data();
$addonids = array();
foreach ($pluginarray as $row) {
if (ispluginkey($row['identifier'])) {
$addonids[] = $row['identifier'] . '.plugin';
}
}
$checkresult = dunserialize(cloudaddons_upgradecheck($addonids));
savecache('addoncheck_plugin', $checkresult);
$newversion = 0;
foreach ($checkresult as $value) {
list(, $newver) = explode(':', $value);
if ($newver) {
$newversion++;
}
}
if ($newversion) {
$return = array('status' => 1, 'type' => 'header', 'lang' => lang('optimizer', 'optimizer_plugin_new_plugin', array('newversion' => $newversion)));
} else {
$return = array('status' => 0, 'type' => 'none', 'lang' => lang('optimizer', 'optimizer_plugin_no_upgrade'));
}
return $return;
}
示例2: cpmsg
$sortid = C::t('forum_threadtype')->insert($data, 1);
}
$i = 1;
if (empty($value['identifier'])) {
cpmsg('threadtype_import_succeed', 'action=threadtypes', 'succeed');
}
}
$typeoption = array('classid' => $value['classid'], 'expiration' => $value['tpexpiration'], 'protect' => $value['protect'], 'title' => $value['title'], 'description' => $value['tpdescription'], 'type' => $value['type'], 'unit' => $value['unit'], 'rules' => $value['rules'], 'permprompt' => $value['permprompt']);
if (strlen($value['identifier']) > 34) {
cpmsg('threadtype_infotypes_optionvariable_invalid', 'action=threadtypes', 'error');
}
$findidentifier = 0;
$tmpidentifier = $value['identifier'];
$decline = '_';
while (!$findidentifier) {
if (C::t('forum_typeoption')->fetch_all_by_identifier($tmpidentifier, 0, 1) || !ispluginkey($tmpidentifier) || in_array(strtoupper($tmpidentifier), $mysql_keywords)) {
$tmpidentifier = $value['identifier'] . $decline . $sortid;
$decline .= '_';
} else {
$findidentifier = 1;
}
}
$typeoption['identifier'] = $tmpidentifier;
$idcmp[$value['identifier']] = $tmpidentifier;
$newoptionid = C::t('forum_typeoption')->insert($typeoption, true);
$typevar = array('sortid' => $sortid, 'optionid' => $newoptionid, 'available' => $value['available'], 'required' => $value['required'], 'unchangeable' => $value['unchangeable'], 'search' => $value['search'], 'displayorder' => $value['displayorder'], 'subjectshow' => $value['subjectshow']);
C::t('forum_typevar')->insert($typevar);
if ($tmpidentifier) {
if (in_array($value['type'], array('radio'))) {
$create_tableoption_sql .= "{$separator}{$tmpidentifier} smallint(6) UNSIGNED NOT NULL DEFAULT '0'";
} elseif (in_array($value['type'], array('number', 'range'))) {
示例3: dhtmlspecialchars
\t\t});
\t\tprettyPrint();
\t});
</script>
EOF;
} else {
$membername = dhtmlspecialchars(trim($_GET['membername']));
$membertitle = strip_tags(trim($_GET['membertitle']));
$status = intval($_GET['status']);
$createtime = strtotime($_GET['createtime']);
$description = dhtmlspecialchars(trim($_GET['description']));
$membersort = trim($_GET['membersort']);
if (!$membername) {
cpmsg(lang('plugin/yiqixueba', 'membername_invalid'), '', 'error');
}
if (!ispluginkey($membername)) {
cpmsg(lang('plugin/yiqixueba', 'membername_invalid'), '', 'error');
}
$ico = addslashes($_GET['memberimages']);
if ($_FILES['memberimages']) {
$upload = new discuz_upload();
if ($upload->init($_FILES['memberimages'], 'common') && $upload->save()) {
$ico = $upload->attach['attachment'];
}
}
if ($_POST['delete'] && addslashes($_POST['memberimages'])) {
$valueparse = parse_url(addslashes($_POST['memberimages']));
if (!isset($valueparse['host']) && !strexists(addslashes($_POST['memberimages']), '{STATICURL}')) {
@unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['memberimages']));
}
$ico = '';
示例4: showtagheader
showtagheader('tbody', 'extra', $pluginvar['type'] == 'select' || $pluginvar['type'] == 'selects');
showsetting('plugins_edit_vars_extra', 'extranew', $pluginvar['extra'], 'textarea');
showtagfooter('tbody');
showsubmit('varsubmit');
showtablefooter();
showformfooter();
} else {
$titlenew = cutstr(dhtmlspecialchars(trim($_G['gp_titlenew'])), 25);
$descriptionnew = cutstr(dhtmlspecialchars(trim($_G['gp_descriptionnew'])), 255);
$variablenew = trim($_G['gp_variablenew']);
$extranew = dhtmlspecialchars(trim($_G['gp_extranew']));
if (!$titlenew) {
cpmsg('plugins_edit_var_title_invalid', '', 'error');
} elseif ($variablenew != $pluginvar['variable']) {
$query = DB::query("SELECT pluginvarid FROM " . DB::table('common_pluginvar') . " WHERE variable='{$variablenew}'");
if (DB::num_rows($query) || !$variablenew || strlen($variablenew) > 40 || !ispluginkey($variablenew)) {
cpmsg('plugins_edit_vars_invalid', '', 'error');
}
}
DB::query("UPDATE " . DB::table('common_pluginvar') . " SET title='{$titlenew}', description='{$descriptionnew}', type='{$_G['gp_typenew']}', variable='{$variablenew}', extra='{$extranew}' WHERE pluginid='{$pluginid}' AND pluginvarid='{$pluginvarid}'");
updatecache(array('plugin', 'setting', 'styles'));
cpmsg('plugins_edit_vars_succeed', "action=plugins&operation=edit&pluginid={$pluginid}&anchor=vars", 'succeed');
}
}
function modulecmp($a, $b)
{
return $a['displayorder'] > $b['displayorder'] ? 1 : -1;
}
function updatemenu()
{
$pluginmenus = array(array('addons', 'addons'), array('plugins_menu', 'plugins'));
示例5: dhtmlspecialchars
EOF;
} else {
$goodsname = dhtmlspecialchars(trim($_GET['goodsname']));
$goodstitle = strip_tags(trim($_GET['goodstitle']));
$status = intval($_GET['status']);
$newprice = intval($_GET['newprice']);
$shopid = intval($_GET['shopid']);
$price = intval($_GET['price']);
$youxiaotime = strtotime($_GET['youxiaotime']);
$description = dhtmlspecialchars(trim($_GET['goodsdescription']));
$goodssort = trim($_GET['goodssort']);
if (!$goodsname) {
dump('no');
cpmsg(lang('plugin/yiqixueba', 'goodsname_invalid'), '', 'error');
}
if (ispluginkey($goodsname)) {
dump('sql');
cpmsg(lang('plugin/yiqixueba', 'goodsname_invalid'), '', 'error');
}
$ico = addslashes($_GET['goodsimages']);
if ($_FILES['goodsimages']) {
$upload = new discuz_upload();
if ($upload->init($_FILES['goodsimages'], 'common') && $upload->save()) {
$ico = $upload->attach['attachment'];
}
}
if ($_POST['delete'] && addslashes($_POST['goodsimages'])) {
$valueparse = parse_url(addslashes($_POST['goodsimages']));
if (!isset($valueparse['host']) && !strexists(addslashes($_POST['goodsimages']), '{STATICURL}')) {
@unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['goodsimages']));
}
示例6: cron_delete
function cron_delete($pluginid)
{
if (!ispluginkey($pluginid)) {
return false;
}
$dir = DISCUZ_ROOT . './source/plugin/' . $pluginid . '/cron';
if (!file_exists($dir)) {
return false;
}
$crondir = dir($dir);
$count = 0;
while ($filename = $crondir->read()) {
if (!in_array($filename, array('.', '..')) && preg_match("/^cron\\_[\\w\\.]+\$/", $filename)) {
$filename = $pluginid . ':' . $filename;
$cronid = C::t('common_cron')->get_cronid_by_filename($filename);
C::t('common_cron')->delete($cronid);
$count++;
}
}
return $count;
}
示例7: pluginupgradecheck
function pluginupgradecheck($checkdata)
{
$result = array();
if (!$checkdata) {
return $result;
}
$data = dfsockopen('http://addons.discuz.com/register.php', 0, http_build_query($checkdata), '', false, '', 5);
$data = explode("\n", $data);
foreach ($data as $row) {
if (!$row) {
continue;
}
list($id, $value) = explode("\t", $row);
if (!ispluginkey($id)) {
continue;
}
$valuee = explode(':', $value);
$result[$id]['result'] = $valuee[0];
$result[$id]['newver'] = $valuee[1];
}
return $result;
}
示例8: template
$patchlist .= '</table><p class="cl"><a href="admin.php?action=patch" class="y pn"><strong>' . ($patchnotice['fixed'] ? $lang['patch_view_fix_detail'] : $lang['patch_fix_right_now']) . '</strong></a></p>';
$patchlist .= '</div></div>';
}
}
include template('common/header_ajax');
echo $patchlist;
include template('common/footer_ajax');
exit;
} elseif ($_GET['action'] == 'pluginnotice') {
require_once libfile('function/admincp');
require_once libfile('function/plugin');
require_once libfile('function/cloudaddons');
$pluginarray = C::t('common_plugin')->fetch_all_data();
$addonids = array();
foreach ($pluginarray as $row) {
if (ispluginkey($row['identifier'])) {
$addonids[] = $row['identifier'] . '.plugin';
}
}
$checkresult = dunserialize(cloudaddons_upgradecheck($addonids));
savecache('addoncheck_plugin', $checkresult);
$newversion = 0;
foreach ($checkresult as $value) {
list(, $newver) = explode(':', $value);
if ($newver) {
$newversion++;
}
}
include template('common/header_ajax');
if ($newversion) {
$lang = lang('forum/misc');
示例9: dhtmlspecialchars
\t\t});
\t\tprettyPrint();
\t});
</script>
EOF;
} else {
$chezhengname = dhtmlspecialchars(trim($_GET['chezhengname']));
$chezhengtitle = strip_tags(trim($_GET['chezhengtitle']));
$status = intval($_GET['status']);
$createtime = strtotime($_GET['createtime']);
$description = dhtmlspecialchars(trim($_GET['description']));
$chezhengsort = trim($_GET['chezhengsort']);
if (!$chezhengname) {
cpmsg(lang('plugin/yiqixueba', 'chezhengname_invalid'), '', 'error');
}
if (!ispluginkey($chezhengname)) {
cpmsg(lang('plugin/yiqixueba', 'chezhengname_invalid'), '', 'error');
}
$ico = addslashes($_GET['chezhengimages']);
if ($_FILES['chezhengimages']) {
$upload = new discuz_upload();
if ($upload->init($_FILES['chezhengimages'], 'common') && $upload->save()) {
$ico = $upload->attach['attachment'];
}
}
if ($_POST['delete'] && addslashes($_POST['chezhengimages'])) {
$valueparse = parse_url(addslashes($_POST['chezhengimages']));
if (!isset($valueparse['host']) && !strexists(addslashes($_POST['chezhengimages']), '{STATICURL}')) {
@unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['chezhengimages']));
}
$ico = '';
示例10: trim
$mokuai_price = trim($_GET['price']);
$mokuai_template = intval($_GET['template']);
$mokuai_mobile = intval($_GET['mobile']);
$mokuai_description = dhtmlspecialchars(trim($_GET['description']));
$mokuai_information = trim($_GET['mokuaiinformation']);
$mokuai_newtag = trim($_GET['newtag']);
if (!$biaoshi) {
cpmsg(lang('plugin/yiqixueba', 'mokuai_biaoshi_invalid'), '', 'error');
}
if (!$version) {
cpmsg(lang('plugin/yiqixueba', 'mokuai_version_invalid'), '', 'error');
}
if (!$mokuai_name) {
cpmsg(lang('plugin/yiqixueba', 'mokuai_name_invalid'), '', 'error');
}
if (!ispluginkey($biaoshi)) {
cpmsg(lang('plugin/yiqixueba', 'mokuai_biaoshi_invalid'), '', 'error');
}
$ico = addslashes($_GET['ico']);
if ($_FILES['ico']) {
$upload = new discuz_upload();
if ($upload->init($_FILES['ico'], 'common') && $upload->save()) {
$ico = $upload->attach['attachment'];
}
}
if ($_POST['delete'] && addslashes($_POST['ico'])) {
$valueparse = parse_url(addslashes($_POST['ico']));
if (!isset($valueparse['host']) && !strexists(addslashes($_POST['ico']), '{STATICURL}')) {
@unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['ico']));
}
$ico = '';
示例11: splugin_updatecache
function splugin_updatecache($identifier)
{
global $_G, $installlang;
if (ispluginkey($identifier)) {
splugin_loadcache($identifier);
$splugin = DB::fetch_first("SELECT * FROM " . DB::table('common_plugin') . " WHERE identifier='{$identifier}'");
$directory = substr($splugin['directory'], 0, -1);
$smodules = unserialize($splugin['modules']);
if ($splugin) {
$file = DISCUZ_ROOT . './source/plugin/' . $directory . '/discuz_plugin_' . $directory . ($smodules['extra']['installtype'] ? '_' . $smodules['extra']['installtype'] : '') . '.xml';
if (file_exists($file)) {
updatecache(array('plugin'));
$importtxt = @implode('', file($file));
$pluginarray = splugin_getimportdata($importtxt, 'Discuz! Plugin');
unset($pluginarray['Data']['var']);
if ($fp = @fopen($file, 'w')) {
fwrite($fp, splugin_exportdata($pluginarray));
fclose($fp);
}
}
$update_item = array('1314' => '1', 'SC_GBK' => '1', 'SC_UTF8' => '1', 'TC_BIG5' => '1', 'TC_UTF8' => '1', 'install' => '2', 'upgrade' => '2');
$file = DISCUZ_ROOT . './source/plugin/' . $directory . '/demo.php';
if (!file_exists($file)) {
cpmsg('plugin_file_error', '', 'error');
}
if ($fp = @fopen($file, 'r')) {
$demo_contents = fread($fp, filesize($file));
fclose($fp);
}
foreach ($update_item as $key => $value) {
if ($value == '1') {
if (empty($smodules['extra']['installtype']) && $key == '1314') {
continue;
}
if ($smodules['extra']['installtype'] != $key) {
$file = DISCUZ_ROOT . './source/plugin/' . $directory . '/discuz_plugin_' . $directory . ($key != '1314' ? '_' . $key : '') . '.xml';
clearstatcache();
if (file_exists($file)) {
@unlink($file);
}
}
} else {
$file = DISCUZ_ROOT . './source/plugin/' . $directory . '/' . $key . '.php';
if ($fp = @fopen($file, 'w')) {
fwrite($fp, $demo_contents);
fclose($fp);
}
}
}
}
$addonid = $identifier . '.plugin';
$array = cloudaddons_getmd5($addonid);
if (s_cloudaddon_open('&mod=app&ac=validator&addonid=' . $addonid . ($array !== false ? '&rid=' . $array['RevisionID'] . '&sn=' . $array['SN'] . '&rd=' . $array['RevisionDateline'] : '')) === '0') {
$query = DB::query("SELECT * FROM " . DB::table('common_plugin') . " WHERE identifier like 'study_%'");
while ($plugin = DB::fetch($query)) {
$identifier = $plugin['identifier'];
if (ispluginkey($identifier)) {
s_cloudaddons_thank($identifier);
}
}
}
}
}
示例12: showsetting
//radio
showsetting(lang('plugin/yiqixueba', 'groupname'), 'groupname', $group_info['groupname'], 'text', '', 0, lang('plugin/yiqixueba', 'groupname_comment'), '', '', true);
foreach ($infotypes as $k => $v) {
if ($v['status']) {
showsetting($v['infotypetitle'], array('quanxian', array(array($v['infotypename'] . '_add', lang('plugin/yiqixueba', 'add')), array($v['infotypename'] . '_del', lang('plugin/yiqixueba', 'del')), array($v['infotypename'] . '_edit', lang('plugin/yiqixueba', 'edit')), array($v['infotypename'] . '_cha', lang('plugin/yiqixueba', 'cha')))), dunserialize($group_info['quanxian']), 'mcheckbox', '', 0, '', '', '', true);
}
}
showsubmit('submit');
showtablefooter();
showformfooter();
} else {
$groupname = dhtmlspecialchars(trim($_GET['groupname']));
$status = intval($_GET['status']);
if (!$groupname) {
//cpmsg(lang('plugin/yiqixueba','groupname_invalid'), '', 'error');
}
if (!ispluginkey($groupname)) {
//cpmsg(lang('plugin/yiqixueba','groupname_invalid'), '', 'error');
}
$data = array('groupname' => $groupname, 'status' => $status, 'quanxian' => serialize($_GET['quanxian']));
if ($groupid) {
$data['updatetime'] = time();
C::t(GM('cheyouhui_group'))->update($groupid, $data);
} else {
$data['updatetime'] = time();
C::t(GM('cheyouhui_group'))->insert($data);
}
echo '<style>.floattopempty { height: 30px !important; height: auto; } </style>';
cpmsg(lang('plugin/yiqixueba', 'edit_group_succeed'), 'action=' . $this_page . '&subop=grouplist', 'succeed');
}
}
示例13: dhtmlspecialchars
\t\t});
\t\tprettyPrint();
\t});
</script>
EOF;
} else {
$goodscaijiname = dhtmlspecialchars(trim($_GET['goodscaijiname']));
$goodscaijititle = strip_tags(trim($_GET['goodscaijititle']));
$status = intval($_GET['status']);
$createtime = strtotime($_GET['createtime']);
$description = dhtmlspecialchars(trim($_GET['description']));
$goodscaijisort = trim($_GET['goodscaijisort']);
if (!$goodscaijiname) {
cpmsg(lang('plugin/yiqixueba', 'goodscaijiname_invalid'), '', 'error');
}
if (!ispluginkey($goodscaijiname)) {
cpmsg(lang('plugin/yiqixueba', 'goodscaijiname_invalid'), '', 'error');
}
$ico = addslashes($_GET['goodscaijiimages']);
if ($_FILES['goodscaijiimages']) {
$upload = new discuz_upload();
if ($upload->init($_FILES['goodscaijiimages'], 'common') && $upload->save()) {
$ico = $upload->attach['attachment'];
}
}
if ($_POST['delete'] && addslashes($_POST['goodscaijiimages'])) {
$valueparse = parse_url(addslashes($_POST['goodscaijiimages']));
if (!isset($valueparse['host']) && !strexists(addslashes($_POST['goodscaijiimages']), '{STATICURL}')) {
@unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['goodscaijiimages']));
}
$ico = '';
示例14: dhtmlspecialchars
\t\t});
\t\tprettyPrint();
\t});
</script>
EOF;
} else {
$settingname = dhtmlspecialchars(trim($_GET['settingname']));
$settingtitle = strip_tags(trim($_GET['settingtitle']));
$status = intval($_GET['status']);
$createtime = strtotime($_GET['createtime']);
$description = dhtmlspecialchars(trim($_GET['description']));
$settingsort = trim($_GET['settingsort']);
if (!$settingname) {
cpmsg(lang('plugin/yiqixueba', 'settingname_invalid'), '', 'error');
}
if (!ispluginkey($settingname)) {
cpmsg(lang('plugin/yiqixueba', 'settingname_invalid'), '', 'error');
}
$ico = addslashes($_GET['settingimages']);
if ($_FILES['settingimages']) {
$upload = new discuz_upload();
if ($upload->init($_FILES['settingimages'], 'common') && $upload->save()) {
$ico = $upload->attach['attachment'];
}
}
if ($_POST['delete'] && addslashes($_POST['settingimages'])) {
$valueparse = parse_url(addslashes($_POST['settingimages']));
if (!isset($valueparse['host']) && !strexists(addslashes($_POST['settingimages']), '{STATICURL}')) {
@unlink($_G['setting']['attachurl'] . 'common/' . addslashes($_POST['settingimages']));
}
$ico = '';
示例15: array
$endtime = $_GET['endtime'];
$orderby = $_GET['orderby'];
$advnum = C::t('common_advertisement')->count_search($title, $starttime, $endtime, $type, $target);
if (!$type) {
$customadv = array();
foreach (C::t('common_advertisement_custom')->fetch_all_data() as $custom) {
$customadv[$custom['id']] = $custom['name'];
}
}
$typenames = array();
foreach (C::t('common_advertisement')->fetch_all_search($title, $starttime, $endtime, $type, $target, $orderby, $start_limit, $advppp) as $adv) {
if (!$type) {
$advfile = '';
$etype = explode(':', $adv['type']);
if (count($etype) > 1) {
if (ispluginkey($etype[0]) && preg_match('/^\\w$/', $etype[1])) {
$advfile = DISCUZ_ROOT . './source/plugin/' . $etype[0] . '/adv/adv_' . $etype[1] . '.php';
$advclass = 'adv_' . $etype[1];
}
} else {
$advfile = libfile('adv/' . $adv['type'], 'class');
$advclass = 'adv_' . $adv['type'];
}
if (!$advfile || !file_exists($advfile)) {
continue;
}
if (!isset($typenames[$adv['type']])) {
require_once $advfile;
if (class_exists($advclass)) {
$advclassv = new $advclass();
$typenames[$adv['type']] = lang('adv/' . $adv['type'], $advclassv->name);