예제 #1
0
 public function run()
 {
     $columnsParameters = array(array('dbField' => 'SupportDiscussionsEntity.idObjet', 'dtField' => 'objet', 'formatter' => function ($d, $row) {
         return \SupportObjetsHelper::getLibelle($d);
     }), array('dbField' => 'AdminsEntity.name', 'dtField' => 'compte', 'formatter' => function ($d, $row) {
         if ($this->isAdmin) {
             return $row["user"];
         } else {
             return $d;
         }
     }), array('dbField' => 'AccountEntityUser.login', 'dtField' => 'user'), array('dbField' => 'SupportDiscussionsEntity.date', 'dtField' => 'date', 'formatter' => function ($d, $row) {
         return \DateTimeHelper::dateTimeToFormatedString($d, "d/m/Y");
     }), array('dbField' => 'SupportDiscussionsEntity.dateDernierMessage', 'dtField' => 'lastMessage', 'formatter' => function ($d, $row) {
         $firstDate = date("Y-m-d");
         $secondDate = $d->format('Y-m-d');
         if ($firstDate == $secondDate) {
             return \DateTimeHelper::dateTimeToFormatedString($d, "H:i:s");
         } else {
             return \DateTimeHelper::dateTimeToFormatedString($d);
         }
     }), array('dbField' => 'SupportMessagesEntity.id', 'dtField' => 'nonLuInDiscussion', 'formatter' => function ($d, $row) {
         if ($d === null) {
             return "";
         } else {
             return "lineGreen";
         }
     }), array('dbField' => 'SupportDiscussionsEntity.id', 'dtField' => 'actions', 'formatter' => function ($d, $row) {
         $varButton = '<a class="btn btn-material btn-primary btn-sm" onclick="DiscussionOpen(\'' . \Encryption::encrypt($d) . '\')"><i class="material-icons md-icon-message"></i></a>';
         $varButton .= '<a class="btn btn-material btn-warning btn-sm" onclick="DiscussionArchivage(\'' . \Encryption::encrypt($d) . '\', 1)"><i class="material-icons md-icon-archive"></i></a>';
         return '<div class="btn-toolbar">' . $varButton . "</div>";
     }));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Site\\Entity\\SupportDiscussions", "SupportDiscussionsEntity")->innerJoin("\\Site\\Entity\\Admins", "AdminsEntity", "WITH", "AdminsEntity.idCompte = SupportDiscussionsEntity.idAdmin")->leftJoin("\\Account\\Entity\\Account", "AccountEntityUser", "WITH", "AccountEntityUser.id = SupportDiscussionsEntity.idCompte")->leftJoin("\\Site\\Entity\\SupportMessages", "SupportMessagesEntity", "WITH", "SupportMessagesEntity.idDiscussion = SupportDiscussionsEntity.id AND SupportMessagesEntity.etat = " . \SupportEtatMessageHelper::NON_LU . " AND SupportMessagesEntity.idCompte != " . $this->objAccount->getId() . "")->andWhere("SupportDiscussionsEntity.idCompte = " . $this->objAccount->getId() . " OR SupportDiscussionsEntity.idAdmin = " . $this->objAccount->getId() . "")->andWhere("SupportDiscussionsEntity.estArchive = 0")->groupBy("SupportDiscussionsEntity.id");
     $datatable->getResult()->toJson();
 }
 public function run()
 {
     $columnsParameters = array(array('dbField' => 'ItemshopEntity.nameItem', 'dtField' => 'article'), array('dbField' => 'ItemshopEntity.nbItem', 'dtField' => 'nombre', 'formatter' => function ($d, $row) {
         if ($row["type"] == "2") {
             if ($d == 9999) {
                 return "A vie";
             } else {
                 return $d . " jours";
             }
         } else {
             return $d;
         }
     }), array('dbField' => 'ItemshopCategoriesEntity.nom', 'dtField' => 'categorie'), array('dbField' => 'ItemshopEntity.prix', 'filterLevel' => 'strict', 'dtField' => 'prix', 'formatter' => function ($d, $row) {
         if ($row["type"] == "1") {
             return number_format($d, 0, ",", " ") . " <span style='position: relative; top:3px;'>" . \FonctionsUtiles::findIconDevise(\DeviseHelper::CASH) . "</span>";
         } elseif ($row["type"] == "2") {
             return number_format($d, 0, ",", " ") . " <span style='position: relative; top:3px;'>" . \FonctionsUtiles::findIconDevise(\DeviseHelper::CASH) . "</span>";
         } elseif ($row["type"] == "3") {
             return number_format($d, 0, ",", " ") . " <span style='position: relative; top:3px;'>" . \FonctionsUtiles::findIconDevise(\DeviseHelper::MILEAGE);
         }
     }), array('dbField' => 'ItemshopEntity.type', 'dtField' => 'type'), array('dbField' => 'ItemshopEntity.estImportant', 'dtField' => 'estImportant', 'formatter' => function ($d, $row) {
         if ($d == 1) {
             return "important";
         } else {
             return "";
         }
     }), array('dbField' => 'ItemshopEntity.id', 'dtField' => 'actions', 'formatter' => function ($d, $row) {
         $varButton = '<a class="btn btn-material btn-primary btn-sm" data-featherlight="ajax" href="pages/Admin/modules/GererItemShop/GererItemShopArticlesEdit.php?mode=mod&idArticle=' . $d . '"><i class="material-icons md-icon-edit"></i></a>';
         $varButton .= '<a class="btn btn-material btn-danger btn-sm" onclick="SuppressionArticle(' . $d . ')"><i class="material-icons md-icon-delete"></i></a>';
         return '<div class="btn-toolbar">' . $varButton . "</div>";
     }));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Site\\Entity\\Itemshop", "ItemshopEntity")->leftJoin("\\Site\\Entity\\ItemshopCategories", "ItemshopCategoriesEntity", "WITH", "ItemshopCategoriesEntity.id = ItemshopEntity.cat");
     $datatable->getResult()->toJson();
 }
예제 #3
0
 function ver($id = NULL)
 {
     $this->rapyd->load("datatable");
     $table = new DataTable(null);
     $table->cell_attributes = 'style="vertical-align:middle;"';
     $select = array("envia", "mensaje", "recibe");
     $table->db->select($select);
     $table->db->from("muro");
     $table->db->where("recibe='Todos'");
     $table->db->orderby("codigo DESC");
     $table->per_row = 1;
     $table->per_page = 20;
     $table->cell_template = "<div class='marco1' ><#mensaje#><br><b class='mininegro'>Usuario: <#envia#></b></div><br>";
     $table->build();
     if ($this->datasis->login()) {
         $prop = array('type' => 'button', 'value' => 'Agregar', 'name' => 'mas', 'onclick' => "javascript:window.location='" . site_url("supervisor/noticias/dataedit/create") . "'");
         $form = form_input($prop);
     } else {
         $form = '';
     }
     $data['content'] = $table->output . $form;
     $data["head"] = $this->rapyd->get_head() . style('marcos.css') . style('estilos.css');
     $data['title'] = " Noticias ";
     $this->load->view('view_ventanas', $data);
 }
