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


PHP SiteHelpers::alert方法代码示例

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


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

示例1: postData

 public function postData()
 {
     if ($this->access['is_view'] == 0) {
         echo SiteHelpers::alert('error', Lang::get('core.note_restric'));
         die;
     }
     $sort = !is_null(Input::get('sort')) ? Input::get('sort') : $this->info['setting']['orderby'];
     $order = !is_null(Input::get('order')) ? Input::get('order') : $this->info['setting']['ordertype'];
     $filter = !is_null(Input::get('search')) ? $this->buildSearch() : '';
     $page = Input::get('page', 1);
     $params = array('page' => $page, 'limit' => !is_null(Input::get('rows')) ? filter_var(Input::get('rows'), FILTER_VALIDATE_INT) : $this->info['setting']['perpage'], 'sort' => $sort, 'order' => $order, 'params' => $filter, 'global' => isset($this->access['is_global']) ? $this->access['is_global'] : 0);
     $results = $this->model->getRows($params);
     $this->data['param'] = $params;
     $this->data['rowData'] = $results['rows'];
     $this->data['tableGrid'] = $this->info['config']['grid'];
     $this->data['tableForm'] = $this->info['config']['forms'];
     $this->data['access'] = $this->access;
     $this->data['subgrid'] = isset($this->info['config']['subgrid']) ? $this->info['config']['subgrid'] : array();
     $this->data['masterdetail'] = $this->masterDetailParam();
     // Build pagination setting
     $page = $page >= 1 && filter_var($page, FILTER_VALIDATE_INT) !== false ? $page : 1;
     $pagination = Paginator::make($results['rows'], $results['total'], $params['limit']);
     // Build Pagination
     $this->data['pagination'] = $pagination;
     // Build pager number and append current param GET
     $this->data['pager'] = $this->injectPaginate();
     // Row grid Number
     $this->data['i'] = $page * $params['limit'] - $params['limit'];
     return View::make('areportinvoices.table', $this->data);
 }
开发者ID:blackorwhite1233,项目名称:fakekinhdoanh,代码行数:30,代码来源:AreportinvoicesController.php

示例2: getIndex

 public function getIndex()
 {
     if ($this->access['is_view'] == 0) {
         return Redirect::to('')->with('message', SiteHelpers::alert('error', ' Your are not allowed to access the page '));
     }
     // Filter sort and order for query
     $sort = !is_null(Input::get('sort')) ? Input::get('sort') : '';
     $order = !is_null(Input::get('order')) ? Input::get('order') : 'asc';
     // End Filter sort and order for query
     // Filter Search for query
     $filter = !is_null(Input::get('search')) ? $this->buildSearch() : '';
     // End Filter Search for query
     $page = Input::get('page', 1);
     $params = array('page' => $page, 'limit' => !is_null(Input::get('rows')) ? filter_var(Input::get('rows'), FILTER_VALIDATE_INT) : static::$per_page, 'sort' => $sort, 'order' => $order, 'params' => $filter, 'global' => isset($this->access['is_global']) ? $this->access['is_global'] : 0);
     // Get Query
     $results = $this->model->getRows($params);
     // Build pagination setting
     $page = $page >= 1 && filter_var($page, FILTER_VALIDATE_INT) !== false ? $page : 1;
     $pagination = Paginator::make($results['rows'], $results['total'], $params['limit']);
     $this->data['rowData'] = $results['rows'];
     // Build Pagination
     $this->data['pagination'] = $pagination;
     // Build pager number and append current param GET
     $this->data['pager'] = $this->injectPaginate();
     // Row grid Number
     $this->data['i'] = $page * $params['limit'] - $params['limit'];
     // Grid Configuration
     $this->data['tableGrid'] = $this->info['config']['grid'];
     $this->data['tableForm'] = $this->info['config']['forms'];
     $this->data['colspan'] = SiteHelpers::viewColSpan($this->info['config']['grid']);
     // Group users permission
     $this->data['access'] = $this->access;
     // Render into template
     $this->layout->nest('content', 'rinvoices.index', $this->data)->with('menus', SiteHelpers::menus());
 }
