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


PHP cpmsg函数代码示例

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


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

示例1: returnmsg

function returnmsg($p1, $p2, $p3)
{
    if (defined('IN_ADMINCP')) {
        cpmsg($p1, $p2, $p3 ? $p3 : 'error');
    } else {
        showmessage($p1, $p2, $p3);
    }
}
开发者ID:v998,项目名称:dsu,代码行数:8,代码来源:core.func.php

示例2: onsetting

 function onsetting()
 {
     $email = $_POST['eamil'];
     $user = new UserModel();
     if ($user->update(array("email" => $email), array("uid" => $_SESSION['uid']))) {
         cpmsg("更新成功");
     }
 }
开发者ID:QardenEden,项目名称:xssing,代码行数:8,代码来源:Xing.Action.php

示例3: _msg

 private function _msg($message, $extra = '')
 {
     if (defined('ADMINSCRIPT')) {
         cpmsg($message, '', 'succeed', array(), ($extra ? $extra . '<br />' : '') . '<br /><a href="' . ADMINSCRIPT . '?action=plugins">' . $this->lang['back'] . '</a>');
     } else {
         showmessage($message . '<br />' . $extra, $url, $values, array('alert' => 'info'));
     }
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:8,代码来源:class_cloudregister.php

示例4: onls

 function onls()
 {
     $status = 0;
     $operate = getgpc('o');
     if ($operate == 'list') {
         if ($delete = $_POST['delete']) {
             if (is_array($delete)) {
                 foreach ($delete as $filename) {
                     @unlink('./data/backup/' . str_replace(array('/', '\\'), '', $filename));
                 }
             }
             $status = 2;
             $this->writelog('db_delete', "delete=" . implode(',', $_POST['delete']));
         }
         $baklist = array();
         if (is_dir(UC_ROOT . './data/backup/')) {
             $dir = dir(UC_ROOT . './data/backup/');
             while ($entry = $dir->read()) {
                 $file = './data/backup/' . $entry;
                 if (is_dir($file) && preg_match("/backup_(\\d+)_\\w+/i", $file, $match)) {
                     $baklist[] = array('name' => $match[0], 'date' => $match[1]);
                 }
             }
             $dir->close();
         } else {
             cpmsg('db_export_dest_invalid');
         }
         $this->view->assign('baklist', $baklist);
     } elseif ($operate == 'view') {
         $dir = getgpc('dir');
         $this->load('app');
         $applist = $_ENV['app']->get_apps();
         $this->view->assign('applist', $applist);
         $this->view->assign('dir', $dir);
     } elseif ($operate == 'ping') {
         $appid = intval(getgpc('appid'));
         $app = $this->cache['apps'][$appid];
         $dir = trim(getgpc('dir'));
         $url = $app['url'] . '/api/dbbak.php?apptype=' . $app['type'];
         $code = $this->authcode('&method=ping&dir=' . $dir . '&time=' . time(), 'ENCODE', $app['authkey']);
         $url .= '&code=' . urlencode($code);
         $res = $_ENV['misc']->dfopen2($url, 0, '', '', 1, $app['ip'], 20, TRUE);
         if ($res == '1') {
             $this->message($this->_parent_js($appid, '<img src="images/correct.gif" border="0" class="statimg" /><span class="green">' . $this->lang['dumpfile_exists'] . '</span>') . '<script>parent.import_status[' . $appid . ']=true;</script>');
         } else {
             $this->message($this->_parent_js($appid, '<img src="images/error.gif" border="0" class="statimg" /><span class="red">' . $this->lang['dumpfile_not_exists'] . '</span>') . '<script>parent.import_status[' . $appid . ']=false;</script>');
         }
         exit;
     } else {
         $this->load('app');
         $applist = $_ENV['app']->get_apps();
         $this->view->assign('applist', $applist);
         $this->view->assign('dir', 'backup_' . date('ymd', time()) . '_' . $this->random(6));
     }
     $this->view->assign('operate', $operate);
     $this->view->display('admin_db');
 }
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:57,代码来源:db.php

示例5: checkpermission

function checkpermission($action, $break = 1) {
	if(!isset($GLOBALS['admincp'])) {
		cpmsg('action_access_noexists');
	} elseif($break && !$GLOBALS['admincp'][$action]) {
		cpmsg('action_noaccess_config');
	} else {
		return $GLOBALS['admincp'][$action];
	}
}
开发者ID:jonycookie,项目名称:projectm2,代码行数:9,代码来源:global.func.php

示例6: getsetting

 function getsetting()
 {
     global $_G;
     $custom = DB::fetch_first("SELECT name FROM " . DB::table('common_advertisement_custom') . " WHERE id='{$_G['gp_customid']}'");
     if (!$custom) {
         echo '<br >';
         cpmsg(lang('adv/custom', 'custom_id_notfound'));
     }
     $this->customname = $custom['name'];
 }
开发者ID:v998,项目名称:discuzx-en,代码行数:10,代码来源:adv_custom.php

示例7: down

function down($file, $subfolder = '')
{
    global $plugin_lang, $program_ver, $plugin_dir, $plugin_id;
    $temp = dfsockopen("http://dsu.googlecode.com/svn/trunk/PluginUpdater/{$plugin_id}/{$file}");
    if (!$temp) {
        cpmsg("&#19979;&#36733;&#25991;&#20214; {$file} &#22833;&#36133;&#65292;&#35831;&#31245;&#20505;&#20877;&#35797;", '', 'error');
    }
    @unlink($plugin_dir . '/' . ($subfolder ? $subfolder . '/' : '') . $file);
    file_put_contents($plugin_dir . '/' . ($subfolder ? $subfolder . '/' : '') . $file, $temp);
}
开发者ID:v998,项目名称:dsu,代码行数:10,代码来源:updater.inc.php

示例8: getsetting

 function getsetting()
 {
     global $_G;
     $custom = C::t('common_advertisement_custom')->fetch($_GET['customid']);
     if (!$custom) {
         echo '<br >';
         cpmsg(lang('adv/custom', 'custom_id_notfound'));
     }
     $this->customname = $custom['name'];
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:10,代码来源:adv_custom.php

示例9: show

 function show()
 {
     $pid = intval($_GET[pid]);
     $project = new ProjectModel();
     $pro = $project->getby_pid($pid);
     if ($pro[uid] != $_SESSION['uid']) {
         cpmsg("无权限", 'error', "?m=xing");
         exit;
     }
     $xing = new XingModel();
     $browsers = $xing->get_browsers($pid);
     include view_file();
 }
开发者ID:QardenEden,项目名称:xssing,代码行数:13,代码来源:Project.Action.php

示例10: admincp_check

 function admincp_check()
 {
     global $_G;
     $_G['gp_getCountLimit'] = intval($_G['gp_getCountLimit']);
     $_G['gp_startTime'] = $_G['gp_startTime'] ? strtotime($_G['gp_startTime']) : 0;
     $_G['gp_endTime'] = $_G['gp_endTime'] ? strtotime($_G['gp_endTime']) : 0;
     if ($_G['gp_getCountLimit'] < 0) {
         cpmsg('领取数量必须为正数!请返回。', '', 'error');
     }
     if ($_G['gp_endTime'] && $_G['gp_startTime'] && $_G['gp_startTime'] > $_G['gp_endTime']) {
         cpmsg('结束时间必须晚于开始时间!请返回。', '', 'error');
     }
 }
开发者ID:v998,项目名称:dsu-medal-center,代码行数:13,代码来源:script_czw_limit.php

示例11: admincp_check

 /**
  * 在数据提交后对数据进行合法性检验
  */
 function admincp_check()
 {
     global $_G, $medalid;
     $ppercon = is_numeric($_G['gp_ppercon']);
     if ($ppercon || empty($ppercon)) {
     } else {
         cpmsg('打卡机-连续签到次数设置错误!', 'action=plugins&operation=config&identifier=dsu_medalCenter&pmod=admin_manage&pdo=edit&medalid=' . $medalid, 'error');
     }
     $pperaddup = is_numeric($_G['gp_pperaddup']);
     if ($pperaddup || empty($pperaddup)) {
     } else {
         cpmsg('打卡机-累计签到次数设置错误!', 'action=plugins&operation=config&identifier=dsu_medalCenter&pmod=admin_manage&pdo=edit&medalid=' . $medalid, 'error');
     }
 }
开发者ID:v998,项目名称:dsu-medal-center,代码行数:17,代码来源:script_amupper.php

示例12: admincp_check

 /**
  * 在数据提交后对数据进行合法性检验
  */
 function admincp_check()
 {
     global $_G, $medalid;
     $month_sign = is_numeric($_G['gp_month_sign']);
     if ($month_sign || empty($month_sign)) {
     } else {
         cpmsg('每日签到-月签到次数设置错误!', 'action=plugins&operation=config&identifier=dsu_medalCenter&pmod=admin_manage&pdo=edit&medalid=' . $medalid, 'error');
     }
     $all_sign = is_numeric($_G['gp_all_sign']);
     if ($all_sign || empty($all_sign)) {
     } else {
         cpmsg('每日签到-总签到次数设置错误!', 'action=plugins&operation=config&identifier=dsu_medalCenter&pmod=admin_manage&pdo=edit&medalid=' . $medalid, 'error');
     }
 }
开发者ID:v998,项目名称:dsu-medal-center,代码行数:17,代码来源:script_paulsign.php

示例13: down

function down($file, $filetype = 0, $subfolder = '', $urladd = '')
{
    global $plugin_lang, $program_ver, $plugin_dir, $plugin_id;
    $temp = file_get_contents("http://update.dsu.cc/{$plugin_id}/dl.php?ver={$program_ver}&file={$file}" . $urladd);
    if (!$temp) {
        cpmsg("&#19979;&#36733;&#25991;&#20214; {$file} &#22833;&#36133;&#65292;&#35831;&#31245;&#20505;&#20877;&#35797;", '', 'error');
    }
    if ($filetype == 1) {
        $temp = '<?php' . "\r\n{$temp}\r\n" . '?>';
    } elseif ($filetype == 2) {
        $temp = '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\r\n" . $temp;
    }
    @unlink($plugin_dir . '/' . ($subfolder ? $subfolder . '/' : '') . $file);
    file_put_contents($plugin_dir . '/' . ($subfolder ? $subfolder . '/' : '') . $file, $temp);
}
开发者ID:v998,项目名称:dsu,代码行数:15,代码来源:updater.inc.php

示例14: del

 function del()
 {
     global $_G;
     if (!$_GET['id']) {
         cpmsg('抱歉,要删除的签到ID不存在', 'error', "m=sign&a=main");
         return false;
     }
     $id = intval($_GET['id']);
     if (!$_GET['ok']) {
         cpmsg('您确定要删除当前签到记录吗?删除后不可恢复?', 'error', "m=sign&a=del&ok=1&id=" . $id, '确定删除', "<p><a href='" . URL . "m=sign&a=main'>取消</a></p>");
         return false;
     } else {
         DB::delete("sign", "id=" . $id);
         cpmsg('删除成功', 'success', "m=sign&a=main");
         return false;
     }
 }
开发者ID:sayi21cn,项目名称:ttae_open,代码行数:17,代码来源:sign.action.php

示例15: onreg

 function onreg()
 {
     $incode = new IncodeModel();
     $code = $_POST['incode'];
     $name = $_POST['reg_1'];
     $pass = $_POST['reg_2'];
     if ($incode->is_ok($code)) {
         $user = new UserModel();
         if ($user->reg($name, $pass)) {
             $incode->del($code);
             if ($user->login($name, $pass)) {
                 header("Location:?m=xing");
             }
         }
     } else {
         cpmsg("注册失败鸟");
     }
 }
开发者ID:QardenEden,项目名称:xssing,代码行数:18,代码来源:User.Action.php


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