예제 #4
0
 public function dataTable()
 {
     $data = DBproxy::getProcedure('Manage')->setDimension(2)->getPeiSongList();
     Doo::loadClassAt('html/DataTable', 'default');
     Doo::loadClassAt('html/DooFormExt', 'default');
     $dt = new DataTable();
     function table_button($row, $rowData, $val)
     {
         $a = ' <a class="btn blue-stripe mini" href="' . PeiSongController::$modUrl . $rowData['id'] . '">' . '编辑</a>';
         $a .= ' <a class="red-stripe btn mini js-datatable-del" href="' . PeiSongController::$delUrl . $rowData['id'] . '" >删除</a>';
         return $a;
     }
     function table_city($row, $rowData, $val)
     {
         $a = PeiSongController::$cityArr[$rowData['cityid']]['name'];
         return $a;
     }
     // 表头
     $header = array('cityid' => array('name' => '城市', 'callback' => 'table_city'), 'shopname' => array('name' => '店名'), 'shopNamePhone' => array('name' => '店长电话'), 'peisongPhone' => array('name' => '配送间电话'), 'action' => array('name' => '操作', 'callback' => 'table_button'));
     $form = new DooFormExt(array('method' => 'get', 'renderFormat' => 'html', 'action' => '', 'attributes' => array('id' => 'js-get-form', 'class' => 'form-horizontal'), 'elements' => array('add' => array('display', array('left' => ' ', 'hide-label' => true, 'div' => false, 'content' => '<a href="' . PeiSongController::$addUrl . '" class="btn green-stripe"><i class="icon-plus"></i>添加</a>', 'attributes' => array('class' => "m-wrap"))))));
     // 生产表格
     $content = $dt->setTitle('')->setAttr(array('class' => 'table table-hover', 'id' => 'js-queryTable'))->setHeader($header)->setData($data)->setTopContent($form->render())->setDefaultValue('unkown')->render(false);
     // 显示模版
     $this->contentlayoutRender($content);
 }
예제 #5
0
 public function run()
 {
     $columnsParameters = array(array('dbField' => 'AccountEntity.login', 'dtField' => 'compte'), array('dbField' => 'PlayerIndexEntity.empire', 'filterLevel' => 'strict', 'dtField' => 'empire', 'formatter' => function ($d, $row) {
         return \FonctionsUtiles::findIconEmpire($d);
     }), array('dbField' => ['PlayerEntity1.name', 'PlayerEntity2.name', 'PlayerEntity3.name', 'PlayerEntity4.name'], 'dbSortReplaceField' => ["PlayerEntity1.name" => "PlayerEntity2.name", "PlayerEntity2.name" => "PlayerEntity3.name", "PlayerEntity3.name" => "PlayerEntity4.name", "PlayerEntity4.name" => "PlayerEntity1.name"], 'dbConcatSeparator' => "|VAMOS|", 'dtField' => 'names', 'formatter' => function ($d, $row) {
         $arrReturn = array_unique(explode("|VAMOS|", $d));
         return implode(", ", $arrReturn);
     }), array('dbField' => 'BannissementsActifsEntity.raisonBannissement', 'dtField' => 'raison', 'formatter' => function ($d, $row) {
         return \BanRaisonHelper::getLibelle($d);
     }), array('dbField' => 'BannissementsActifsEntity.duree', 'filterLevel' => 'strict', 'dtField' => 'duree', 'formatter' => function ($d, $row) {
         if ($d == 999) {
             return "Définitif";
         } else {
             return \BanDureeHelper::getLibelle($d);
         }
     }), array('dbField' => 'AccountEntity.ipCreation', 'dtField' => 'ip'), array('dbField' => 'AccountEntity.id', 'dtField' => 'actions', 'formatter' => function ($d, $row) {
         if ($this->HaveTheRight(\DroitsHelper::DEBANNISSEMENT)) {
             $varButton = '<a class="btn btn-material btn-success btn-sm" onclick="SuppressionBannissement(' . $d . ')" data-tooltip="Lever"><i class="material-icons md-icon-lock-open"></i></a>';
         } else {
             $varButton = "";
         }
         return '<div class="btn-toolbar">' . $varButton . "</div>";
     }));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Account\\Entity\\Account", "AccountEntity")->leftJoin("\\Player\\Entity\\PlayerIndex", "PlayerIndexEntity", "WITH", "PlayerIndexEntity.id = AccountEntity.id")->leftJoin("\\Player\\Entity\\Player", "PlayerEntity1", "WITH", "PlayerEntity1.id = PlayerIndexEntity.pid1")->leftJoin("\\Player\\Entity\\Player", "PlayerEntity2", "WITH", "PlayerEntity2.id = PlayerIndexEntity.pid2")->leftJoin("\\Player\\Entity\\Player", "PlayerEntity3", "WITH", "PlayerEntity3.id = PlayerIndexEntity.pid3")->leftJoin("\\Player\\Entity\\Player", "PlayerEntity4", "WITH", "PlayerEntity4.id = PlayerIndexEntity.pid4")->leftJoin("\\Site\\Entity\\BannissementsActifs", "BannissementsActifsEntity", "WITH", "BannissementsActifsEntity.idCompte = AccountEntity.id")->andWhere("AccountEntity.status = '" . \StatusHelper::BANNI . "'");
     $datatable->getResult()->toJson();
 }
예제 #6
0
 function index()
 {
     $this->rapyd->load("datatable");
     $mesonero = $this->session->userdata['mesonero'];
     $table = new DataTable(null);
     $table->cell_attributes = 'style="vertical-align:middle; text-align: center;"';
     $table->db->select(array('numero', 'fecha', 'mesa', 'hora', 'mesonero'));
     $table->db->from("rfac");
     $table->db->where('tipo', 'P');
     $table->db->where('mesonero', $mesonero);
     $table->db->orderby("mesa");
     $table->per_row = 4;
     $table->per_page = $this->datasis->dameval("SELECT COUNT(*) FROM rfac WHERE tipo='P' AND mesonero='{$mesonero}'");
     $table->cell_template = '<div style="background-color: #FFFFFF;"><a href="' . site_url('hospitalidad/restaurante/modificar/<#numero#>') . '" >' . image('mesa.png', 'Agregar', array('border' => 0, 'align' => 'center')) . '</a>' . '<br><b><#mesa#></b><br> <b class="mininegro"><dbdate_to_human><#fecha#></dbdate_to_human> <#hora#></b></div>';
     $table->build();
     $link = site_url('hospitalidad/restaurante/mesa');
     $prop2 = array('type' => 'button', 'value' => 'Agregar Mesa', 'name' => 'add', 'onclick' => "javascript:window.location = '{$link}';", 'style' => 'font-size:18');
     $link = site_url('hospitalidad/restaurante/cese');
     $prop1 = array('type' => 'button', 'value' => 'Cerrar', 'name' => 'cese', 'onclick' => "javascript:window.location = '{$link}';", 'style' => 'font-size:18');
     $data['content'] = $table->output . '<br><center><p>' . form_input($prop2) . '</p><p>' . form_input($prop1) . '</p></center>';
     $data['title'] = "{$mesonero}";
     $data["head"] = script("keyboard.js") . script("prototype.js");
     $data["head"] .= script("effects.js") . style("ventanas.css") . style("restaurant.css") . $this->rapyd->get_head();
     $this->load->view('view_ventanas_sola', $data);
 }
 public function run()
 {
     if ($_GET["sEcho"] == 1) {
         exit;
     }
     $columnsParameters = array(array('dbField' => 'AccountEntity.login', 'dtField' => 'compte'), array('dbField' => 'AccountEntity.email', 'dtField' => 'email'), array('dbField' => 'AccountEntity.cash', 'dtField' => 'cash', 'formatter' => function ($d, $row) {
         return number_format($d, 0, '.', ',') . "<span style='position:relative; top:2px;'>" . \FonctionsUtiles::findIconDevise(\DeviseHelper::CASH) . "</span>";
     }), array('dbField' => 'AccountEntity.mileage', 'dtField' => 'mileage', 'formatter' => function ($d, $row) {
         return number_format($d, 0, '.', ',') . "<span style='position:relative; top:2px;'>" . \FonctionsUtiles::findIconDevise(\DeviseHelper::MILEAGE) . "</span>";
     }), array('dbField' => 'PlayerIndexEntity.empire', 'filterLevel' => 'strict', 'dtField' => 'empire', 'formatter' => function ($d, $row) {
         return \FonctionsUtiles::findIconEmpire($d);
     }), array('dbField' => 'AccountEntity.status', 'filterLevel' => 'strict', 'dtField' => 'status', 'formatter' => function ($d, $row) {
         return \FonctionsUtiles::findIconStatus($d);
     }), array('dbField' => 'AccountEntity.ipCreation', 'dtField' => 'ip'), array('dbField' => 'AccountEntity.id', 'dtField' => 'actions', 'formatter' => function ($d, $row) {
         $varButton = "";
         if ($row["status"] == \StatusHelper::ACTIF) {
             if ($this->HaveTheRight(\DroitsHelper::BANNISSEMENT)) {
                 $varButton = '<a class="btn btn-material btn-danger btn-sm" data-featherlight="ajax" href="pages/Admin/BannissementAddForm.php?idAccount=' . $d . '" data-tooltip="Bannir"><i class="material-icons md-icon-lock"></i></a>';
             }
         }
         return '<div class="btn-toolbar">' . $varButton . "</div>";
     }));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Account\\Entity\\Account", "AccountEntity")->leftJoin("\\Player\\Entity\\PlayerIndex", "PlayerIndexEntity", "WITH", "PlayerIndexEntity.id = AccountEntity.id");
     $datatable->getResult()->toJson();
 }