开发者ID:blackorwhite1233,项目名称:fakekinhdoanh,代码行数:35,代码来源:RinvoicesController.php

示例3: getDelete

 public function getDelete($id = null)
 {
     if (!is_null($id)) {
         $id = SiteHelpers::encryptID($id, true);
         PlotModel::where('id', $id)->delete();
         return Redirect::to('plot')->with('message', SiteHelpers::alert('success', "Data deleted esuccessfully"));
     }
 }
开发者ID:alphatelradius,项目名称:histogram-tool,代码行数:8,代码来源:PlotController.php

示例4: getDelete

 public function getDelete($id = null)
 {
     if (!is_null($id)) {
         $id = SiteHelpers::encryptID($id, true);
         $del = FileModel::where('id', $id)->first();
         @unlink(public_path('uploads/' . $del->filename));
         FileModel::where('id', $id)->delete();
         return Redirect::to('files')->with('message', SiteHelpers::alert('success', "Data deleted successfully"));
     }
 }
开发者ID:alphatelradius,项目名称:histogram-tool,代码行数:10,代码来源:FilesController.php

示例5: getDestroy

 public function getDestroy()
 {
     $ids = Input::get('del');
     $i = 0;
     foreach ($ids as $id) {
         $del = FileModel::where('id', $id)->first();
         @unlink(public_path('uploads/' . $del->filename));
         FileModel::where('id', $id)->delete();
         $i++;
     }
     return Redirect::to('files')->with('message', SiteHelpers::alert('success', $i . " Data deleted successfully"));
 }
开发者ID:alphatelradius,项目名称:histogram-tool,代码行数:12,代码来源:FilesController.php

示例6: getShow

 function getShow($id = null)
 {
     if ($this->access['is_detail'] == 0) {
         return Redirect::to('')->with('message', SiteHelpers::alert('error', ' Your are not allowed to access the page '));
     }
     $ids = $id == null ? '' : SiteHelpers::encryptID($id, true);
     $row = $this->model->getRow($ids);
     if ($row) {
         $this->data['row'] = $row;
     } else {
         $this->data['row'] = $this->model->getColumnTable('tb_users');
     }
     $this->data['id'] = $id;
     $this->data['access'] = $this->access;
     $this->layout->nest('content', 'users.view', $this->data)->with('menus', $this->menus);
 }
开发者ID:buguelos,项目名称:make,代码行数:16,代码来源:UsersController.php

示例7: get_zip_content

 public static function get_zip_content($name, $zip)
 {
     $contents = '';
     if (file_exists($zip)) {
         $fp = fopen('zip://' . $zip . '#' . $name, 'r');
         if (!$fp) {
             SiteHelpers::alert("error", "cannot open zip file: {$zip}n");
         }
         while (!feof($fp)) {
             $contents .= fread($fp, 2);
         }
     } else {
         SiteHelpers::alert("error", "cannot find zip file: {$zip}n");
     }
     fclose($fp);
     return $contents;
 }
开发者ID:blackorwhite1233,项目名称:fakekinhdoanh,代码行数:17,代码来源:SximoHelpers.php

示例8: submitcontact

 function submitcontact()
 {
     $rules = array(array('field' => 'name', 'label' => ' Please Fill Name', 'rules' => 'required'), array('field' => 'email', 'label' => 'email ', 'rules' => 'required|email'), array('field' => 'message', 'label' => 'message', 'rules' => 'required'));
     $this->form_validation->set_rules($rules);
     if ($this->form_validation->run()) {
         $data = array('name' => $this->input->post('name', true), 'email' => $this->input->post('email', true), 'subject' => 'New Form Submission', 'notes' => $this->input->post('message', true));
         $message = $this->load->view('emails/contact', $data, true);
         $to = CNF_EMAIL;
         $subject = 'New Form Submission';
         $headers = 'MIME-Version: 1.0' . "\r\n";
         $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
         $headers .= 'From: ' . $this->input->post('name', true) . ' <' . $this->input->post('sender', true) . '>' . "\r\n";
         //mail($to, $subject, $message, $headers);
         $message = "Thank You , Your message has been sent !";
         $this->session->set_flashdata('message', SiteHelpers::alert('success', $message));
         redirect('contact-us', 301);
     } else {
         $message = "The following errors occurred";
         $this->session->set_flashdata(array('message' => SiteHelpers::alert('error', $message), 'errors' => validation_errors('<li>', '</li>')));
         redirect('contact-us', 301);
     }
 }
