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


PHP javascript::dialog方法代码示例

本文整理汇总了PHP中javascript::dialog方法的典型用法代码示例。如果您正苦于以下问题:PHP javascript::dialog方法的具体用法?PHP javascript::dialog怎么用?PHP javascript::dialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javascript的用法示例。


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

示例1: doSave

 function doSave()
 {
     $uid = (int) $_POST['uid'];
     $info = array();
     if ($_POST['pwd'] || $_POST['pwd1'] || $_POST['pwd2']) {
         $pwd = md5(trim($_POST['pwd']));
         $pwd1 = md5(trim($_POST['pwd1']));
         $pwd2 = md5(trim($_POST['pwd2']));
         if (!$_POST['pwd'] || !$_POST['pwd1'] || !$_POST['pwd2']) {
             javascript::alert("修改密码.原密码,新密码,确认密码不能为空");
         }
         $pwd != $user['password'] && javascript::alert("原密码错误!");
         $pwd1 != $pwd2 && javascript::alert("新密码与确认密码不一致!");
         iCMS_DB::query("UPDATE `#iCMS@__members` SET `password` = '{$pwd2}' WHERE `uid` ='{$uid}' LIMIT 1");
     }
     //	    $username=dhtmlspecialchars($_POST['name']);
     $_POST['email'] && !eregi("^([_\\.0-9a-z-]+)@([0-9a-z][0-9a-z-]+)\\.([a-z]{2,6})\$", $_POST['email']) && javascript::alert("E-mail格式错误!!");
     $email = stripslashes($_POST['email']);
     $gender = intval($_POST['gender']);
     $info['nickname'] = dhtmlspecialchars(stripslashes($_POST['nickname']));
     cstrlen($info['nickname']) > 12 && javascript::alert("昵称长度大于12");
     $info['icq'] = intval($_POST['icq']);
     $info['home'] = dhtmlspecialchars(stripslashes($_POST['home']));
     $info['year'] = intval($_POST['year']);
     $info['month'] = intval($_POST['month']);
     $info['day'] = intval($_POST['day']);
     $info['from'] = dhtmlspecialchars(stripslashes($_POST['from']));
     $info['signature'] = dhtmlspecialchars(stripslashes($_POST['signature']));
     $user['info'] = $info;
     iCMS_DB::query("UPDATE `#iCMS@__members` SET `info` = '" . addslashes(serialize($user['info'])) . "',`email`='{$email}',`gender`='{$gender}' WHERE `uid` ='{$uid}' LIMIT 1");
     javascript::dialog('用户编辑完成!', 'url:' . __SELF__ . '?mo=user&do=manage');
 }
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:32,代码来源:user.mo.php

示例2: doSave

 function doSave()
 {
     $id = (int) $_POST['id'];
     $name = dhtmlspecialchars($_POST['name']);
     $table = dhtmlspecialchars($_POST['table']);
     $description = dhtmlspecialchars($_POST['desc']);
     $position2 = $_POST['pos'];
     $position = $_POST['position'];
     $binding = isset($_POST['binding']) ? 1 : 0;
     empty($name) && javascript::alert('模块名称不能为空!');
     empty($table) && $binding && javascript::alert('模块名不能为空!');
     if (!$binding && empty($id)) {
         if (empty($table)) {
             include iPATH . 'include/cn.class.php';
             $table = CN::pinyin($name);
         }
         $table = $table . '_content';
     }
     if ($id) {
         iCMS_DB::getValue("SELECT `id` FROM `#iCMS@__model` where `table` = '{$table}' and `id`!='{$id}'") && javascript::alert('该模块已经存在!请检查是否重复');
         iCMS_DB::query("UPDATE `#iCMS@__model` SET `name` = '{$name}', `table` = '{$table}', `binding` = '{$binding}', `description` = '{$description}', `position` = '{$position}', `position2` = '{$position2}' WHERE `id` = '{$id}';");
     } else {
         iCMS_DB::query("INSERT INTO `#iCMS@__model`(`name`, `table`, `binding`, `description`, `position`,`position2`, `addtime`)VALUES ('{$name}', '{$table}', '{$binding}', '{$description}', '{$position}','{$position2}', '" . time() . "');");
         $id = iCMS_DB::$insert_id;
     }
     model::cache();
     $moreaction = array(array("text" => "下一步添加字段", "url" => __SELF__ . "?mo=models&do=addfield&id=<?php echo {$id};?>"), array("text" => "返回模块列表", "url" => __SELF__ . "?mo=models&do=manage"));
     javascript::dialog('模块添加完成!<br />10秒后返回模块列表', "url:" . __SELF__ . "?mo=models&do=manage", $moreaction, 10);
 }
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:29,代码来源:models.mo.php