예제 #8
0
 public function dataTable()
 {
     Doo::loadClassAt('html/DataTable', 'default');
     $dt = new DataTable();
     function table_button($row, $rowData, $val)
     {
         $a = '<a class="btn blue-stripe mini" href="' . MapController::$modUrl . $rowData['id'] . '">' . '编辑</a>';
         $a .= ' <a href="' . MapController::$delUrl . $rowData['id'] . '" class="red-stripe btn mini js-datatable-del">删除</a>';
         return $a;
     }
     function table_status($row, $rowData, $val)
     {
         if (trim($rowData['status']) == '0') {
             $a = '<span class="label label-success">正常可用</span>';
         } else {
             $a = '<span class="label">失效';
         }
         return $a;
     }
     // 表头
     $header = array('name' => array('name' => '名称'), 'longitude' => array('name' => '经度'), 'latitude' => array('name' => '纬度'), 'status' => array('name' => '可用状态', 'callback' => 'table_status'), 'action' => array('name' => '操作', 'callback' => 'table_button'));
     $param = array('pagesize' => $this->getCurPage() . ',' . Doo::conf()->pagesize);
     $res = DBproxy::getProcedure('Manage')->setDimension(2)->getMap($param);
     // 生产表格
     $content = $dt->setTitle('')->setAttr(array('class' => 'table', 'id' => 'js-queryTable'))->setHeader($header)->setData($res['data'])->setTopContent('')->setBottomContent($this->pager($res['total']))->setDefaultValue('unkown')->render(false);
     $btn = '<a href="' . MapController::$addUrl . '" 
                 class="btn green-stripe"><i class="icon-plus"></i>' . L('添加门店') . '</a>';
     // 显示模版
     $this->contentlayoutRender($btn . $content);
 }
예제 #9
0
 public function run()
 {
     $columnsParameters = array(array('dbField' => 'AccountEntity.login', 'dtField' => 'compte'), array('dbField' => 'AdminsEntity.name', 'dtField' => 'nom'), array('dbField' => 'AdminsEntity.id', 'dtField' => 'actions', 'formatter' => function ($d, $row) {
         $varButton = '<a class="btn btn-material btn-primary btn-sm" data-featherlight="ajax" data-featherlight-variant="featherLightbox_90" href="pages/Admin/modules/GererEquipeSite/GererEquipeSiteEdit.php?mode=mod&idAdmins=' . $d . '"><i class="material-icons md-icon-edit"></i></a>';
         $varButton .= '<a class="btn btn-material btn-danger btn-sm " onclick="SuppressionMembreEquipeSite(' . $d . ')"><i class="material-icons md-icon-delete"></i></a>';
         return '<div class="btn-toolbar">' . $varButton . "</div>";
     }));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Site\\Entity\\Admins", "AdminsEntity")->innerJoin("\\Account\\Entity\\Account", "AccountEntity", "WITH", "AccountEntity.id = AdminsEntity.idCompte");
     $datatable->getResult()->toJson();
 }
 public function run()
 {
     $columnsParameters = array(array('dbField' => 'LogsItemshopAchatsEntity.date', 'dtField' => 'date', 'formatter' => function ($d, $row) {
         return \DateTimeHelper::dateTimeToFormatedString($d);
     }), array('dbField' => 'LogsItemshopAchatsEntity.item', 'dtField' => 'article'), array('dbField' => 'LogsItemshopAchatsEntity.quantite', 'filterLevel' => 'strict', 'dtField' => 'quantite'), array('dbField' => 'LogsItemshopAchatsEntity.devise', 'dtField' => 'devise'), array('dbField' => 'LogsItemshopAchatsEntity.prix', 'filterLevel' => 'strict', 'dtField' => 'prix', 'formatter' => function ($d, $row) {
         return number_format($d, 0, '.', ',') . "<span style='position:relative; top:2px;'>" . \FonctionsUtiles::findIconDevise($row["devise"]) . "</span>";
     }), array('dbField' => 'AccountEntity.login', 'dtField' => 'compte'), array('dbField' => 'LogsItemshopAchatsEntity.resultat', 'dtField' => 'result'));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Site\\Entity\\LogsItemshopAchats", "LogsItemshopAchatsEntity")->leftJoin("\\Account\\Entity\\Account", "AccountEntity", "WITH", "AccountEntity.id = LogsItemshopAchatsEntity.idCompte");
     $datatable->getResult()->toJson();
 }
 public function run()
 {
     $columnsParameters = array(array('dbField' => 'ItemshopCategoriesEntity.nom', 'dtField' => 'categorie'), array('dbField' => 'ItemshopCategoriesEntity.description', 'dtField' => 'description'), array('dbField' => 'ItemshopCategoriesEntity.id', 'dtField' => 'actions', 'formatter' => function ($d, $row) {
         $varButton = '<a class="btn btn-material btn-primary btn-sm" data-featherlight="ajax" href="pages/Admin/modules/GererItemShop/GererItemShopCategoriesEdit.php?mode=mod&idCategorie=' . $d . '"><i class="material-icons md-icon-edit"></i></a>';
         $varButton .= '<a class="btn btn-material btn-danger btn-sm" onclick="SuppressionCategorie(' . $d . ')"><i class="material-icons md-icon-delete"></i></a>';
         return '<div class="btn-toolbar">' . $varButton . "</div>";
     }));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Site\\Entity\\ItemshopCategories", "ItemshopCategoriesEntity");
     $datatable->getResult()->toJson();
 }
예제 #12
0
    function index()
    {
        //$this->datasis->modulo_id(123,1);
        $this->rapyd->load("dataform", "datatable");
        $this->load->library('table');
        $modbus = array('tabla' => 'maes', 'columnas' => array('codigo' => 'C&oacute;digo', 'descrip' => 'Descripci&oacute;n', 'precio1' => 'Precio 1', 'precio2' => 'Precio 2', 'precio3' => 'Precio 3', 'precio4' => 'Precio 4', 'precio5' => 'Precio 5'), 'filtro' => array('codigo' => 'C&oacute;digo', 'descrip' => 'Descripci&oacute;n'), 'retornar' => array('codigo' => 'codigo'), 'titulo' => 'Buscar en inventario');
        $boton = $this->datasis->modbus($modbus);
        $filter = new DataForm('supermercado/consulcajas/index/process');
        $filter->title('Seleccione un producto');
        $filter->codigo = new inputField("Codigo", "codigo");
        $filter->codigo->append($boton);
        $filter->codigo->size = 10;
        $filter->button("btnsubmit", "Consultar", '', $position = "BL");
        $filter->build_form();
        $table = new DataTable(null);
        $table->cell_attributes = 'style="vertical-align:middle;"';
        $table->db->select(array('caja', 'ubica'));
        $table->db->from("caja");
        $table->db->where("ubica REGEXP  '^([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.(([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){2}([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])\$' ");
        $table->db->orderby('caja');
        $table->per_row = 2;
        $table->per_page = 30;
        $celda = array(array(image('caja_abierta.gif', "Caja  <#caja#>", array('border' => 0, 'align' => 'center')) . '<br>Caja <#caja#>', '<div name="cc<#caja#>" id="<#ubica#>"></div>'));
        $table->cell_template = $this->table->generate($celda);
        $table->build();
        $link = site_url('supermercado/consulcajas/preciocaj');
        $script = <<<script
\t\t<script type='text/javascript'>

\t\t\$(document).ready(function() {
\t\t\t\$("input[name='btnsubmit']").click(function () { 
\t\t\t  
\t\t\t  var producto=jQuery.trim(\$('#codigo').val());
\t\t\t\tif (producto.length==0){
\t\t\t\t\talert('Debe introducir un producto');
\t\t\t\t\treturn false;
\t\t\t\t}
\t\t\t\t\$("div[name^='cc']").each(function (i) {
\t\t\t    \$(this).load("{$link}"+'/'+this.id+'/'+producto);
\t\t\t  });
\t\t\t  
\t\t\t});
\t\t});

\t\t</script>
script;
        $data['content'] = $filter->output . $table->output;
        $data['title'] = "<h1>Consulta de productos en cajas</h1>";
        $data["head"] = $this->rapyd->get_head() . script("jquery.js") . $script;
        $this->load->view('view_ventanas', $data);
    }
