本文整理汇总了PHP中showmsg函数的典型用法代码示例。如果您正苦于以下问题:PHP showmsg函数的具体用法?PHP showmsg怎么用?PHP showmsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了showmsg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ck_power
function ck_power($v)
{
global $Apower, $webdb;
if (!$Apower["Module_{$webdb['module_pre']}{$v}"]) {
showmsg('你无权限!');
}
return true;
}
示例2: editProject_Action
public function editProject_Action()
{
if (app::v('checkallow', 'submit')) {
$baseId = intval($this->getInput['baseId']);
$moneyInfo = array(control_baseMoney::TABLE_BASEMONEY => $this->getInput[control_baseMoney::TABLE_BASEMONEY], control_baseMoney::TABLE_RUNMONEY => $this->getInput[control_baseMoney::TABLE_RUNMONEY], control_baseMoney::TABLE_CLIENTMONEY => $this->getInput[control_baseMoney::TABLE_CLIENTMONEY]);
control_baseMoney::editBaseMoneyInfo($moneyInfo, $baseId);
showmsg(control_returnCode::FORM_SUBMIT_TRUE);
}
}
示例3: stopAttack
/**
* 参数检查并写日志
*/
public function stopAttack($StrFiltKey, $StrFiltValue, $ArrFiltReq)
{
if (is_array($StrFiltValue)) {
$StrFiltValue = implode($StrFiltValue);
}
if (preg_match("/" . $ArrFiltReq . "/is", $StrFiltValue) == 1) {
$this->writesLog($_SERVER["REMOTE_ADDR"] . " " . strftime("%Y-%m-%d %H:%M:%S") . " " . $_SERVER["PHP_SELF"] . " " . $_SERVER["REQUEST_METHOD"] . " " . $StrFiltKey . " " . $StrFiltValue);
showmsg('您提交的参数非法,系统已记录您的本次操作!', '', 0, 1);
}
}
示例4: remove_atta
public function remove_atta()
{
$input = $this->input->get();
$attachment = $this->attachment->get_by_id($input['id']);
if (!$attachment) {
showmsg('订单不存在');
}
$this->attachment->delete_by_id($input['id']);
@unlink(HOMEBASE . 'web/uploads/' . $attachment['attachment']);
showmsg('操作成功');
}
示例5: _asUpFiles
function _asUpFiles($dir, $file_var, $max_size = '', $type = '', $name = false)
{
if (!file_exists($dir)) {
showmsg("上传图片失败:上传目录 " . $dir . " 不存在!", 0);
} elseif (!is_writable($dir)) {
showmsg("上传图片失败:上传目录 " . $dir . " 无法写入!", 0);
exit;
}
$upfile =& $_FILES["{$file_var}"];
$upfilename = $upfile['name'];
if (!empty($upfilename)) {
if (!is_uploaded_file($upfile['tmp_name'])) {
showmsg('上传图片失败:你选择的文件无法上传', 0);
exit;
} elseif ($max_size > 0 && $upfile['size'] / 1024 > $max_size) {
showmsg("上传图片失败:文件大小不能超过 " . $max_size . "KB", 0);
exit;
}
$ext_name = strtolower(str_replace(".", "", strrchr($upfilename, ".")));
if (!empty($type)) {
$arr_type = explode('/', $type);
$arr_type = array_map("strtolower", $arr_type);
if (!in_array($ext_name, $arr_type)) {
showmsg("上传图片失败:只允许上传 " . $type . " 的文件!", 0);
exit;
}
/* $imgtype=array("jpg","gif","jpeg","bmp","png");
if (in_array($ext_name,$imgtype))
{
$imageinfo = getimagesize($upfile['tmp_name']);
if (empty($imageinfo[0]) || empty($imageinfo[1]))
{
showmsg("上传图片失败:只允许上传 ".$type." 的文件!",0);
exit();
}
} */
$harmtype = array("asp", "php", "jsp", "js", "css", "php3", "php4", "ashx", "aspx", "exe");
if (in_array($ext_name, $harmtype)) {
exit("ERR!");
}
}
if (!is_bool($name)) {
$uploadname = $name . "." . $ext_name;
} elseif ($name === true) {
$uploadname = time() . mt_rand(100, 999) . "." . $ext_name;
}
if (!move_uploaded_file($upfile['tmp_name'], $dir . $uploadname)) {
showmsg('上传图片失败:文件上传出错!', 0);
exit;
}
return $uploadname;
}
return '';
}
示例6: __construct
function __construct($fid)
{
$this->FreeID = $fid;
$this->TypeLink = new TypeLink(0);
$this->dsql = new DedeSql(false);
$this->maintable = '#@__archives';
$this->TempletsFile = '';
$this->FLInfos = $this->dsql->GetOne("Select * From #@__freelist where aid='$fid' ");
$liststr = $this->FLInfos['listtag'];
//载入数据里保存的列表属性信息
$ndtp = new DedeTagParse();
$ndtp->SetNameSpace("dede","{","}");
$ndtp->LoadString($liststr);
$this->ListObj = $ndtp->GetTag('list');
$this->PageSize = $this->ListObj->GetAtt('pagesize');
if(empty($this->PageSize)) $this->PageSize = 30;
$channelid = $this->ListObj->GetAtt('channel');
if(empty($channelid)){
showmsg('必须指定频道','-1');exit();
}else{
$channelid = intval($channelid);
$channelinfo = $this->dsql->getone("select maintable from #@__channeltype where ID='$channelid'");
$this->maintable = $channelinfo['maintable'];
}
//全局模板解析器
$this->dtp = new DedeTagParse();
$this->dtp->SetNameSpace("dede","{","}");
//设置一些全局参数的值
$this->Fields['aid'] = $this->FLInfos['aid'];
$this->Fields['title'] = $this->FLInfos['title'];
$this->Fields['position'] = $this->FLInfos['title'];
$this->Fields['keywords'] = $this->FLInfos['keyword'];
$this->Fields['description'] = $this->FLInfos['description'];
$channelid = $this->ListObj->GetAtt('channel');
if(!empty($channelid)){
$this->Fields['channeltype'] = $channelid;
$this->ChannelUnit = new ChannelUnit($channelid);
}else{
$this->Fields['channeltype'] = 0;
}
foreach($GLOBALS['PubFields'] as $k=>$v) $this->Fields[$k] = $v;
$this->PartView = new PartView();
$this->CountRecord();
}
示例7: IDInflow
function IDInflow()
{
global $db;
$ids = be("arr", "t_id");
if (!isN($ids)) {
$count = $db->getOne("Select count(id) as cc from apk_master_temp where status=1 and id in (" . $ids . ") ");
$sql = "select * from apk_master_temp where status=1 and id in (" . $ids . ") ";
MovieInflow($sql, $count);
} else {
showmsg("请选择入库数据!", $backurl);
}
}
示例8: projectInfo_Action
public function projectInfo_Action()
{
$userId = $this->getInput['userId'];
if ($userId) {
$userInfo = control_user::getUserInfo($userId);
if (!$userInfo) {
showmsg(control_returnCode::FORM_INFO_EMPTY);
}
}
list(, $userPlanList) = control_userBase::getUserPlanList($userInfo[control_user::TABLE_KEY]);
foreach ($userPlanList as $plan) {
$baseId[] = $plan[control_userBase::TABLE_KEY];
}
list(, $basePlanList) = control_baseMoney::getListByIds($baseId);
$this->modelDisplay(array('userInfo' => $userInfo, 'userPlanList' => $userPlanList, 'basePlanList' => $basePlanList));
}
示例9: initCondition
function initCondition($array)
{
if (isset($array['action'])) {
$array['action'] = strtolower($array['action']);
}
if (!isset($array['title'])) {
$array['title'] = $this->name . "_" . $this->index;
$this->index++;
}
foreach ($this->condition as $value) {
if ($value['title'] == $array['title']) {
showmsg('invoke_title_have_exist');
}
}
$array['num'] = (int) $array['num'] ? (int) $array['num'] : 10;
$array['invokename'] = $this->name;
return $array;
}
示例10: save
function save()
{
global $db;
$f_id = be("post", "f_id");
$f_name = be("post", "f_name");
$f_object = be("post", "f_object");
$f_type = be("post", "f_type");
$f_content = be("post", "f_content");
$f_strstart = be("post", "f_strstart");
$f_strend = be("post", "f_strend");
$f_rep = be("post", "f_rep");
$f_flag = be("post", "f_flag");
$f_pid = be("post", "f_pid");
if (isN($f_id)) {
$f_id = 0;
}
if (isN($f_flag)) {
$f_flag = 0;
}
if ($f_type == 1) {
if (isN($f_content)) {
alert("过滤的内容不能为空!");
}
} elseif ($f_type == 2) {
if (isN($f_strstart) || isN($f_strend)) {
alert("开始/结束标记不能为空!");
}
}
if ($f_id == 0) {
$sql = "insert {pre}cj_filters (f_name,f_object,f_type,f_content,f_strstart,f_strend,f_rep,f_flag,f_pid,f_sys) values('" . $f_name . "','" . $f_object . "','" . $f_type . "','" . $f_content . "','" . $f_strstart . "','" . $f_strend . "','" . $f_rep . "','" . $f_flag . "','" . $f_pid . "','1') ";
} else {
$sql = "update {pre}cj_filters set f_name='" . $f_name . "',f_object='" . $f_object . "',f_type='" . $f_type . "',f_pid='" . $f_pid . "',f_content='" . $f_content . "',f_strstart='" . $f_strstart . "',f_strend='" . $f_strend . "',f_rep='" . $f_rep . "',f_flag='" . $f_flag . "'\t where f_id=" . $f_id;
}
$db->query($sql);
showmsg("成功修改过滤规则!", getReferer());
}
示例11: showmsg
$rsdb = $db->get_one("SELECT * FROM {$pre}module WHERE id='{$id}'");
$array = @(include ROOT_PATH . "{$rsdb['dirname']}/install/fix.php");
if ($array[forbid_del]) {
showmsg('当前模块设置了禁止卸载!');
}
if (!ereg("^([_a-z0-9]+)\$", $postdb[pre])) {
showmsg('数据表前缀只能是英文或数字');
}
if (!ereg("(_)\$", $postdb[pre])) {
$postdb[pre] = "{$postdb[pre]}_";
}
if (!ereg("^([_a-z0-9]+)\$", $postdb['dir'])) {
showmsg('只能是英文或数字');
}
if (!$postdb['name']) {
showmsg('模块名称不能为空!');
}
$db->query("INSERT INTO `{$pre}module` (`type` , `name` , `pre` , `dirname` ) VALUES ('{$rsdb['type']}', '{$postdb['name']}', '{$postdb['pre']}', '{$postdb['dir']}')");
$newid = $db->insert_id();
$db->query("SET SQL_QUOTE_SHOW_CREATE = 1");
$query = $db->query("SHOW TABLE STATUS");
while ($rs = $db->fetch_array($query)) {
if (eregi("^{$pre}{$rsdb[pre]}", $rs[Name])) {
$array = $db->get_one("SHOW CREATE TABLE {$rs['Name']}");
if (mysql_get_server_info() > '4.1' && $dbcharset) {
$array['Create Table'] = preg_replace("/DEFAULT CHARSET=([0-9a-z]+)/is", "", $array['Create Table']);
$array['Create Table'] .= " DEFAULT CHARSET={$dbcharset}";
}
$array['Create Table'] = str_replace("{$pre}{$rsdb['pre']}", "{$pre}{$postdb['pre']}", $array['Create Table']);
$db->query($array['Create Table']);
$newtable = str_replace("{$pre}{$rsdb['pre']}", "{$pre}{$postdb['pre']}", $rs[Name]);
示例12: showmsg
//执行支付成功操作
include_once INC_PATH . "/recharge.class.php";
$rechargeobj = RechargeClass::init();
//收取手续费的规则
$total_fee = $total_fee * 0.96 - 0.3;
$money = $rechargeobj->ratechange($total_fee, 'USD');
$rechargeobj->paysuccess($dingdan, $money);
echo '支付成功!';
} else {
//输出支付失败提示
showmsg("支付未完成!", "../../../m.php");
}
} else {
if (isset($paypal['business'])) {
log_result("error" . date("Y-M-D H:d:S"));
//输出支付失败提示
showmsg("支付未完成!", "../../../m.php");
} else {
//输出支付失败提示
showmsg("支付未完成!", "../../../m.php");
}
}
//日志消息,记录反馈的参数记录下来
function log_result($word)
{
$fp = fopen("log.txt", "a");
flock($fp, LOCK_EX);
fwrite($fp, $word . ":执行日期:" . strftime("%Y%m%d%H%I%S", time()) . "\t\n");
flock($fp, LOCK_UN);
fclose($fp);
}
示例13: define
* 74cms 职位详细页
* ============================================================================
* 版权所有: 骑士网络,并保留所有权利。
* 网站地址: http://www.74cms.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
*/
define('IN_QISHI', true);
$alias = "QS_hunter_jobsshow";
require_once dirname(__FILE__) . '/../include/common.inc.php';
if ($_PLUG['hunter']['p_install'] == 1) {
$link[0]['text'] = "返回首页";
$link[0]['href'] = $_CFG['site_dir'];
showmsg("管理员已关闭此模块!", 1, $link);
}
if ($mypage['caching'] > 0) {
$smarty->cache = true;
$smarty->cache_lifetime = $mypage['caching'];
} else {
$smarty->cache = false;
}
$cached_id = $alias . (isset($_GET['id']) ? "|" . intval($_GET['id']) % 100 . '|' . intval($_GET['id']) : '') . (isset($_GET['page']) ? "|p" . intval($_GET['page']) % 100 : '');
require_once QISHI_ROOT_PATH . 'include/mysql.class.php';
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
unset($dbhost, $dbuser, $dbpass, $dbname);
$mypage['tpl'] = '../tpl_hunter/default/' . $mypage['tpl'];
$smarty->assign('user_tpl', '../tpl_hunter/');
$smarty->display($mypage['tpl'], $cached_id);
$db->close();
示例14: trimall
function trimall($_str)
{
if (empty($_str)) {
showmsg('Settings should not be empty!');
return '';
exit;
}
$_str = preg_replace("/\\s/", "", $_str);
return $_str;
}
示例15: dirname
<?php
require_once dirname(__FILE__) . "/config.php";
@set_time_limit(0);
CheckPurview('sys_ArcBatch');
if (empty($dopost)) {
$dopost = '';
}
if ($dopost == 'analyse') {
$arr = $dsql->getone("select maintable from `#@__channeltype` where id='{$channelid}' ");
if (is_array($arr)) {
$maintable = $arr['maintable'];
} else {
showmsg('频道id不正确,无法处理!', 'javascript:;');
exit;
}
$dsql->SetQuery("Select count(title) as dd,title From `{$maintable}` where channel='{$channelid}' group by title order by dd desc limit 0, {$pagesize}");
$dsql->Execute();
$allarc = 0;
include DedeInclude('templets/article_result_same.htm');
exit;
} else {
if ($dopost == 'delsel') {
require_once dirname(__FILE__) . "/../include/typelink.class.php";
require_once dirname(__FILE__) . "/inc/inc_batchup.php";
if (empty($titles)) {
header("Content-Type: text/html; charset={$cfg_ver_lang}");
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$cfg_ver_lang}\">\r\n";
echo "没有指定删除的文档!";
exit;
}