开发者ID:HRVConsultores,项目名称:elearning,代码行数:22,代码来源:page.php

示例9: postFinalpresentation

 public function postFinalpresentation()
 {
     $id_result = Input::get('id_result');
     $resulted = AutomateModel::where('id', $id_result)->first();
     //        $range_name_id = Input::get('range_name_id');
     $result = LogChartModel::where('id_result', $id_result)->get();
     $objPHPPowerPoint = new PhpPowerpoint();
     // Set properties
     //        echo date('H:i:s') . ' Set properties' . EOL;
     $objPHPPowerPoint->getProperties()->setCreator('HAT Developer')->setLastModifiedBy('HAT Developer')->setTitle('Sample 07 Title')->setSubject('Sample 07 Subject')->setDescription('Sample 07 Description')->setKeywords('office 2007 openxml libreoffice odt php')->setCategory('Sample Category');
     // Remove first slide
     //        echo date('H:i:s') . ' Remove first slide' . EOL;
     $objPHPPowerPoint->removeSlideByIndex(0);
     // Set Style
     $oFill = new Fill();
     //        $oFill->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('FFE06B20'));
     $oShadow = new Shadow();
     $oShadow->setVisible(true)->setDirection(45)->setDistance(10);
     //FIRST SLIDE
     $currentSlide = $this->createTemplatedSlide($objPHPPowerPoint);
     // local function
     // Create a shape (text)
     // Create a shape (text)
     $shape = $currentSlide->createRichTextShape();
     $shape->setHeight(600)->setWidth(930)->setOffsetX(40)->setOffsetY(300);
     $shape->getActiveParagraph()->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT)->setMarginLeft(25)->setIndent(-25);
     $shape->getActiveParagraph()->getFont()->setSize(18)->setColor(new Color('E07116'));
     //        $shape->getActiveParagraph()->getBulletStyle()->setBulletType(Bullet::TYPE_BULLET);
     $shape->createTextRun($resulted->info);
     //END OF FIRST SLIDE
     $index = 0;
     //        print_r('here'); exit();
     foreach ($result as $file) {
         //            echo $file->filename.'<br>';
         $currentSlide = $this->createTemplatedSlide($objPHPPowerPoint);
         $shape = $currentSlide->createDrawingShape();
         $shape->setName('Result Chart')->setDescription('PHPPowerPoint logo')->setPath(public_path($file->filename))->setHeight(450)->setWidth(650)->setOffsetX(100)->setOffsetY(160);
         $shape->getShadow()->setVisible(true)->setDirection(45)->setDistance(10);
         $shape = $currentSlide->createRichTextShape();
         $shape->setHeight(50)->setWidth(930)->setOffsetX(20)->setOffsetY(45);
         $shape->getActiveParagraph()->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER)->setMarginLeft(25)->setIndent(-25);
         $shape->getActiveParagraph()->getFont()->setSize(23)->setColor(new Color('D66204'));
         //        $shape->getActiveParagraph()->getBulletStyle()->setBulletType(Bullet::TYPE_BULLET);
         $title = explode(',', $file->title);
         $plot_data = PlotDataModel::where('id_plot', $file->id_plot)->get();
         $plot_name = PlotModel::where('id', $file->id_plot)->first();
         $technya = TechnologyModel::where('id', $plot_name->id_tech)->first();
         if ($technya->name == 'UMTS') {
             $shape->createTextRun(str_ireplace('ch', 'UARFCN', $title[1]) . ' Histogram');
         } else {
             if ($technya->name == 'LTE') {
                 $shape->createTextRun(str_ireplace('ch', 'LARFCN', $title[1]) . ' Histogram');
             } else {
                 $shape->createTextRun(str_ireplace('ch', 'ARFCN', $title[1]) . ' Histogram');
             }
         }
         $co = count($plot_data);
         $shape = $currentSlide->createTableShape(1);
         $shape->setWidth(150);
         $shape->setOffsetX(760);
         $shape->setOffsetY(200);
         $row = $shape->createRow();
         $row->getFill()->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('EEF0EB'))->setEndColor(new Color('EEF0EB'));
         $row->nextCell()->createTextRun($plot_name->name);
         $i = 2;
         foreach ($plot_data as $rw) {
             $row = $shape->createRow();
             if ($i % 2 == 0) {
                 $row->getFill()->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('DCEBCA'))->setEndColor(new Color('DCEBCA'));
             } else {
                 $row->getFill()->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('EEF0EB'))->setEndColor(new Color('EEF0EB'));
             }
             $row->nextCell()->createTextRun($rw->start . ' to ' . $rw->end);
             $i++;
         }
         $index++;
     }
     // Save file
     $named = date('Ymdhis_') . $this->toAscii($resulted->info);
     $this->write($objPHPPowerPoint, $named, $this->writers);
     $resultsave = AutomateModel::find($id_result);
     $resultsave->file_result = date('Y-m-d') . '/' . $named;
     $resultsave->save();
     Session::flash('message', SiteHelpers::alert('success', Lang::get('Process has completed, check the result on table bellow')));
     return Redirect::to('/automate');
 }
