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


PHP Tool::alert方法代码示例

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


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

示例1: config

 public function config()
 {
     $model = new AttributesModel();
     if (isset($_POST['send'])) {
         if ($_POST['schoolType'] == '_placeHolder') {
             Tool::alertBackNoRefresh('请选择学校类型');
             return;
         }
         $sheetNumArr = explode('-', $_POST['dataSheetNum']);
         foreach ($sheetNumArr as $key => &$sheetNum) {
             if (trim($sheetNum)) {
                 $sheetNum = trim($sheetNum) - 1;
             } else {
                 unset($sheetNumArr[$key]);
             }
         }
         if (!count($sheetNumArr)) {
             Tool::alertBackNoRefresh('请配置 Excel中体测数据工作表序号');
             return;
         }
         foreach ($_POST as $column => $attributeName) {
             $model->{$column} = $attributeName;
         }
         if ($model->save()) {
             Tool::alert('上传文件格式设置成功成功:)');
         } else {
             Tool::alert('很遗憾文件格式设置失败:(');
         }
     }
     $this->render('data/config', array('attributes' => $model->getAttributes(), 'config' => $model->getConfig(), 'schoolArr' => array(0 => '大学', 1 => '高中', 2 => '初中', 3 => '小学'), 'beginRowArr' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), 'columnAArr_1' => array('A' => 'column1', 'B' => 'column2', 'C' => 'column3', 'D' => 'column4', 'E' => 'column5', 'F' => 'column6', 'G' => 'column7', 'H' => 'column8', 'I' => 'column9', 'J' => 'column10', 'K' => 'column11', 'L' => 'column12', 'M' => 'column13', 'N' => 'column14', 'O' => 'column15', 'P' => 'column16', 'Q' => 'column17', 'R' => 'column18', 'S' => 'column19', 'T' => 'column20', 'U' => 'column21', 'V' => 'column22', 'W' => 'column23', 'X' => 'column24', 'Y' => 'column25', 'Z' => 'column26'), 'columnAArr_2' => array('AA' => 'column27', 'AB' => 'column28', 'AC' => 'column29', 'AD' => 'column30', 'AE' => 'column31', 'AF' => 'column32', 'AG' => 'column33', 'AH' => 'column34', 'AI' => 'column35', 'AJ' => 'column36', 'AK' => 'column37', 'AL' => 'column38', 'AM' => 'column39', 'AN' => 'column40', 'AO' => 'column41', 'AP' => 'column42', 'AQ' => 'column43', 'AR' => 'column44', 'AS' => 'column45', 'AT' => 'column46', 'AU' => 'column47', 'AV' => 'column48', 'AW' => 'column49', 'AX' => 'column50', 'AY' => 'column51', 'AZ' => 'column52'), 'columnBArr' => array('BA' => 'column53', 'BB' => 'column54', 'BC' => 'column55', 'BD' => 'column56', 'BE' => 'column57'), 'collorArr' => array('stuId' => 'style="color: #fb3838"', 'stuName' => 'style="color: #fb3838"', 'sex' => 'style="color: #fb3838"', 'height' => 'style="color: #fb3838"', 'weight' => 'style="color: #fb3838"', 'BMIMark' => 'style="color: #f7883a"', 'BMIScore' => 'style="color: #f7883a"', 'BMIGrade' => 'style="color: #f7883a"', 'FVCMark' => 'style="color: #308430"', 'FVCScore' => 'style="color: #308430"', 'FVCGrade' => 'style="color: #308430"', '_50mMark' => 'style="color: #385ad3"', '_50mScore' => 'style="color: #385ad3"', '_50mGrade' => 'style="color: #385ad3"', 'SLJMark' => 'style="color: #800080"', 'SLJScore' => 'style="color: #800080"', 'SLJGrade' => 'style="color: #800080"', 'SARMark' => 'style="color: #fb3838"', 'SARScore' => 'style="color: #fb3838"', 'SARGrade' => 'style="color: #fb3838"', '_800mMark' => 'style="color: #f7883a"', '_800mScore' => 'style="color: #f7883a"', '_800mAdditionalScore' => 'style="color: #f7883a"', '_800mGrade' => 'style="color: #f7883a"', '_1000mMark' => 'style="color: #308430"', '_1000mScore' => 'style="color: #308430"', '_1000mAdditionalScore' => 'style="color: #308430"', '_1000mGrade' => 'style="color: #308430"', 'SitUpsMark' => 'style="color: #385ad3"', 'SitUpsScore' => 'style="color: #385ad3"', 'SitUpsAdditionalScore' => 'style="color: #385ad3"', 'SitUpsGrade' => 'style="color: #385ad3"', 'ChinUpMark' => 'style="color: #f7883a"', 'ChinUpScore' => 'style="color: #f7883a"', 'ChinUpAdditionalScore' => 'style="color: #f7883a"', 'ChinUpGrade' => 'style="color: #f7883a"', 'ropeSkippingMark' => 'style="color: #fb3838"', 'ropeSkippingScore' => 'style="color: #fb3838"', 'ropeSkippingAdditionalScore' => 'style="color: #fb3838"', 'ropeSkippingGrade' => 'style="color: #fb3838"', '_400mMark' => 'style="color: #800080"', '_400mScore' => 'style="color: #800080"', '_400mAdditionalScore' => 'style="color: #800080"', '_400mGrade' => 'style="color: #800080"', 'standardPoints' => 'style="color: #308430"', 'additionalPoints' => 'style="color: #308430"', 'SumUpScore' => 'style="color: #308430"', 'SumUpGrade' => 'style="color: #308430"')));
 }
开发者ID:denglitong,项目名称:tice,代码行数:31,代码来源:DataController.class.php

示例2: resetPasswd

 public function resetPasswd()
 {
     parent::checkAdmin();
     if (isset($_POST['send'])) {
         $model = new AdminModel();
         $model->oldPassword = sha1(trim($_POST['oldPassword']));
         $model->password = sha1(trim($_POST['password']));
         if ($model->resetPasswd()) {
             Tool::alert('密码修改成功');
         } else {
             Tool::alertBackNoRefresh('原密码不正确或密码修改失败:(');
         }
     }
     $this->render('default/resetPasswd');
 }
开发者ID:denglitong,项目名称:tice,代码行数:15,代码来源:DefaultController.class.php

示例3: checkType

 private function checkType()
 {
     if (!in_array($this->type, $this->typeArr)) {
         Tool::alert('警告,不合法的上传类型');
         $this->flag = false;
     }
 }
开发者ID:hanfengtianyasmile,项目名称:hfphp,代码行数:7,代码来源:FileUpload.class.php

示例4: 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::alert('警告:此图片类型本系统不支持!');
             break;
     }
     return $img;
 }
开发者ID:hanfengtianyasmile,项目名称:hfphp2.0,代码行数:18,代码来源:Image.class.php

示例5: resetPasswd

 public function resetPasswd()
 {
     parent::checkLogin();
     if (isset($_POST['send'])) {
         $model = new UserModel();
         $model->stuId = $_SESSION['ticeStuId'];
         $model->oldPassword = sha1(trim($_POST['oldPassword']));
         $model->password = sha1(trim($_POST['password']));
         if ($model->resetPasswd()) {
             Tool::alert('密码修改成功');
         } else {
             Tool::alertBackNoRefresh('原密码不正确或密码修改失败:(');
         }
     }
     $this->render('site/resetPasswd');
 }
开发者ID:denglitong,项目名称:tice,代码行数:16,代码来源:SiteController.class.php


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