예제 #13
0
 function dtable($articulos)
 {
     $per_row = 2;
     $per_page = 4;
     $table = new DataTable(null, $articulos);
     $table->per_row = $per_row;
     $table->per_page = $per_page;
     //$table->cell_attributes = 'style="vertical-align:middle;align:center; text-align: center;"';
     //$table->cell_template = "<div align='center' style='width:180px; padding:10px; height:140px; background-color:#559955'><#1#><div/>";
     //$table->cell_attributes ='align="center" height="220px" width="380px"';
     $table->cell_template = '<#1#>';
     $table->build();
     return $table->output;
 }
예제 #14
0
 public function run()
 {
     $columnsParameters = array(array('dbField' => 'ActualitesEntity.date', 'dtField' => 'date', 'formatter' => function ($d, $row) {
         return \DateTimeHelper::dateTimeToFormatedString($d);
     }), array('dbField' => 'ActualitesEntity.titre', 'dtField' => 'titre'), array('dbField' => 'ActualitesEntity.contenu', 'dtField' => 'message', 'formatter' => function ($d, $row) {
         return \FonctionsUtiles::Raccourcissement_Chaine($d, 50);
     }), array('dbField' => 'AccountEntity.login', 'dtField' => 'compte'), array('dbField' => 'ActualitesEntity.id', 'dtField' => 'actions', 'formatter' => function ($d, $row) {
         $varButton = '<a class="btn btn-material btn-primary btn-sm" data-featherlight="ajax" href="pages/Admin/GererNewsEdit.php?mode=mod&idNews=' . $d . '"><i class="material-icons md-icon-edit"></i></a>';
         $varButton .= '<a class="btn btn-material btn-danger btn-sm" onclick="SuppressionNews(' . $d . ')"><i class="material-icons md-icon-delete"></i></a>';
         return '<div class="btn-toolbar">' . $varButton . "</div>";
     }));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Site\\Entity\\Actualites", "ActualitesEntity")->leftJoin("\\Account\\Entity\\Account", "AccountEntity", "WITH", "AccountEntity.id = ActualitesEntity.idCompte");
     $datatable->getResult()->toJson();
 }
예제 #15
0
 public function dataTable()
 {
     Doo::loadClassAt('html/DataTable', 'default');
     Doo::loadClassAt('Menu', 'default');
     $menu = new menu(DBproxy::getManage());
     $dt = new DataTable();
     MenuController::$data = $data = $menu->getMenuTreeList();
     // D($data);
     function table_name($row, $rowData, $val)
     {
         $sep = substr($rowData['_sep'], 1);
         if ($sep != '') {
             $sep = str_replace('.', '&nbsp;&nbsp;&nbsp;&nbsp;', $sep);
             $dot = '└─';
             if (isset(MenuController::$data[$row + 1])) {
                 if (MenuController::$data[$row + 1]['parent_id'] == $rowData['parent_id']) {
                     $dot = '├─';
                 }
             }
             $sep = $sep . $dot;
         }
         return '<div style="left">' . $sep . $val . '</div>';
     }
     function table_type($row, $rowData, $val)
     {
         return $val == 2 ? '分类' : '页面';
     }
     function table_show($row, $rowData, $val)
     {
         return $val == 1 ? '<span class="label label-success">是</span>' : '<span class="label">否</span>';
     }
     // 表格按钮
     function table_button($row, $rowData, $val)
     {
         $modUrl = MenuController::$modUrl . $rowData['id'] . '&menu_name=' . $rowData['menu_name'] . '&sort_id=' . $rowData['sort_id'] . '&type_id=' . $rowData['type_id'] . '&perm_id=' . $rowData['perm_id'] . '&is_show=' . $rowData['is_show'] . '&page_url=' . urlencode($rowData['url']) . '&parent_id=' . $rowData['parent_id'] . '&_sep=' . $rowData['_sep'];
         $delUrl = MenuController::$delUrl . $rowData['id'];
         $a = '<a href="' . $modUrl . '" class="blue-stripe btn mini">编辑/查看</a>';
         $a .= '  <a href="' . $delUrl . '" class="red-stripe btn mini js-datatable-del">删除</a>';
         return $a;
     }
     // 表头
     $header = array('menu_name' => array('name' => '菜单名称', 'callback' => 'table_name'), 'id' => array('name' => 'ID'), 'parent_id' => array('name' => '所属父ID'), 'type_id' => array('name' => '类型', 'callback' => 'table_type', 'headerAttr' => 'filterType="enum"'), 'perm_id' => array('name' => '菜单权限'), 'url' => array('name' => '菜单URL'), 'is_show' => array('name' => '是否显示', 'callback' => 'table_show', 'headerAttr' => 'filterType="enum"'), 'sort_id' => array('name' => '排序'), 'action' => array('name' => '操作', 'callback' => 'table_button'));
     // 生产表格
     $content = $dt->setTitle('')->setAttr(array('class' => 'table table-hover', 'id' => 'js-queryTable'))->setHeader($header)->setData($data)->setTopContent('<a href="' . MenuController::$addUrl . '" class="btn green-stripe"><i class="icon-plus"></i>添加菜单</a>' . '<p id="js-queryTable-filter">Filter</p>')->setDefaultValue('unkown')->render(false);
     $this->_includeJsFileList[] = 'js/default/menu.js';
     // 显示模版
     $this->contentlayoutRender($content);
 }