开发者ID:alphatelradius,项目名称:histogram-tool,代码行数:86,代码来源:AutomateController.php

示例10: postContact

 public function postContact(Request $request)
 {
     $this->beforeFilter('csrf', array('on' => 'post'));
     $rules = array('name' => 'required', 'subject' => 'required', 'message' => 'required|min:20', 'sender' => 'required|email');
     $validator = Validator::make(Input::all(), $rules);
     if ($validator->passes()) {
         $data = array('name' => $request->input('name'), 'sender' => $request->input('sender'), 'subject' => $request->input('subject'), 'notes' => $request->input('message'));
         $message = View::make('emails.contact', $data);
         $to = CNF_EMAIL;
         $subject = $request->input('subject');
         $headers = 'MIME-Version: 1.0' . "\r\n";
         $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
         $headers .= 'From: ' . $request->input('name') . ' <' . $request->input('sender') . '>' . "\r\n";
         mail($to, $subject, $message, $headers);
         return Redirect::to('?p=' . $request->input('redirect'))->with('message', \SiteHelpers::alert('success', 'Thank You , Your message has been sent !'));
     } else {
         return Redirect::to('?p=' . $request->input('redirect'))->with('message', \SiteHelpers::alert('error', 'The following errors occurred'))->withErrors($validator)->withInput();
     }
 }
开发者ID:Gadurp1,项目名称:Final-420-Project,代码行数:19,代码来源:HomeController.php

示例11: postDestroy

 public function postDestroy()
 {
     // delete multipe rows
     $data = $this->model->destroy(Input::get('id'));
     // redirect
     Session::flash('message', SiteHelpers::alert('success', Lang::get('core.note_success_delete')));
     return Redirect::to('users');
 }
开发者ID:blackorwhite1233,项目名称:fakekinhdoanh,代码行数:8,代码来源:UsersController.php

