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


PHP Tool::alertBack方法代码示例

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


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

示例1: upload

 public function upload()
 {
     if (isset($_FILES['userfile']['tmp_name'])) {
         switch ($_POST['type']) {
             case 'face':
                 $width = 99;
                 $height = 100;
                 $info = '头像上传成功';
                 break;
             case 'ok':
                 $width = 300;
                 $height = 300;
                 $info = '图片上传成功';
                 break;
             case 'rotator':
                 $width = 1200;
                 $height = 530;
                 $info = '轮播器图片上传成功';
                 break;
             default:
                 exit('非法操作');
         }
         $upload = new UploadFile('userfile', $_POST['MAX_FILE_SIZE']);
         $path = $upload->getPath();
         $thumb = new Image($path);
         $thumb->thumb($width, $height);
         $thumb->outImage();
         $upload->alertThumbClose($info, $path);
     } else {
         Tool::alertBack('警告:未知错误');
     }
 }
开发者ID:zhendeguoke1008,项目名称:shop-1,代码行数:32,代码来源:CallAction.class.php

示例2: Action

 public function Action()
 {
     switch ($_GET['action']) {
         case 'login':
             if (isset($_POST['send'])) {
                 if (!Validate::Check_Length($_POST['code'], 4, 'equals')) {
                     Tool::alertBack('验证码必须为四位');
                 }
                 if (!Validate::Check_Equals($_POST['code'], strtolower($_SESSION['code']))) {
                     Tool::alertBack('验证码不正确');
                 }
                 $object = $this->model->Manage_Login();
                 if (!Validate::Check_Null($object)) {
                     $_SESSION['admin']['username'] = $object->username;
                     //生成session
                     $_SESSION['admin']['level_position'] = $object->level_position;
                     $this->model->Login_Count();
                     Tool::alertLocation(null, 'admin.php');
                 } else {
                     Tool::alertBack('用户名或者密码错误,请重新输入');
                 }
             }
             break;
         case 'logout':
             if (session_start()) {
                 session_destroy();
             }
             Tool::alertLocation(null, 'admin_login.php');
             break;
     }
 }
开发者ID:hachi-zzq,项目名称:guest-cms,代码行数:31,代码来源:LoginAction.class.php

示例3: delete

 private function delete()
 {
     if (isset($_GET['id'])) {
         $this->_model->id = $_GET['id'];
         $this->_model->deleteComment() ? Tool::alertLocation('Succeed', PREV_URL) : Tool::alertBack('Fail');
     } else {
         Tool::alertBack("illegal operation");
     }
 }
开发者ID:e0zhao02,项目名称:sample_code,代码行数:9,代码来源:CommentAction.class.php

示例4: add

 private function add()
 {
     if (isset($_POST['send'])) {
         $this->_model->userInfo = $_POST['user_info'];
         echo $this->_model->addModule();
         exit;
     } else {
         Tool::alertBack('非法操作!');
     }
 }
开发者ID:Cyc429170296,项目名称:webName,代码行数:10,代码来源:ModuleAction.class.php

示例5: Delete_Level

 public function Delete_Level()
 {
     $this->id = $_GET['id'];
     $sql_delete = "delete from manage_level where id='{$this->id}' limit 1";
     $affected_rows = parent::add_up_de($sql_delete);
     if ($affected_rows == 1) {
         Tool::alertLocation('删除成功', 'level.php?action=show');
     } else {
         Tool::alertBack('删除失败');
     }
 }
开发者ID:hachi-zzq,项目名称:guest-cms,代码行数:11,代码来源:LevelModel.class.php

示例6: add

 private function add()
 {
     if (@$_POST['send'] == '新增管理员') {
         $this->_model->admin_user = $_POST['admin_user'];
         $this->_model->admin_pass = sha1($_POST['admin_pass']);
         $this->_model->level = $_POST['level'];
         $this->_model->addManage() ? Tool::alertLocation('添加成功', 'manage.php?action=list') : Tool::alertBack('添加失败');
     }
     $this->_tpl->assign('add', true);
     $this->_tpl->assign('title', '新增管理员');
 }
开发者ID:Under-soil,项目名称:gitcms,代码行数:11,代码来源:ManageAction.class.php

示例7: Agree

 private function Agree()
 {
     if (isset($_GET['id'])) {
         $this->model->id = $_GET['id'];
         if ($this->model->Agree()) {
             Tool::alertLocation(null, PREV_URL);
         }
     } else {
         Tool::alertBack('非法操作');
     }
 }
开发者ID:hachi-zzq,项目名称:guest-cms,代码行数:11,代码来源:CommentAction.class.php

示例8: _action

 public function _action()
 {
     if ($_GET['action'] == 'delcache') {
         if (strstr($_SESSION['admin']['premission'], '2')) {
             $this->delCache();
         } else {
             Tool::alertBack('警告:权限不足,您不能清理缓存!');
         }
     }
     $this->cacheNum();
 }
开发者ID:denson7,项目名称:phpstudy,代码行数:11,代码来源:MainAction.class.php

示例9: delete

 private function delete()
 {
     if (isset($_GET['id'])) {
         $this->_model->id = $_GET['id'];
         $_manage = new ManageModel();
         $_manage->level = $this->_model->id;
         if ($_manage->getOneManage()) {
             Tool::alertBack('this level could not be deleted. please delete user first');
         }
         $this->_model->deleteLevel() ? Tool::alertLocation('Succeed', PREV_URL) : Tool::alertBack('Fail');
     } else {
         Tool::alertBack("illegal operation");
     }
 }