예제 #16
0
    function preciosgeneral()
    {
        $this->rapyd->load('dataform', 'datatable');
        $cod = $this->uri->segment(4) == false ? $this->input->post('codigo') : $this->uri->segment(4);
        $script = '<script type="text/javascript" charset=ISO-8859-1">
		$(document).ready(function() {
			$("#codigo").attr("value", "");
			$("#codigo").focus();
		});
		function dbuscar(){
			$("form").submit();
		}
		</script>';
        $barras = array('name' => 'codigo', 'id' => 'codigo', 'value' => '', 'size' => '16');
        if ($this->tipo == 'sinv') {
            $modbus = array('tabla' => 'sinv', 'columnas' => array('codigo' => 'C&oacute;digo', 'barras' => 'C&oacute;digo barras', 'descrip' => 'Descripci&oacute;n', 'existen' => 'Existencia'), 'filtro' => array('descrip' => 'Descripci&oacute;n'), 'retornar' => array('codigo' => 'codigo'), 'where' => 'activo = "S"', 'titulo' => 'Buscar Art&iacute;culo', 'script' => array('dbuscar()'));
        } else {
            $modbus = array('tabla' => 'maes', 'columnas' => array('codigo' => 'C&oacute;digo', 'descrip' => 'descrip'), 'filtro' => array('descrip' => 'descrip'), 'retornar' => array('codigo' => 'codigo'), 'titulo' => 'Buscar Articulo', 'script' => array('dbuscar()'));
        }
        $boton = $this->datasis->modbus($modbus);
        $out = '<h1>' . form_open('inventario/consultas/preciosgeneral');
        $out .= 'Introduzca un C&oacute;digo ';
        $out .= form_input($barras) . $boton;
        $out .= form_submit('btnsubmit', 'Consultar') . form_close() . '</h1>';
        $contenido = $out;
        if (!empty($cod)) {
            $data2 = $this->rprecios($cod);
            if ($data2 !== false) {
                $contenido .= $this->load->view('view_rprecios', $data2, true);
            } else {
                $t = array();
                $t[1][1] = '<b>PRODUCTO NO CODIFICADO</b>';
                $t[2][1] = '';
                $t[3][1] = '<b>Por Favor consulte con el personal de pasillo</b>';
                $table = new DataTable(null, $t);
                $table->cell_attributes = 'style="vertical-align:middle; text-align: center;"';
                $table->per_row = 1;
                $table->cell_attributes = '';
                $table->cell_template = "<div style='color:red;' align='center'><#1#></div></br>";
                $table->build();
                $contenido .= $table->output;
            }
        }
        $data['content'] = $contenido;
        $data['head'] = script('jquery.js') . style('ventanas.css') . style('estilos.css') . $this->rapyd->get_head() . $script;
        $this->load->view('view_ventanas', $data);
    }
예제 #17
0
 public function dataTable()
 {
     Doo::loadClassAt('html/DataTable', 'default');
     Doo::loadClassAt('html/DooFormExt', 'default');
     $dt = new DataTable();
     $param['starttime'] = $this->getUrlVar('starttime', NULL);
     $param['endtime'] = $this->getUrlVar('endtime', NULL);
     //$param['bookid'] = $this->getUrlVar('bookid',NULL);
     $param['order'] = $this->getUrlVar('order', NULL);
     $param['bookname'] = $this->getUrlVar('bookname', NULL);
     //$param['booktypeid'] = $this->getUrlVar('booktypeid',0);
     $param['waimai'] = $this->getUrlVar('waimai', '2');
     $param['shopname'] = $this->getUrlVar('shopname', '');
     $export = $this->getUrlVar('export');
     // 表头
     $header = array('bookid' => array('name' => '菜品ID'), 'title' => array('name' => '菜品名称'), 'sum' => array('name' => '销量'), 'price' => array('name' => '微信单价'), 'totle' => array('name' => '总价'));
     //所有店列表
     $shopNameList = DBproxy::getProcedure('Manage')->setDimension(2)->getShopName();
     $shopNameOpt = '<select class="m-wrap" name="shopname" id="city-element"><option>全部门店</option>';
     foreach ($shopNameList as $key => $value) {
         $selected = $this->getUrlVar('shopname') == $value['cityid'] . ',' . $value['shopname'] ? 'selected=selected' : '';
         $shopNameOpt .= '<option ' . $selected . ' value="' . $value['cityid'] . ',' . $value['shopname'] . '">' . $value['cityNshopname'] . '</option>';
     }
     $shopNameOpt .= '</select>';
     $res = DBproxy::getProcedure('Manage')->setDimension(2)->queryOrderHit($param);
     $sum = 0;
     foreach ($res['data'] as $key => $value) {
         $sum += $value['sum'];
         $res['data'][$key]['totle'] = $value['sum'] * $value['price'];
     }
     // 生产表格
     $content = $dt->setTitle('')->setAttr(array('class' => 'table table-hover  ', 'id' => 'js-queryTable '))->setHeader($header)->setData($res['data'])->setTopContent('')->setBottomContent('')->setDefaultValue('unkown')->render(false);
     //查询表单
     $form = new DooFormExt(array('method' => 'get', 'renderFormat' => 'html', 'action' => '', 'attributes' => array('id' => 'js-get-form', 'class' => 'form-horizontal'), 'elements' => array('starttime' => array('text', array('left' => ' ', 'hide-label' => true, 'div' => false, 'placeholder' => '开始日期', 'attributes' => array('class' => "m-wrap", "onClick" => "WdatePicker()"), 'value' => $this->getUrlVar('starttime'))), 'endtime' => array('text', array('left' => ' ', 'hide-label' => true, 'div' => false, 'placeholder' => '结束日期', 'attributes' => array('class' => "m-wrap", "onClick" => "WdatePicker({maxDate:'%y-%M-%d'})"), 'value' => $this->getUrlVar('endtime'))), 'shopname' => array('display', array('left' => '', 'hide-label' => true, 'div' => false, 'attributes' => array('class' => 'small m-wrap'), 'content' => $shopNameOpt)), 'bookname' => array('text', array('left' => ' ', 'hide-label' => true, 'div' => false, 'placeholder' => '菜品名称', 'attributes' => array('class' => "m-wrap"), 'value' => $this->getUrlVar('bookname'))), 'waimai' => array('select', array('left' => ' 是否外卖', 'hide-label' => true, 'div' => false, 'attributes' => array('class' => 'small m-wrap'), 'multioptions' => array('2' => '全部', '1' => '是', '0' => '否'), 'value' => $this->getUrlVar('waimai'))), 'order' => array('select', array('left' => ' 点击量排序', 'hide-label' => true, 'div' => false, 'attributes' => array('class' => 'small m-wrap'), 'multioptions' => array('desc' => '多', 'asc' => '少'), 'value' => $this->getUrlVar('order'))), 'search' => array('button', array('div' => false, 'label' => '<i class="icon-search"></i>查询', 'attributes' => array('class' => "btn blue"), 'value' => 1)), 'export' => array('button', array('div' => false, 'label' => ' <i class="icon-export"></i> 导出', 'attributes' => array('class' => "btn black"), 'value' => 1)))));
     $sumDiv = '销售总数量:' . $sum;
     $content .= $sumDiv;
     //export
     if (trim($export) == 1) {
         exportExcel($content);
         exit;
     }
     // 显示模版
     $this->contentlayoutRender($form->render() . $content);
 }
예제 #18
0
 public function dataTable()
 {
     $param['city'] = $this->getUrlVar('city', NULL);
     $data = DBproxy::getProcedure('Manage')->setDimension(2)->getCategory($param);
     CategoryController::$data = $data['data'];
     Doo::loadClassAt('html/DataTable', 'default');
     Doo::loadClassAt('html/DooFormExt', 'default');
     $dt = new DataTable();
     function table_button($row, $rowData, $val)
     {
         $a = ' <a class="btn blue-stripe mini" href="' . CategoryController::$modUrl . $rowData['id'] . '">' . '编辑</a>';
         $a .= ' <a class="red-stripe btn mini js-datatable-del" href="' . CategoryController::$delUrl . $rowData['id'] . '" >删除</a>';
         return $a;
     }
     function table_status($row, $rowData, $val)
     {
         $status = CategoryController::$data[$rowData['id']]['status'];
         if (trim($status) == '0') {
             $a = '<span class="label label-success">正常可用</span>';
         } else {
             $a = '<span class="label">失效';
         }
         return $a;
     }
     function table_prentid($row, $rowData, $val)
     {
         $pname = CategoryController::$data[$rowData['id']]['pname'];
         if (trim($pname) == '') {
             $a = '顶级父类';
         } else {
             $a = CategoryController::$data[$rowData['id']]['pname'];
         }
         return $a;
     }
     // 表头
     $header = array('name' => array('name' => '分类名称'), 'pname' => array('name' => '所属分类', 'callback' => 'table_prentid'), 'status' => array('name' => '状态', 'callback' => 'table_status'), 'action' => array('name' => '操作', 'callback' => 'table_button'));
     $name = Category::cateToOption(0, false, 'array', $data);
     $form = new DooFormExt(array('method' => 'get', 'renderFormat' => 'html', 'action' => '', 'attributes' => array('id' => 'js-get-form', 'class' => 'form-horizontal'), 'elements' => array('add' => array('display', array('left' => ' ', 'hide-label' => true, 'div' => false, 'content' => '<a href="' . CategoryController::$addUrl . '" class="btn green-stripe"><i class="icon-plus"></i>添加分类</a>', 'attributes' => array('class' => "m-wrap"))))));
     // 生产表格
     $content = $dt->setTitle('')->setAttr(array('class' => 'table table-hover', 'id' => 'js-queryTable'))->setHeader($header)->setData($name)->setTopContent($form->render())->setDefaultValue('unkown')->render(false);
     // 显示模版
     $this->contentlayoutRender($content);
 }