示例12: postCreate

 function postCreate(Request $request)
 {
     $rules = array('module_name' => 'required|alpha|min:2|unique:tb_module', 'module_title' => 'required', 'module_note' => 'required', 'module_db' => 'required');
     $validator = Validator::make($request->all(), $rules);
     if ($validator->passes()) {
         $table = $request->input('module_db');
         $primary = self::findPrimarykey($request->input('module_db'));
         $select = $request->input('sql_select');
         $where = $request->input('sql_where');
         $group = $request->input('sql_group');
         if ($request->input('creation') == 'manual') {
             if ($where == "") {
                 return Redirect::to('sximo/module/create')->withErrors($validator)->withInput()->with('messagetext', "SQL WHERE REQUIRED")->with('msgstatus', 'error');
             }
             try {
                 \DB::select($select . ' ' . $where . ' ' . $group);
             } catch (Exception $e) {
                 // Do something when query fails.
                 $error = 'Error : ' . $select . ' ' . $where . ' ' . $group;
                 return Redirect::to('sximo/module/create')->withErrors($validator)->withInput()->with('messagetext', SiteHelpers::alert('error', $error))->with('msgstatus', 'error');
             }
             $columns = array();
             $results = $this->model->getColoumnInfo($select . ' ' . $where . ' ' . $group);
             $primary_exits = '';
             foreach ($results as $r) {
                 $Key = isset($r['flags'][1]) && $r['flags'][1] == 'primary_key' ? 'PRI' : '';
                 if ($Key != '') {
                     $primary_exits = $r['name'];
                 }
                 $columns[] = (object) array('Field' => $r['name'], 'Table' => $r['table'], 'Type' => $r['native_type'], 'Key' => $Key);
             }
             $primary = $primary_exits != '' ? $primary_exits : '';
         } else {
             $columns = \DB::select("SHOW COLUMNS FROM " . $request->input('module_db'));
             $select = " SELECT {$table}.* FROM {$table} ";
             $where = " WHERE " . $table . "." . $primary . " IS NOT NULL";
             if ($primary != '') {
                 $where = " WHERE " . $table . "." . $primary . " IS NOT NULL";
             } else {
                 $where = '';
             }
         }
         //    echo '<pre>'; print_r($columns); echo '</pre>';    exit;
         $i = 0;
         $rowGrid = array();
         $rowForm = array();
         foreach ($columns as $column) {
             if (!isset($column->Table)) {
                 $column->Table = $table;
             }
             if ($column->Key == 'PRI') {
                 $column->Type = 'hidden';
             }
             if ($column->Table == $table) {
                 $form_creator = self::configForm($column->Field, $column->Table, $column->Type, $i);
                 $relation = self::buildRelation($table, $column->Field);
                 foreach ($relation as $row) {
                     $array = array('external', $row['table'], $row['column']);
                     $form_creator = self::configForm($column->Field, $table, 'select', $i, $array);
                 }
                 $rowForm[] = $form_creator;
             }
             $rowGrid[] = self::configGrid($column->Field, $column->Table, $column->Type, $i);
             $i++;
         }
         $json_data['sql_select'] = $select;
         $json_data['sql_where'] = $where;
         $json_data['sql_group'] = $group;
         $json_data['table_db'] = $table;
         $json_data['primary_key'] = $primary;
         $json_data['grid'] = $rowGrid;
         $json_data['forms'] = $rowForm;
         $data = array('module_name' => strtolower(trim($request->input('module_name'))), 'module_title' => $request->input('module_title'), 'module_note' => $request->input('module_note'), 'module_db' => $request->input('module_db'), 'module_db_key' => $primary, 'module_type' => $request->input('module_template'), 'module_created' => date("Y-m-d H:i:s"), 'module_config' => \SiteHelpers::CF_encode_json($json_data));
         \DB::table('tb_module')->insert($data);
         // Add Default permission
         $tasks = array('is_global' => 'Global', 'is_view' => 'View ', 'is_detail' => 'Detail', 'is_add' => 'Add ', 'is_edit' => 'Edit ', 'is_remove' => 'Remove ', 'is_excel' => 'Excel ');
         $groups = \DB::table('tb_groups')->get();
         $row = \DB::table('tb_module')->where('module_name', $request->input('module_name'))->get();
         if (count($row) >= 1) {
             $id = $row[0];
             foreach ($groups as $g) {
                 $arr = array();
                 foreach ($tasks as $t => $v) {
                     if ($g->group_id == '1') {
                         $arr[$t] = '1';
                     } else {
                         $arr[$t] = '0';
                     }
                 }
                 $data = array("access_data" => json_encode($arr), "module_id" => $id->module_id, "group_id" => $g->group_id);
                 \DB::table('tb_groups_access')->insert($data);
             }
             return Redirect::to('sximo/module/rebuild/' . $id->module_id);
         } else {
             return Redirect::to('sximo/module');
         }
     } else {
         return Redirect::to('sximo/module/create')->with('messagetext', 'The following errors occurred')->with('msgstatus', 'error')->withErrors($validator)->withInput();
     }
 }