开发者ID:e0zhao02,项目名称:sample_code,代码行数:14,代码来源:LevelAction.class.php

示例10: Action

 public function Action()
 {
     global $templates;
     switch ($_GET['action']) {
         case 'show':
             $templates->assgin('title', '等级列表');
             $templates->assgin('show', true);
             $all_level = $this->model->Get_ALL_Level();
             $templates->assgin('ALL_Level', $all_level);
             break;
         case 'update':
             if (isset($_GET['id'])) {
                 $templates->assgin('title', '修改等级');
                 $templates->assgin('update', true);
                 $object = $this->model->Get_One_Level();
                 $templates->assgin('level_position', $object->level_position);
                 $templates->assgin('id', $object->id);
                 $templates->assgin('level_info', $object->level_info);
                 if ($_POST['send'] == '修改等级') {
                     $this->model->Update_Level();
                 }
             }
             break;
         case 'add':
             $templates->assgin('title', '新增等级');
             $templates->assgin('add', true);
             if ($_POST['send'] == '新增等级') {
                 if ($this->model->Get_One_Level()) {
                     Tool::alertBack('等级名称已经存在');
                 }
                 $this->model->Add_Level();
             }
             break;
         case 'delete':
             $templates->assgin('title', '删除等级');
             $templates->assgin('delete', true);
             if ($_GET['action'] == 'delete') {
                 //在删除等级之前,首先进行验证,如果这个等级有管理员在,则不允许删除这个等级
                 if ($this->model->Date_Exist()) {
                     Tool::alertBack('这个等级有管理员存在,请先删除这个管理员');
                 }
                 $this->model->Delete_Level();
             }
             break;
         default:
             echo '非法操作';
             break;
     }
 }
开发者ID:hachi-zzq,项目名称:guest-cms,代码行数:49,代码来源:LevelAction.class.php

示例11: setCount

 private function setCount()
 {
     if (isset($_GET['cid']) && isset($_GET['id']) && isset($_GET['type'])) {
         parent::__construct($this->_tpl, new CommentModel());
         $this->_model->id = $_GET['id'];
         if (!$this->_model->getOneComment()) {
             Tool::alertBack('this comment not existing');
         }
         if ($_GET['type'] == 'sustain') {
             $this->_model->setSustain() ? Tool::alertLocation('succeed', 'feedback.php?cid=' . $_GET['cid']) : Tool::alertLocation('fail', 'feedback.php?cid=' . $_GET['cid']);
         }
         if ($_GET['type'] == 'oppose') {
             $this->_model->setOppose() ? Tool::alertLocation('succeed', 'feedback.php?cid=' . $_GET['cid']) : Tool::alertLocation('fail', 'feedback.php?cid=' . $_GET['cid']);
         }
     }
 }
开发者ID:e0zhao02,项目名称:sample_code,代码行数:16,代码来源:FeedBackAction.class.php

示例12: ckeUp

 public function ckeUp()
 {
     if (isset($_GET['type'])) {
         //查看了源代码,他的名称是:upload
         $_fileupload = new FileUpload('upload', $_POST['MAX_FILE_SIZE']);
         $_ckefn = $_GET['CKEditorFuncNum'];
         $_path = $_fileupload->getPath();
         $_img = new Image($_path);
         $_img->ckeImg(650, 0);
         $_img->out();
         echo "<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction({$_ckefn},\".{$_path}\",'图片上传成功!');</script>";
         exit;
     } else {
         Tool::alertBack('警告:由于非法操作导致上传失败!');
     }
 }
开发者ID:yjf0503,项目名称:Mall,代码行数:16,代码来源:CallAction.class.php

示例13: checkLength

 public static function checkLength($str, $length, $flag)
 {
     if ($flag == 'min') {
         return mb_strlen($str, 'utf-8') < $length ? true : false;
     } else {
         if ($flag == 'max') {
             return mb_strlen($str, 'utf-8') > $length ? true : false;
         } else {
             if ($flag == 'equal') {
                 return mb_strlen(trim($str)) == $length ? false : true;
             } else {
                 Tool::alertBack('长度传值有误!');
             }
         }
     }
 }
开发者ID:denglitong,项目名称:mvc,代码行数:16,代码来源:Validate.class.php

示例14: Get_List_Nav

 private function Get_List_Nav()
 {
     if (isset($_GET['id'])) {
         global $templates;
         $model = new NavModel();
         $object = $model->Get_One_Nav();
         $child_object = $model->selectchildNav_nolimit();
         $templates->assgin('nav_name', $object->name);
         $templates->assgin('nav_id', $object->id);
         $templates->assgin('child_nav', $child_object);
         $par_object = $model->Get_Parnav();
         $templates->assgin('par_name', $par_object->name);
         $templates->assgin('par_id', $par_object->id);
     } else {
         Tool::alertBack('此导航不存在');
     }
 }
开发者ID:hachi-zzq,项目名称:guest-cms,代码行数:17,代码来源:ListAction.class.php

示例15: getFromImg

 private function getFromImg($_file, $_type)
 {
     switch ($_type) {
         case 1:
             $img = imagecreatefromgif($_file);
             break;
         case 2:
             $img = imagecreatefromjpeg($_file);
             break;
         case 3:
             $img = imagecreatefrompng($_file);
             break;
         default:
             Tool::alertBack('this image type not supported');
     }
     return $img;
 }
开发者ID:e0zhao02,项目名称:sample_code,代码行数:17,代码来源:Image.class.php


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