예제 #19
0
 public function dataTable()
 {
     Doo::loadClassAt('html/DataTable', 'default');
     $dt = new DataTable();
     function table_button($row, $rowData)
     {
         $modUrl = RoleController::$modUrl . $rowData['id'];
         $delUrl = RoleController::$delUrl . $rowData['id'];
         $a = '<a href="' . $modUrl . '" class="blue-stripe btn mini">修改</a>';
         $a .= '  <a href="' . $delUrl . '" class="red-stripe btn mini js-datatable-del">删除</a>';
         return $a;
     }
     $header = array('id' => 'ID', 'name' => '角色名', 'table_button_action' => array('name' => '操作', 'callback' => 'table_button'));
     Doo::loadClassAt('Role', 'default');
     $role = new role();
     $data = $role->get_list();
     $content = $dt->setTitle('')->setAttr(array('class' => 'table'))->setHeader($header)->setData($data)->setDefaultValue('unkown')->setTopContent('<a href="' . RoleController::$addUrl . '" class="btn green-stripe"><i class="icon-plus"></i>新增角色</a>')->render(false);
     $this->contentlayoutRender($content);
 }
예제 #20
0
 public function run()
 {
     if ($_GET["sEcho"] == 1) {
         exit;
     }
     $columnsParameters = array(array('dbField' => 'GuildEntity.name', 'dtField' => 'name'), array('dbField' => 'GuildEntity.level', 'filterLevel' => 'strict', 'dtField' => 'level'), array('dbField' => ["GuildEntity.victoire", "GuildEntity.defaite", "GuildEntity.egalite"], 'dbSortReplaceField' => [], 'dbConcatSeparator' => "|VAMOS|", 'dtField' => 'scores', 'formatter' => function ($d, $row) {
         $explosion = explode("|VAMOS|", $d);
         $scores = "<span class='text-green'>" . $explosion[0] . "</span>";
         $scores .= " / <span class='text-red'>" . $explosion[1] . "</span>";
         $scores .= " / <span>" . $explosion[2] . "</span>";
         return $scores;
     }), array('dbField' => 'AccountEntity.login', 'dtField' => 'chef'), array('dbField' => 'PlayerIndexEntity.empire', 'filterLevel' => 'strict', 'dtField' => 'empire', 'formatter' => function ($d, $row) {
         return \FonctionsUtiles::findIconEmpire($d);
     }), array('dbField' => 'AccountEntity.status', 'filterLevel' => 'strict', 'dtField' => 'status', 'formatter' => function ($d, $row) {
         return \FonctionsUtiles::findIconStatus($d);
     }));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Player\\Entity\\Guild", "GuildEntity")->innerJoin("\\Account\\Entity\\Account", "AccountEntity", "WITH", "AccountEntity.id = GuildEntity.master")->innerJoin("\\Player\\Entity\\PlayerIndex", "PlayerIndexEntity", "WITH", "PlayerIndexEntity.id = AccountEntity.id");
     $datatable->getResult()->toJson();
 }
 public function run()
 {
     $columnsParameters = array(array('dbField' => 'SupportDiscussionsEntity.idObjet', 'dtField' => 'objet', 'formatter' => function ($d, $row) {
         return \SupportObjetsHelper::getLibelle($d);
     }), array('dbField' => 'AdminsEntity.name', 'dtField' => 'compte', 'formatter' => function ($d, $row) {
         if ($this->isAdmin) {
             return $row["user"];
         } else {
             return $d;
         }
     }), array('dbField' => 'AccountEntityUser.login', 'dtField' => 'user'), array('dbField' => 'SupportDiscussionsEntity.date', 'dtField' => 'date', 'formatter' => function ($d, $row) {
         return \DateTimeHelper::dateTimeToFormatedString($d, "d/m/Y");
     }), array('dbField' => 'SupportDiscussionsEntity.id', 'dtField' => 'actions', 'formatter' => function ($d, $row) {
         $varButton = '<a class="btn btn-material btn-primary btn-sm" onclick="DiscussionOpen(\'' . \Encryption::encrypt($d) . '\')"><i class="material-icons md-icon-search"></i></a>';
         return '<div class="btn-toolbar">' . $varButton . "</div>";
     }));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Site\\Entity\\SupportDiscussions", "SupportDiscussionsEntity")->innerJoin("\\Site\\Entity\\Admins", "AdminsEntity", "WITH", "AdminsEntity.idCompte = SupportDiscussionsEntity.idAdmin")->leftJoin("\\Account\\Entity\\Account", "AccountEntityUser", "WITH", "AccountEntityUser.id = SupportDiscussionsEntity.idCompte")->andWhere("SupportDiscussionsEntity.idCompte = " . $this->objAccount->getId() . " OR SupportDiscussionsEntity.idAdmin = " . $this->objAccount->getId() . "")->andWhere("SupportDiscussionsEntity.estArchive = 1");
     $datatable->getResult()->toJson();
 }