开发者ID:alvarobfdev,项目名称:applog,代码行数:100,代码来源:ModuleController.php

示例13: destroy

 function destroy($id = null)
 {
     $row = $this->db->get_where('tb_module', array('module_id' => $id))->row();
     if (count($row) <= 0) {
         redirect('sximo/module', 301);
     }
     $path = $row->module_name;
     $class = ucwords($row->module_name);
     if ($row->module_type != 'core') {
         if ($class != '') {
             $this->db->where('module_id', $row->module_id);
             $this->db->delete('tb_module');
             $this->db->where('module_id', $row->module_id);
             $this->db->delete('tb_groups_access');
             if (file_exists("application/controllers/{$class}.php")) {
                 unlink("application/controllers/{$class}.php");
             }
             if (file_exists("application/models/{$class}model.php")) {
                 unlink("application/models/{$class}model.php");
             }
             self::removeDir("application/views/{$path}");
             $this->session->set_flashdata('message', SiteHelpers::alert('success', 'Module has been removed successfull'));
             redirect('sximo/module', 301);
         }
     }
     $this->session->set_flashdata('message', SiteHelpers::alert('error', 'No Module removed'));
     redirect('sximo/module', 301);
 }
开发者ID:HRVConsultores,项目名称:elearning,代码行数:28,代码来源:module.php

示例14: postDestroy

 public function postDestroy()
 {
     if ($this->access['is_remove'] == 0) {
         return Redirect::to('')->with('message', SiteHelpers::alert('error', Lang::get('core.note_restric')));
     }
     // delete multipe rows
     //$this->model->destroy(Input::get('id'));
     $this->inputLogs("ID : " . implode(",", Input::get('id')) . Lang::get('core.note_success_delete'));
     foreach (Input::get('id') as $idpro) {
         $data_pro = $this->model->getRow($idpro);
         $images = DB::table('images_product')->where('id_product', $idpro)->get();
         @unlink(ROOT . '/uploads/products/' . $data_pro->image);
         @unlink(ROOT . '/uploads/products/thumb/' . $data_pro->image);
         foreach ($images as $image) {
             @unlink(ROOT . '/uploads/images_product/' . $image->name);
             @unlink(ROOT . '/uploads/images_product/thumb/' . $image->name);
         }
         $images = DB::table('images_product')->where('id_product', $idpro)->delete();
     }
     // redirect
     Session::flash('message', SiteHelpers::alert('success', Lang::get('core.note_success_delete')));
     return Redirect::to('Nproducts?md=' . Input::get('md'));
 }
开发者ID:blackorwhite1233,项目名称:fakekinhdoanh,代码行数:23,代码来源:NproductsController.php

示例15: postContact

 public function postContact(Request $request)
 {
     $rules = array('name' => 'required|min:2', 'email_id' => 'required|email', 'message' => 'required|min:5');
     $validator = Validator::make($request->all(), $rules);
     if ($validator->passes()) {
         $contact = new contactus();
         $contact->name = $request->input('name');
         $contact->email_id = $request->input('email_id');
         $contact->message = $request->input('message');
         $contact->save();
         return Redirect::to('/contact')->with('message', \SiteHelpers::alert('success', 'Thank you for contacting us'));
     } else {
         return Redirect::to('/contact')->with('message', \SiteHelpers::alert('error', 'The following errors occurred'))->withErrors($validator)->withInput();
     }
 }
开发者ID:Yashwanth1,项目名称:aregudam,代码行数:15,代码来源:LoginController.php


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