示例3: doStatus

 function doStatus()
 {
     $id = intval($_GET['id']);
     $act = intval($_GET['act']);
     iCMS_DB::query("UPDATE `#iCMS@__advertise` SET `status` = '{$act}' WHERE `id` ='{$id}'");
     $this->create($id);
     javascript::dialog("操作完成!", 'url:1');
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:8,代码来源:advertise.mo.php

示例4: doUpdate

 function doUpdate()
 {
     foreach ($_POST as $key => $value) {
         updateConfig(dhtmlspecialchars($value), $key);
     }
     CreateConfigFile();
     javascript::dialog('配置已更新!');
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:8,代码来源:setting.mo.php

示例5: doEdit

 function doEdit()
 {
     $defArray['source'] = explode("\r\n", dhtmlspecialchars($_POST['source']));
     $defArray['author'] = explode("\r\n", dhtmlspecialchars($_POST['author']));
     $defArray['editor'] = explode("\r\n", dhtmlspecialchars($_POST['editor']));
     $this->iCMS->setCache('system/default', $defArray, 0);
     javascript::dialog('编辑完成!<br />3秒后返回', 'url:' . __SELF__ . '?mo=defaults');
 }
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:8,代码来源:defaults.mo.php

示例6: dostatus0

 function dostatus0()
 {
     empty($_POST['id']) && javascript::dialog("请选择要操作的评论!");
     foreach ($_POST['id'] as $k => $id) {
         $indexId = $_POST['indexId'][$id];
         iCMS_DB::query("UPDATE `#iCMS@__comment` SET `status` = '0' WHERE `id` ='{$id}'");
         iCMS_DB::query("UPDATE `#iCMS@__article` SET `comments` = comments-1  WHERE `id` ='{$indexId}'");
     }
     javascript::dialog("取消审核!", "url:0");
 }
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:10,代码来源:comment.mo.php

示例7: doSave

 function doSave()
 {
     strpos($_POST['tplpath'], '..') !== false && javascript::alert("文件路径不能带有..");
     preg_match("/\\.([a-zA-Z0-9]{2,4})\$/", $_POST['tplpath'], $exts);
     $FileExt = strtolower($exts[1]);
     strstr($FileExt, 'ph') && javascript::alert("文件格式错误!");
     in_array($FileExt, array('cer', 'htr', 'cdx', 'asa', 'asp', 'jsp', 'aspx', 'cgi')) && javascript::alert("文件格式错误!");
     $FileData = stripslashes($_POST['html']);
     FS::write(iPATH . 'templates' . $_POST['tplpath'], $FileData);
     javascript::dialog('保存成功!', 'url:' . __SELF__ . $_POST['REFERER']);
 }
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:11,代码来源:templates.mo.php

示例8: doEdit

 function doEdit()
 {
     $disable = explode("\r\n", dhtmlspecialchars($_POST['disable']));
     $filter = explode("\r\n", dhtmlspecialchars($_POST['filter']));
     foreach ($filter as $k => $val) {
         $filterArray[$k] = explode("=", $val);
     }
     $this->iCMS->setCache('system/word.filter', $filterArray, 0);
     $this->iCMS->setCache('system/word.disable', $disable, 0);
     javascript::dialog('更新完成!<br />3秒后返回', 'url:' . __SELF__ . '?mo=filter');
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:11,代码来源:filter.mo.php

示例9: dodelete

 function dodelete()
 {
     if (isset($_POST['delete'])) {
         foreach ($_POST['delete'] as $k => $id) {
             iCMS_DB::query("DELETE FROM `#iCMS@__plugins_message` WHERE `id` ='{$id}'");
             $js[] = '#mid' . $id;
         }
         javascript::dialog('全部成功删除!', 'js:parent.$("' . implode(',', $js) . '").remove();parent.iCMS.closeDialog();');
     } else {
         javascript::alert("请选择要删除的留言!");
     }
 }
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:12,代码来源:message.mo.php

示例10: doAdd

 function doAdd()
 {
     $this->init();
     $name = dhtmlspecialchars($_POST['name']);
     $type = dhtmlspecialchars($_POST['type']);
     $val = intval($_POST['val']);
     $end = end($this->array);
     $id = $end['id'] + 1;
     $this->array[$id] = array('id' => $id, 'name' => $name, 'type' => $type, 'val' => $val);
     $this->iCMS->setCache('system/contentype', $this->array, 0);
     javascript::dialog('添加完成!<br />3秒后返回', 'url:' . __SELF__ . '?mo=contentype');
 }
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:12,代码来源:contentype.mo.php

示例11: doUpdate

 function doUpdate()
 {
     include_once iPATH . 'include/forum.class.php';
     if ($_POST['forum']) {
         $forum = new forum();
         $forum->cache();
     }
     if ($_POST['adm']) {
         include_once iPATH . 'admin/advertise.mo.php';
         $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__advertise`", OBJECT);
         $_count = count($rs);
         for ($i = 0; $i < $_count; $i++) {
             adm($rs[$i]);
         }
     }
     $_POST['tpl'] && $this->iCMS->clear_compiled_tpl();
     $_POST['iCMS_list'] && FS::rmdir(iPATH . 'cache/list');
     $_POST['iCMS_forum'] && FS::rmdir(iPATH . 'cache/forum');
     $_POST['iCMS_tag'] && FS::rmdir(iPATH . 'cache/tags');
     if ($_POST['iCMS_ALL']) {
         FS::rmdir(iPATH . 'cache/list');
         FS::rmdir(iPATH . 'cache/forum');
         FS::rmdir(iPATH . 'cache/tags');
     }
     $_POST['keywords'] && keywords_cache();
     $_POST['tags'] && tags_cache();
     if ($_POST['model']) {
         include iPATH . 'include/model.class.php';
         model::cache();
     }
     $_POST['field'] && field_cache();
     $_POST['config'] && CreateConfigFile();
     if ($_POST['Re-Article-Count']) {
         $rs = iCMS_DB::getArray("SELECT fid FROM `#iCMS@__forum`");
         $_count = count($rs);
         for ($i = 0; $i < $_count; $i++) {
             $c = iCMS_DB::getValue("SELECT count(*) FROM #iCMS@__article where `fid`='" . $rs[$i]['fid'] . "' LIMIT 1 ");
             iCMS_DB::query("UPDATE `#iCMS@__forum` SET `count` ='{$c}' WHERE `fid` ='" . $rs[$i]['fid'] . "' LIMIT 1 ");
         }
     }
     if ($_POST['Re-Tag-Count']) {
         include_once iPATH . 'include/forum.class.php';
         $rs = iCMS_DB::getArray("SELECT id FROM `#iCMS@__tags`");
         $_count = count($rs);
         for ($i = 0; $i < $_count; $i++) {
             $_count = iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__taglist` WHERE `tid`='" . $rs[$i]['id'] . "'");
             iCMS_DB::query("UPDATE `#iCMS@__tags` SET `count` = '{$_count}'  WHERE `id` ='" . $rs[$i]['id'] . "'");
             tags_cache($rs[$i]['id']);
         }
     }
     javascript::dialog("执行完毕!", 'url:1');
 }
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:52,代码来源:cache.mo.php

示例12: doEdit

 function doEdit()
 {
     foreach ($_POST['name'] as $id => $value) {
         iCMS_DB::query("update `#iCMS@__group` set `name`='{$value}',`order`='" . $_POST['order'][$id] . "' where `gid`='{$id}'");
     }
     if ($_POST['addnewname']) {
         iCMS_DB::query("INSERT INTO `#iCMS@__group`(`gid`,`name`,`order`,`power`,`cpower`,`type`) VALUES (NULL,'" . $_POST['addnewname'] . "','" . $_POST['addneworder'] . "','','','" . $_POST['type'] . "')");
         javascript::dialog('添加完成!', 'url:1');
         exit;
     }
     javascript::dialog('更新完成!', 'url:1');
     //_Header();
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:13,代码来源:groups.mo.php

示例13: dosave

 function dosave()
 {
     $id = (int) $_POST['id'];
     $keyword = dhtmlspecialchars($_POST['keyword']);
     $replace = preg_replace("'<p>(.*?)<\\/p>'si", '\\1', $_POST['replace']);
     if (empty($id)) {
         iCMS_DB::query("INSERT IGNORE INTO `#iCMS@__keywords`(`keyword`,`replace`,`addtime`,`status`) values ('{$keyword}','{$replace}','" . time() . "','1')");
     } else {
         iCMS_DB::query("update `#iCMS@__keywords` set `keyword`='{$keyword}',`replace`='{$replace}' where id='{$id}'");
     }
     keywords_cache();
     javascript::dialog('操作完成!', 'url:' . __SELF__ . '?mo=keywords');
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:13,代码来源:keywords.mo.php

示例14: dosetting

 function dosetting()
 {
     $gender = intval($_POST['gender']);
     $nickname = dhtmlspecialchars($_POST['nickname']);
     $info['icq'] = intval($_POST['icq']);
     $info['home'] = dhtmlspecialchars(stripslashes($_POST['home']));
     $info['year'] = intval($_POST['year']);
     $info['month'] = intval($_POST['month']);
     $info['day'] = intval($_POST['day']);
     $info['from'] = dhtmlspecialchars(stripslashes($_POST['from']));
     $info['signature'] = dhtmlspecialchars(stripslashes($_POST['signature']));
     iCMS_DB::query("UPDATE `#iCMS@__members` SET `info` = '" . addslashes(serialize($info)) . "',`nickname`='{$nickname}',`gender`='{$gender}' WHERE `uid` ='" . member::$uId . "' LIMIT 1");
     javascript::dialog("资料修改完成!");
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:14,代码来源:setting.mo.php

示例15: doSave

 function doSave()
 {
     $sortid = (int) $_POST['sortid'];
     $name = dhtmlspecialchars($_POST['name']);
     $url = dhtmlspecialchars($_POST['url']);
     $desc = dhtmlspecialchars($_POST['description']);
     $logo = dhtmlspecialchars($_POST['logo']);
     $orderNum = intval($_POST['orderNum']);
     empty($name) && javascript::alert('网站名称不能为空!');
     empty($url) && javascript::alert('网站URL不能为空!');
     strpos($url, 'http://') === false && ($url = 'http://' . $url);
     iCMS_DB::query("INSERT INTO `#iCMS@__links` (`sortid`,`name`,`logo`,`desc`,`url`,`orderNum`) VALUES ('{$sortid}','{$name}','{$logo}','{$desc}','{$url}','{$orderNum}')");
     javascript::dialog("添加完成!", 'url:' . __SELF__ . '?mo=link');
 }
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:14,代码来源:link.mo.php


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