예제 #22
0
 function index()
 {
     $this->datasis->modulo_id('123', 1);
     $this->rapyd->load("fields", "datatable");
     $atts = array('width' => '530', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $table = new DataTable(null);
     $table->cell_attributes = 'style="vertical-align:middle;"';
     $table->db->select(array('caja', 'ubica'));
     $table->db->from("caja");
     $table->db->where("ubica REGEXP  '^([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}\$' ");
     $table->db->orderby('caja');
     $table->per_row = 5;
     $table->per_page = 15;
     //$table->cell_template = "<a href='".site_url('/supermercado/envivo/caja/<#ubica#>')."' target='vencaja' >". image('caja_abierta.gif',"Caja  <#caja#>", array('border'=>0,'align'=>'center')).'</a>'.'<br>Caja <#caja#>';
     $table->cell_template = anchor_popup('/supermercado/envivo/caja/<#ubica#>', image('caja_abierta.gif', "Caja  <#caja#>", array('border' => 0, 'align' => 'center')), $atts) . '<br>Caja <#caja#>';
     $table->build();
     $data['content'] = '<center>' . $table->output . '</center>';
     $data['title'] = "<h1>Ventas en vivo</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
예제 #23
0
 function datatable()
 {
     //datatable//
     $this->rapyd->load("datatable");
     $table = new DataTable(null, $this->data);
     $table->per_row = 3;
     $table->per_page = 6;
     $table->use_function("substr", "strtoupper");
     $table->cell_template = '
 <div style="padding:4px">
   <div style="color:#119911; font-weight:bold"><#title#></div>
   This is the body number <substr><#body#>|5|100</substr>
 </div>';
     $table->build();
     $data["table"] = $table->output;
     //enddatatable//
     $content["content"] = $this->load->view('rapyd/datatable', $data, true);
     $content["rapyd_head"] = $this->rapyd->get_head();
     $content["code"] = highlight_code_file(THISFILE, "//datatable//", "//enddatatable//");
     $this->load->view('rapyd/template', $content);
 }
예제 #24
0
 public function run()
 {
     $columnsParameters = array(array('dbField' => 'PlayerEntity.name', 'dtField' => 'name', 'formatter' => function ($d, $row) {
         return \FonctionsUtiles::findIconJob($row["job"]) . " " . $d;
     }), array('dbField' => 'AccountEntity.login', 'dtField' => 'compte'), array('dbField' => 'PlayerEntity.job', 'dtField' => 'job'), array('dbField' => 'GmlistEntity.mauthority', 'dtField' => 'authority', 'formatter' => function ($d, $row) {
         return \AuthorityHelper::getLibelle($d);
     }), array('dbField' => 'PlayerEntity.playtime', 'dtField' => 'playtime', 'formatter' => function ($d, $row) {
         return \DateTimeHelper::minutesToString($d);
     }), array('dbField' => 'PlayerEntity.lastPlay', 'dtField' => 'lastPlay', 'formatter' => function ($d, $row) {
         return \DateTimeHelper::dateTimeToFormatedString($d);
     }), array('dbField' => 'AccountEntity.status', 'filterLevel' => 'strict', 'dtField' => 'status', 'formatter' => function ($d, $row) {
         return \FonctionsUtiles::findIconStatus($d);
     }), array('dbField' => 'PlayerEntity.ip', 'dtField' => 'ip'), array('dbField' => 'GmlistEntity.mid', 'dtField' => 'actions', 'formatter' => function ($d, $row) {
         $varButton = '<a class="btn btn-material btn-primary btn-sm" data-featherlight="ajax" href="pages/Admin/modules/GererEquipeJeu/GererEquipeJeuEdit.php?mode=mod&idMembre=' . $d . '"><i class="material-icons md-icon-edit"></i></a>';
         $varButton .= '<a class="btn btn-material btn-danger btn-sm " onclick="SuppressionMembreEquipe(' . $d . ')"><i class="material-icons md-icon-delete"></i></a>';
         return '<div class="btn-toolbar">' . $varButton . "</div>";
     }));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Common\\Entity\\Gmlist", "GmlistEntity")->innerJoin("\\Player\\Entity\\Player", "PlayerEntity", "WITH", "PlayerEntity.name = GmlistEntity.mname")->innerJoin("\\Account\\Entity\\Account", "AccountEntity", "WITH", "AccountEntity.login = GmlistEntity.maccount");
     $datatable->getResult()->toJson();
 }
예제 #25
0
    function enlistar()
    {
        //$this->session->_flashdata_sweep();
        //echo '<pre>';print_r($this->session->userdata);echo '</pre>';
        $repo = $this->uri->segment(3);
        $this->rapyd->load("datatable");
        $this->rapyd->config->set_item("theme", "clean");
        if ($repo) {
            $repo = strtoupper($repo);
            $grid = new DataTable();
            //$grid->db->select('titulo, mensaje, SUBSTR(SUBSTRING_INDEX(REPLACE(ejecutar, "\'",\'"\'), \'"\', 2),10) AS nombre');
            //$grid->db->from("tmenus");
            //$grid->db->where("modulo='".$repo."LIS' AND TRIM(ejecutar) LIKE 'REPOSQL(%)'");
            $grid->db->select('a.titulo, a.mensaje, a.nombre');
            $grid->db->from("intrarepo AS a");
            $grid->db->join("reportes AS b", "a.nombre=b.nombre");
            $grid->db->where('a.modulo', $repo);
            $grid->db->where('a.activo', 'S');
            $grid->per_row = 3;
            $grid->use_function("substr", "strtoupper");
            $grid->cell_template = '
			<div style="padding:4px">
			  <div style="color:#119911; font-weight:bold">' . anchor('reportes/ver/<#nombre#>/' . $repo, "<#titulo#>", array('onclick' => "parent.navegador.afiltro()")) . '</div>
			   <htmlspecialchars><#mensaje#></htmlspecialchars>
			</div>';
            $grid->build();
            //echo $grid->db->last_query();
        }
        if ($repo and $grid->recordCount > 0) {
            $data['forma'] = $grid->output;
        } else {
            $data['forma'] = '<p class="mainheader">No se encontrar&oacute;n reportes.</p>';
        }
        //echo $grid->db->last_query();
        $data['head'] = $this->rapyd->get_head();
        $data['titulo'] = "<center><h2>Listados Disponibles</h2></center>";
        $data['repo'] = $repo;
        //$CI->session->set_userdata('estaba', $CI->uri->uri_string());
        $this->load->view('view_reportes', $data);
    }
예제 #26
0
 function index()
 {
     $this->datasis->modulo_id('11E', 1);
     $this->rapyd->load("fields", "datatable");
     $table = new DataTable(null);
     $table->cell_attributes = 'style="vertical-align:middle;"';
     $table->db->select(array('caja', 'ubica'));
     $table->db->from("caja");
     $table->db->where("ubica REGEXP  '^([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}\$' ");
     $table->db->orderby('caja');
     $table->per_row = 5;
     $table->per_page = 15;
     //$table->cell_template = "<a href='".site_url('/supermercado/envivo/caja/<#ubica#>')."' target='vencaja' >". image('caja_abierta.gif',"Caja  <#caja#>", array('border'=>0,'align'=>'center')).'</a>'.'<br>Caja <#caja#>';
     $table->cell_template = image('caja_abierta.gif', "Caja  <#caja#>", array('border' => 0, 'align' => 'center', 'id' => '<#caja#>')) . '<br>Caja <#caja#>';
     $table->build();
     $link = site_url('supermercado/apagar/capaga');
     $data['script'] = "\n\t\t<script type='text/javascript'>\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$('img').click(function () { \n\t\t\t\t\tif (confirm('Seguro que desea apagar la caja '+this.id+'?')) { \n\t\t\t\t\t\t\$.ajax({\n\t\t\t\t\t\t\turl: '{$link}'+'/'+this.id,\n\t\t\t\t\t\t\tsuccess: function(msg){\n\t\t\t\t\t\t\t\talert(msg);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t});\n\t\t</script>\n\t\t";
     $data['content'] = '<center>' . $table->output . '</center>';
     $data['title'] = "<h1>Apagar las Cajas</h1>";
     $data["head"] = $this->rapyd->get_head() . script('jquery.js');
     $this->load->view('view_ventanas', $data);
 }
 public function run()
 {
     $columnsParameters = array(array('dbField' => 'GuildEntity1.name', 'filterLevel' => 'strict', 'dtField' => 'firstGuild', 'formatter' => function ($d, $row) {
         return \FonctionsUtiles::findIconEmpire($row["firstEmpire"]) . " " . $d;
     }), array('dbField' => 'GuildEntity2.name', 'filterLevel' => 'strict', 'dtField' => 'secondGuild', 'formatter' => function ($d, $row) {
         return \FonctionsUtiles::findIconEmpire($row["secondEmpire"]) . " " . $d;
     }), array('dbField' => 'PlayerMaster1Entity.name', 'dtField' => 'firstChef'), array('dbField' => 'GuildWarReservationEntity.time', 'dbConcatSeparator' => ", ", 'dtField' => 'date', 'formatter' => function ($d, $row) {
         return \DateTimeHelper::dateTimeToFormatedString($d);
     }), array('dbField' => 'PlayerMaster2Entity.name', 'dtField' => 'secondChef'), array('dbField' => 'GuildWarReservationEntity.result1', 'dtField' => 'result1'), array('dbField' => 'GuildWarReservationEntity.result2', 'dtField' => 'result2'), array('dbField' => 'GuildEntityWin.name', 'filterLevel' => 'strict', 'dtField' => 'winner', 'formatter' => function ($d, $row) {
         if ($row["result1"] > $row["result2"]) {
             return $d . " (<span class='text-green'>" . $row["result1"] . "</span> / <span class='text-red'>" . $row["result2"] . "</span>)";
         } else {
             if ($row["result1"] < $row["result2"]) {
                 return $d . " (<span class='text-green'>" . $row["result2"] . "</span> / <span class='text-red'>" . $row["result1"] . "</span>)";
             } else {
                 return "Match nul";
             }
         }
     }), array('dbField' => 'PlayerIndexMaster1Entity.empire', 'dtField' => 'firstEmpire'), array('dbField' => 'PlayerIndexMaster2Entity.empire', 'dtField' => 'secondEmpire'));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Player\\Entity\\GuildWarReservation", "GuildWarReservationEntity")->leftJoin("\\Player\\Entity\\Guild", "GuildEntity1", "WITH", "GuildEntity1.id = GuildWarReservationEntity.guild1")->leftJoin("\\Player\\Entity\\Guild", "GuildEntity2", "WITH", "GuildEntity2.id = GuildWarReservationEntity.guild2")->leftJoin("\\Player\\Entity\\Guild", "GuildEntityWin", "WITH", "GuildEntityWin.id = GuildWarReservationEntity.winner")->innerJoin("\\Player\\Entity\\Player", "PlayerMaster1Entity", "WITH", "PlayerMaster1Entity.id = GuildEntity1.master")->innerJoin("\\Player\\Entity\\Player", "PlayerMaster2Entity", "WITH", "PlayerMaster2Entity.id = GuildEntity2.master")->leftJoin("\\Account\\Entity\\Account", "AccountMaster1Entity", "WITH", "AccountMaster1Entity.id = PlayerMaster1Entity.idAccount")->leftJoin("\\Account\\Entity\\Account", "AccountMaster2Entity", "WITH", "AccountMaster2Entity.id = PlayerMaster2Entity.idAccount")->leftJoin("\\Player\\Entity\\PlayerIndex", "PlayerIndexMaster1Entity", "WITH", "PlayerIndexMaster1Entity.id = AccountMaster1Entity.id")->leftJoin("\\Player\\Entity\\PlayerIndex", "PlayerIndexMaster2Entity", "WITH", "PlayerIndexMaster2Entity.id = AccountMaster2Entity.id");
     $datatable->getResult()->toJson();
 }
 public function run()
 {
     $columnsParameters = array(array('dbField' => 'LogsAdminGererMonnaieEntity.idCompte', 'dtField' => 'idCompte'), array('dbField' => 'AccountEntityUser.login', 'dtField' => 'recepteur', 'formatter' => function ($d, $row) {
         if ($row["idCompte"] == 0) {
             return "Tout le monde";
         } else {
             return $d;
         }
     }), array('dbField' => 'LogsAdminGererMonnaieEntity.date', 'dtField' => 'date', 'formatter' => function ($d, $row) {
         return \DateTimeHelper::dateTimeToFormatedString($d);
     }), array('dbField' => 'AccountEntityAdmin.login', 'dtField' => 'emetteur'), array('dbField' => 'LogsAdminGererMonnaieEntity.operation', 'filterLevel' => 'strict', 'dtField' => 'operation', 'formatter' => function ($d, $row) {
         if ($d == 1) {
             return "a donné";
         } else {
             return "a enlevé";
         }
     }), array('dbField' => 'LogsAdminGererMonnaieEntity.montant', 'filterLevel' => 'strict', 'dtField' => 'montant'), array('dbField' => 'LogsAdminGererMonnaieEntity.devise', 'filterLevel' => 'strict', 'dtField' => 'devise', 'formatter' => function ($d, $row) {
         return \DeviseHelper::getLibelle($d);
     }));
     $datatable = new \DataTable();
     $datatable->setColumnsParameters($columnsParameters)->setRequest($_GET)->from("\\Site\\Entity\\LogsAdminGererMonnaie", "LogsAdminGererMonnaieEntity")->leftJoin("\\Account\\Entity\\Account", "AccountEntityUser", "WITH", "AccountEntityUser.id = LogsAdminGererMonnaieEntity.idCompte")->innerJoin("\\Account\\Entity\\Account", "AccountEntityAdmin", "WITH", "AccountEntityAdmin.id = LogsAdminGererMonnaieEntity.idGm");
     $datatable->getResult()->toJson();
 }
예제 #29
0
 public function dataTable()
 {
     Doo::loadClassAt('html/DataTable', 'default');
     Doo::loadClassAt('html/DooFormExt', 'default');
     $dt = new DataTable();
     function table_button($row, $rowData, $val)
     {
         $a = '<a class="btn blue-stripe mini" href="' . BookController::$modUrl . $rowData['id'] . '">' . '编辑</a>';
         $a .= ' <a href="' . BookController::$delUrl . $rowData['id'] . '" class="red-stripe btn mini js-datatable-del">删除</a>';
         return $a;
     }
     function table_status($row, $rowData, $val)
     {
         if (trim($rowData['status']) == '0') {
             $a = '<span class="label label-success">正常可用</span>';
         } else {
             $a = '<span class="label">失效';
         }
         return $a;
     }
     // 表头
     $header = array('id' => array('name' => 'id'), 'name' => array('name' => '名称'), 'categoryName' => array('name' => '所属父分类'), 'price' => array('name' => '价钱'), 'wxprice' => array('name' => '微信价钱'), 'status' => array('name' => '可用状态', 'callback' => 'table_status'), 'action' => array('name' => '操作', 'callback' => 'table_button'));
     $param = array();
     $param['id'] = (int) $this->getUrlVar('bookid', NULL);
     $param['bookname'] = (string) $this->getUrlVar('bookname', NULL);
     $param['booktypeid'] = (int) $this->getUrlVar('booktypeid', 0);
     $param['city'] = (int) $this->getUrlVar('city', 0);
     $res = DBproxy::getProcedure('Manage')->setDimension(2)->getBook($param, $this->getCurPage() . ',' . Doo::conf()->pagesize);
     // 生产表格
     $content = $dt->setTitle('')->setAttr(array('class' => 'table', 'id' => 'js-queryTable'))->setHeader($header)->setData($res['data'])->setTopContent('')->setBottomContent($this->pager($res['total']))->setDefaultValue('unkown')->render(false);
     $btn = '<a href="' . BookController::$addUrl . '" 
                 class="btn green-stripe"><i class="icon-plus"></i>' . L('添加') . '</a>';
     //查询表单
     $form = new DooFormExt(array('method' => 'get', 'renderFormat' => 'html', 'action' => '', 'attributes' => array('id' => 'js-get-form', 'class' => 'form-horizontal'), 'elements' => array('cityid' => array('display', array('hide-label' => true, 'div' => false, 'attributes' => array('class' => "m-wrap"), 'content' => BookController::$city)), 'booktypeid' => array('display', array('left' => ' 菜品分类', 'hide-label' => true, 'div' => false, 'attributes' => array('class' => "m-wrap"), 'content' => '<select id="booktypeid-element" name="booktypeid" class="m-wrap"><option>全部菜品</option>' . Category::cateToOption($param['booktypeid']) . '</select>')), 'bookname' => array('text', array('left' => ' ', 'hide-label' => true, 'div' => false, 'placeholder' => '菜品名称', 'attributes' => array('class' => "m-wrap"), 'value' => $this->getUrlVar('bookname'))), 'bookid' => array('text', array('left' => ' ', 'hide-label' => true, 'div' => false, 'placeholder' => '菜品id', 'attributes' => array('class' => "m-wrap"), 'value' => $this->getUrlVar('bookid'))), 'search' => array('button', array('div' => false, 'label' => '<i class="icon-search"></i>查询', 'attributes' => array('class' => "btn blue"), 'value' => 1)))));
     // 显示模版
     $this->contentlayoutRender($btn . $form->render() . $content);
 }
예제 #30
0
 private function __construct()
 {
     $data = DataTable::constructFromCsvFile(new CsvFile('data/updates.csv'))->get();
     foreach ($data as $row) {
         $year = $row['year'];
         $month = $row['month'];
         $day = $row['day'];
         $version = $year . '-' . $month . '-' . $day;
         $change = $row['change'];
         if (!isset($this->updates[$version])) {
             $update = new Update($year, $month, $day);
             $this->updates[$version] = $update;
             $this->latest_version = $update->getVersion();
         }
         $this->updates[$version]->addChange($change);
     }
 }