コード例 #1
0
ファイル: viewclientinfo.php プロジェクト: agundran/addige
 function index($offset = 0, $order_column = 'SiteName', $order_type = 'asc')
 {
     if (empty($offset)) {
         $offset = 0;
     }
     if (empty($order_column)) {
         $order_column = 'ShortName';
     }
     if (empty($order_type)) {
         $order_type = 'asc';
     }
     if (empty($filter)) {
         $filter = 0;
     }
     $upd = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     //TODO: check for valid column
     // load data
     $filter = $this->input->post('ShortName');
     $Users = $this->viewclientinfomodel->get_paged_list($this->limit, $offset, $order_column, $order_type, $filter)->result();
     // generate pagination
     $config['base_url'] = site_url('/viewclientinfo/index');
     $config['total_rows'] = $this->viewclientinfomodel->count_all();
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $data['title'] = "Site Table";
     // generate table data
     $this->load->library('table');
     $this->table->set_empty("");
     $new_order = $order_type == 'asc' ? 'desc' : 'asc';
     $this->table->set_heading(anchor('viewclientinfo/index/' . $offset . '/ShortName/' . $new_order, 'Site Name'), anchor('viewclientinfo/index/' . $offset . '/Operator/' . $new_order, 'Operator'), anchor('viewclientinfo/index/' . $offset . '/HENumber/' . $new_order, 'HE'), anchor('viewclientinfo/index/' . $offset . '/Syscode/' . $new_order, 'Syscode'), 'Actions');
     $i = 0 + $offset;
     foreach ($Users as $Users) {
         $this->table->add_row($Users->ShortName, $Users->Operator, $Users->HENumber, $Users->SysCode, anchor_popup('viewclientinfo/update/' . $Users->ShortName, 'select', array('class' => 'update'), $upd));
         //.'   '.
         //anchor('viewclientinfo/delete/'.$Users->ShortName,'delete',array('class'=>'delete','onclick'=>"return confirm('Are you sure you want to remove this Client?')")))
         //;
     }
     $data['table'] = $this->table->generate();
     if ($this->uri->segment(3) == 'delete_success') {
         $data['message'] = 'The Data was successfully deleted';
     } else {
         if ($this->uri->segment(3) == 'add_success') {
             $data['message'] = 'The Data has been successfully added';
         } else {
             if ($this->uri->segment(3) == 'update_success') {
                 $data['message'] = 'The Data has been successfully updated';
             } else {
                 $data['message'] = '';
             }
         }
     }
     // load view
     $data['Role'] = $this->session->userdata('role');
     $this->load->view('pages/template/header');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/viewclientinfo_view', $data);
     $this->load->view('pages/template/footer');
 }
コード例 #2
0
ファイル: kardex.php プロジェクト: codethics/proteoerp
 function convierte($par, $link)
 {
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '5', 'screeny' => '5');
     switch ($par) {
         case '3I':
             return anchor_popup($link, 'Ventas Caja', $atts);
             break;
         case '3M':
             return anchor_popup($link, 'Ventas Mayor', $atts);
             break;
         case '1T':
             return anchor_popup($link, 'Transferencias', $atts);
             break;
         case '2C':
             return anchor_popup($link, 'Compras', $atts);
             break;
         case '4N':
             return anchor_popup($link, 'Nota/Entrega', $atts);
             break;
         case '6C':
             return 'Conversiones';
             break;
         case '5A':
             return 'Ajustes';
             break;
         case '0F':
             return 'Inventario';
             break;
         case '9F':
             return 'Inventario';
             break;
         default:
             return $par;
     }
 }
コード例 #3
0
ファイル: manageuserlist.php プロジェクト: agundran/addige
 function index($offset = 0, $order_column = 'Username', $order_type = 'asc')
 {
     if (empty($offset)) {
         $offset = 0;
     }
     if (empty($order_column)) {
         $order_column;
     }
     if (empty($order_type)) {
         $order_type = '';
     }
     $filter = $this->input->post('ShortName');
     $limit = 20;
     //$limit = $this->input->post('hours');
     //TODO: check for valid column
     // load data
     $Users = $this->manageusermodel->get_paged_list($limit, $offset, $order_column, $order_type, $filter)->result();
     // generate pagination
     $this->load->library('pagination');
     $config['base_url'] = site_url('/manageuserlist/index');
     $config['total_rows'] = $this->manageusermodel->count_all();
     $config['per_page'] = $limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $data['title'] = "Addige User Profile";
     $data['print_them'] = site_url('/manageuserlist/print_user');
     // generate table data
     $this->load->library('table');
     $this->table->set_empty("");
     $new_order = $order_type == 'asc' ? 'desc' : 'asc';
     $this->table->set_heading(anchor('manageuserlist/index/' . $offset . '/Username/' . $new_order, 'Username'), 'Operator', 'Rolename', 'Last Login', 'Actions', '');
     $upd = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $i = 0 + $offset;
     foreach ($Users as $Users) {
         $this->table->add_row($Users->Username, $Users->Operator, $Users->Rolename, date("F j, Y, g:i a", strtotime($Users->LastActivityDate)), anchor_popup('manageuserlist/update/' . $Users->PKID, 'Update', array('class' => 'update')), anchor('manageuserlist/delete/' . $Users->PKID, 'Delete', array('class' => 'delete', 'onclick' => "return confirm('Are you sure you want to remove this User?')")));
     }
     $data['table'] = $this->table->generate();
     if ($this->uri->segment(3) == 'delete_success') {
         $data['message'] = 'The Data was successfully deleted';
     } else {
         if ($this->uri->segment(3) == 'add_success') {
             $data['message'] = 'The Data has been successfully added';
         } else {
             if ($this->uri->segment(3) == 'update_success') {
                 $data['message'] = 'The Data has been successfully updated';
             } else {
                 $data['message'] = '';
             }
         }
     }
     // load view
     $data['Role'] = $this->session->userdata('role');
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $data['print_me'] = anchor_popup('/manageuserlist/print_user/', 'Print User List', array('class' => 'print_hello_world'), $atts);
     $this->load->view('pages/template/header');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/manageuserlist_view', $data);
     $this->load->view('pages/template/footer');
 }
コード例 #4
0
 function index($offset = 0, $order_column = 'Year', $order_type = 'desc')
 {
     if (empty($offset)) {
         $offset = 0;
     }
     if (empty($order_column)) {
         $order_column = 'Year';
     }
     if (empty($order_type)) {
         $order_type = 'desc';
     }
     //TODO: check for valid column
     // load data
     $atts = array('width' => 800, 'height' => 600, 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => 0, 'screeny' => 0, 'window_name' => '_blank');
     $Users = $this->BillingSetInvoicingMonthMonthly_model->get_paged_list($this->limit, $offset, $order_column, $order_type)->result();
     // generate pagination
     $this->load->library('pagination');
     $config['base_url'] = site_url('/BillingSetInvoicingMonth/index');
     $config['total_rows'] = $this->BillingSetInvoicingMonthMonthly_model->count_all();
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $data['username'] = $this->session->userdata('username');
     $user1 = $data['username'];
     // generate table data
     $this->load->library('table');
     $this->table->set_empty("");
     $new_order = $order_type == 'asc' ? 'desc' : 'asc';
     $this->table->set_heading('Year', 'Month', 'Start Date', 'End Date', 'Action');
     $i = 0 + $offset;
     foreach ($Users as $Users) {
         $this->table->add_row($Users->Year, $Users->Month, $Users->Start_Date, $Users->End_Date, anchor_popup(array('BillingSetInvoicingMonthMonthly/update/' . $user1, $Users->Year, $Users->Month, $Users->Start_Date, $Users->End_Date), 'Select', array('class' => 'update'), $atts));
     }
     $data['currentuser'] = $this->session->userdata('username');
     $myuser = $data['currentuser'];
     $astartdate = $this->BillingSetInvoicingMonthMonthly_model->get_billingstartdate($myuser);
     $aenddate = $this->BillingSetInvoicingMonthMonthly_model->get_billingenddate($myuser);
     $cm = $this->BillingSetInvoicingMonthMonthly_model->get_currentmonth($myuser);
     $StartDate = date('Y-m-d', strtotime($astartdate));
     $EndDate = date('Y-m-d', strtotime($aenddate));
     $data['table'] = $this->table->generate();
     $data['title'] = 'Monthly Calendar';
     $data['title1'] = 'Current Month is: ' . $cm . " " . '(' . $StartDate . " " . "to" . " " . $EndDate . ")";
     if ($this->uri->segment(3) == 'delete_success') {
         $data['message'] = 'The Data was successfully deleted';
     } else {
         if ($this->uri->segment(3) == 'update_success') {
             $data['message'] = 'Invoicing Month Successfully Updated';
         } else {
             $data['message'] = '';
         }
     }
     // load view
     $data['Role'] = $this->session->userdata('role');
     $this->load->view('pages/template/header');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/BillingSetInvoicingMonthList_view', $data);
     $this->load->view('pages/template/footer');
 }
コード例 #5
0
ファイル: tmenus.php プロジェクト: codethics/proteoerp
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $filter = new DataFilter("Filtro de Menu de Datasis", "tmenus");
     $filter->modulo = new inputField("Modulo", "modulo");
     $filter->modulo->db_name = 'modulo';
     $filter->modulo->size = 20;
     $filter->titulo = new inputField("Titulo", "titulo");
     $filter->titulo->size = 30;
     $filter->titulo->db_name = 'titulo';
     $filter->ejecutar = new inputField("Ejecutar", "ejecutar");
     $filter->ejecutar->size = 20;
     $filter->ejecutar->db_name = 'ejecutar';
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('supervisor/tmenus/dataedit/show/<#codigo#>', '<#modulo#>');
     $export = anchor('supervisor/tmenus/xmlexport', 'Exportar Data');
     $import = anchor_popup('cargasarch/cargaxml', 'Importar Data', $atts);
     $grid = new DataGrid("Lista de Menu de Datasis");
     $grid->order_by("modulo", "asc");
     $grid->per_page = 15;
     $grid->column("Modulo", $uri);
     $grid->column("Titulo", "titulo");
     $grid->column("Ejecutar", "ejecutar");
     $grid->add("supervisor/tmenus/dataedit/create");
     $grid->build();
     //echo $grid->db->last_query();
     $data['content'] = $filter->output . $export . '  ---->  ' . $import . '<form>' . $grid->output . '</form>';
     $data['title'] = "<h1>Menu del Sistema</h1>";
     $data["head"] = script("jquery.pack.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #6
0
ファイル: generatebilling.php プロジェクト: agundran/addige
 function index()
 {
     if (empty($offset)) {
         $offset = 0;
     }
     if (empty($order_column)) {
         $order_column = 'Seq';
     }
     if (empty($order_type)) {
         $order_type = 'asc';
     }
     $data['currentuser'] = $this->session->userdata('username');
     $myuser = $data['currentuser'];
     $astartdate = $this->generatebillingmodel->get_billingstartdate($myuser);
     $aenddate = $this->generatebillingmodel->get_billingenddate($myuser);
     $cm = $this->generatebillingmodel->get_currentmonth($myuser);
     $StartDate = date('Y-m-d', strtotime($astartdate));
     $EndDate = date('Y-m-d', strtotime($aenddate));
     $upd = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $data['title1'] = 'Current Billing Period is: ' . $cm . " " . '(' . $StartDate . " " . "to" . " " . $EndDate . ")";
     $data['setbm'] = anchor_popup('BillingSetUpdate/index/', '(change)', array('class' => 'changebillingmonth'), $upd);
     $data['generatebill'] = anchor_popup(array('generatebilling/generatebill/' . $StartDate, $EndDate, $cm), '&#10152  Generate ', array('class' => 'generatebill'), $upd);
     //$data['filewrite'] =anchor(array('/generatebilling/writefile/'.$aStartDate,$aEndDate),'Here',array('class'=>'export'));
     $data['title'] = 'Generate Electronic Billing';
     //$data['title1'] = 'From '.$aStartDate.' to '.$aEndDate;
     //$data['sc'] = $syscode;
     // load view
     $data['Role'] = $this->session->userdata('role');
     $this->load->view('pages/template/header2');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/generatebilling_view', $data);
     $this->load->view('pages/template/footer');
 }
コード例 #7
0
ファイル: Menues.php プロジェクト: codethics/proteoerp
 function sub_menu($tabla = NULL)
 {
     if ($tabla != NULL) {
         if ($this->CI->datasis->essuper()) {
             $mSQL = "SELECT ejecutar, titulo, mensaje,target  FROM intramenu  WHERE  modulo LIKE '{$tabla}%' AND modulo<>'{$tabla}' ORDER BY titulo";
         } else {
             $mSQL = "SELECT ejecutar, titulo, mensaje,target  FROM intramenu  WHERE  modulo LIKE '{$tabla}%' AND modulo<>'{$tabla}' ORDER BY titulo";
         }
         $query = $this->CI->db->query($mSQL);
         $content['cant'] = $query->num_rows();
         if ($query->num_rows() > 0) {
             foreach ($query->result() as $row) {
                 $content["ejecutar"][] = $row->ejecutar;
                 $content["titulo"][] = $row->titulo;
                 $content["mensaje"][] = $row->mensaje;
                 if ($row->target == 'popu') {
                     $ejecutar = anchor_popup($row->ejecutar, $row->titulo, $att);
                 } elseif ($row->target == 'javascript') {
                     $ejecutar = "<a href='javascript:{$row->ejecutar}' title='{$row->titulo}'>{$row->titulo}</a> ";
                 } else {
                     $ejecutar = anchor($row->ejecutar, $row->titulo);
                 }
                 $content["link"][] = $ejecutar;
             }
         }
         return $this->CI->load->view('view_sub_menu', $content, TRUE);
     }
 }
コード例 #8
0
ファイル: billedset.php プロジェクト: agundran/addige
 function index()
 {
     $data['action'] = site_url('billedset/index/');
     $data['currentuser'] = $this->session->userdata('username');
     $myuser = $data['currentuser'];
     $astartdate = $this->legacysetmodel->get_billingstartdate($myuser);
     $aenddate = $this->legacysetmodel->get_billingenddate($myuser);
     $cm = $this->legacysetmodel->get_currentmonth($myuser);
     $StartDate = date('Y-m-d', strtotime($astartdate));
     $EndDate = date('Y-m-d', strtotime($aenddate));
     $upd = array('width' => '1300', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     //Put the value in an array to pass to the view.
     //Pass to the value to the view. Access it as '$search' in the view.
     //$this->load->view("about", $view_data);
     $data['title1'] = 'Current Billing Period is: ' . $cm . " " . '(' . $StartDate . " " . "to" . " " . $EndDate . ")";
     //$data['setbm'] = anchor('BillingSetInvoicingMonth/index/'.$syscode,'(change)',array('class'=>'changebillingmonth'));
     $data['setbm'] = anchor_popup('BillingSetUpdate/index/', '(change)', array('class' => 'changebillingmonth'), $upd);
     //$data['createinvoice'] = anchor('legacyinvoicing/index/'.$syscode,'&#10152  Generate ',array('class'=>'createinvoice'));
     $data['createinvoice'] = anchor('billeddetail/index/', '&#10152  Generate ', array('class' => 'createinvoice'));
     $data['title'] = "Create Invoices / Logs";
     $data['title2'] = "Summary";
     // redirect('legacyinvoicing/index/'.$syscode,'Refresh');
     // load view
     $data['Role'] = $this->session->userdata('role');
     $this->load->view('pages/template/header2');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/billedset_view', $data);
     //$this->load->view('pages/template/footer');
 }
コード例 #9
0
 function index()
 {
     if (empty($syscode)) {
         $syscode = null;
     }
     $syscode = $this->input->post('syscode');
     $data['action'] = site_url('generatebillingbycust/index/' . $syscode);
     $data['currentuser'] = $this->session->userdata('username');
     $myuser = $data['currentuser'];
     $astartdate = $this->generatebillingbycustmodel->get_billingstartdate($myuser);
     $aenddate = $this->generatebillingbycustmodel->get_billingenddate($myuser);
     $cm = $this->generatebillingbycustmodel->get_currentmonth($myuser);
     $StartDate = date('Y-m-d', strtotime($astartdate));
     $EndDate = date('Y-m-d', strtotime($aenddate));
     $upd = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     //Put the value in an array to pass to the view.
     // $data['sc'] = "9129";
     $data['syscode'] = $syscode;
     //Pass to the value to the view. Access it as '$search' in the view.
     //$this->load->view("about", $view_data);
     $data['title1'] = 'Current Billing Period is: ' . $cm . " " . '(' . $StartDate . " " . "to" . " " . $EndDate . ")";
     $data['setbm'] = anchor_popup('BillingSetUpdate/index/', '(change)', array('class' => 'changebillingmonth'), $upd);
     if ($syscode == null) {
         $data['generatebill'] = "";
     } else {
         //$data['createinvoice'] = anchor('legacyinvoicing/index/'.$syscode,'&#10152  Generate ',array('class'=>'createinvoice'));
         $data['generatebill'] = anchor_popup(array('generatebillingbycust/generatebill/' . $syscode, $StartDate, $EndDate, $cm), '&#10152  Generate ', array('class' => 'generatebill'), $upd);
     }
     // redirect('legacyinvoicing/index/'.$syscode,'Refresh');
     // load view
     $data['Role'] = $this->session->userdata('role');
     $this->load->view('pages/template/header2');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/generatebillingbycust_view', $data);
 }
コード例 #10
0
ファイル: player.php プロジェクト: Argentinian/isamp-panel
 private function actions($player)
 {
     $acts = "";
     $acts .= anchor("player/user/" . $player->Name, "<img src='/gtasa-mapicons/zoom.png' title='Detalles' width='18px' height='18px'/>");
     $acts .= anchor_popup("bans/ban/" . $player->Id, '<img src="/gtasa-mapicons/property_red.gif" title="Banear"/>');
     //$acts.=anchor("#",'<img src="/gtasa-mapicons/marker.gif"/>');
     return $acts;
 }
コード例 #11
0
ファイル: Blog.php プロジェクト: autobitacora/CITest
 public function producto($producto = "no hay", $id = "ninguno")
 {
     echo ucfirst(urldecode($producto));
     echo "</BR>";
     echo ucfirst(urldecode($id));
     echo "</BR>";
     echo anchor_popup('http://google.com', 'Un buscador');
 }
コード例 #12
0
ファイル: ebilldetail.php プロジェクト: agundran/addige
 function index($seq)
 {
     if (empty($offset)) {
         $offset = 0;
     }
     if (empty($order_column)) {
         $order_column = 'Seq';
     }
     if (empty($order_type)) {
         $order_type = 'asc';
     }
     if (empty($filter)) {
         $filter = 0;
     }
     $currentuser = $this->session->userdata('username');
     $StartDate = $this->ebilldetailmodel->get_billingstartdate($currentuser);
     $EndDate = $this->ebilldetailmodel->get_billingenddate($currentuser);
     $upd = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $filter = $this->input->post('Name');
     $Users = $this->ebilldetailmodel->get_contract_detail($seq)->result();
     // generate pagination
     $this->load->library('pagination');
     $config['base_url'] = site_url('/ebilldetail/index');
     //$config['total_rows'] = $this->ebilldetailmodel->count_all();
     //$config['total_rows'] = 2000;
     $config['total_rows'] = $this->ebilldetailmodel->count_all($seq);
     //$config['per_page'] = $this->limit;
     $config['per_page'] = 20;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $data['title'] = "Contracts for:  " . $this->ebilldetailmodel->get_customer_name($seq);
     $data['title1'] = 'Billing Date from ' . $StartDate . ' to ' . $EndDate;
     // generate table datav
     $this->load->library('table');
     $this->table->set_empty("");
     $new_order = $order_type == 'asc' ? 'desc' : 'asc';
     $this->table->set_heading('Contract', 'SysCode', 'SiteName', 'ContractName', 'StartDate', 'EndDate', 'Invoice', 'Spot Log');
     $i = 0 + $offset;
     $data['tblmsg'] = "";
     foreach ($Users as $Users) {
         if ($Users->c1Se == null) {
             $data['tblmsg'] = "No Contracts were found";
         } else {
             $this->table->add_row($Users->c1Se, $Users->c4S, $Users->c1SN, $Users->c1C, $Users->c1S, $Users->c1E, anchor_popup(array('invoicingprint/index/' . $Users->c1Se, $Users->c1S, $Users->c1E), 'Print Invoice', array('class' => 'print_preview'), $upd), anchor_popup(array('prtspotlog/index/' . $Users->c1Se, $Users->c1S, $Users->c1E), 'Print Log', array('class' => 'prtspotlog'), $upd));
             //anchor('selectsite/copy/'.$Users->SiteName,'Copy Entry',array('class'=>'copy') )
             //.'   '.
             //anchor('selectsite/delete/'.$Users->SiteName,'Delete',array('class'=>'delete','onclick'=>"return confirm('Are you sure you want to remove this Contract?')")))
         }
     }
     $data['table'] = $this->table->generate();
     // load view
     $data['Role'] = $this->session->userdata('role');
     $this->load->view('pages/template/header');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/ebilldetail_view', $data);
     $this->load->view('pages/template/footer');
 }
コード例 #13
0
ファイル: mappinglistupdate.php プロジェクト: agundran/addige
 function index($offset = 0, $order_column = 'SiteName', $order_type = 'asc')
 {
     if (empty($offset)) {
         $offset = 0;
     }
     if (empty($order_column)) {
         $order_column = 'SiteName';
     }
     if (empty($order_type)) {
         $order_type = 'asc';
     }
     //TODO: check for valid column
     // load data
     $Users = $this->mappinglistupdatemodel->get_by_id($order_column)->result();
     $upd = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $this->load->library('pagination');
     $config['base_url'] = site_url('/mappinglistupdate/index');
     $config['total_rows'] = $this->mappinglistupdatemodel->count_all();
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     // generate table data
     $this->load->library('table');
     $this->table->set_empty("");
     $new_order = $order_type == 'asc' ? 'desc' : 'asc';
     $this->table->set_heading(anchor('mappinglistupdate/index/' . $offset . '/Network/' . $new_order, 'Network'), anchor('mappinglistupdate/index/' . $offset . '/HENumber/' . $new_order, 'Head End'), anchor('mappinglistupdate/index/' . $offset . '/NetworkNum/' . $new_order, 'Network'), 'Actions');
     $i = 0 + $offset;
     foreach ($Users as $Users) {
         $this->table->add_row($Users->Network, $Users->HENumber, $Users->NetworkNum, anchor_popup(array('mappinglistupdate/update/' . $order_column, $Users->Network), 'update', array('class' => 'update'), $upd));
     }
     $data['table'] = $this->table->generate();
     if ($this->uri->segment(3) == 'delete_success') {
         $data['message'] = 'The Data was successfully deleted';
     } else {
         if ($this->uri->segment(3) == 'add_success') {
             $data['message'] = 'The Data has been successfully added';
         } else {
             if ($this->uri->segment(3) == 'update_success') {
                 $data['message'] = 'The Data has been successfully updated';
             } else {
                 $data['message'] = '';
             }
         }
     }
     $data['SiteName'] = $order_column;
     $data['link_back'] = anchor('mappinglist/index/', 'Back to Site List', array('class' => 'Back'));
     $data['add_network'] = anchor_popup('mappinglist/validate_add/', 'Add New Network', array('class' => 'AddNetwork'), $upd);
     //$data['SSID'] = $Users->SSID;
     // load view
     $data['Role'] = $this->session->userdata('role');
     $this->load->view('pages/template/header');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/mappinglistupdate_view', $data);
     $this->load->view('pages/template/footer');
 }
コード例 #14
0
ファイル: CueEntrylist.php プロジェクト: agundran/addige
 function index($offset = 0, $order_column = 'Username', $order_type = 'asc')
 {
     if (empty($offset)) {
         $offset = 0;
     }
     if (empty($order_column)) {
         $order_column = 'Username';
     }
     if (empty($order_type)) {
         $order_type = 'asc';
     }
     //TODO: check for valid column
     // load data
     //Search
     $filter = $this->input->post('Description');
     $Users = $this->CueEntryModel->get_paged_list($this->limit, $offset, $order_column, $order_type, $filter)->result();
     $upd = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     // generate pagination
     $this->load->library('pagination');
     $config['base_url'] = site_url('/CueEntrylist/index');
     $config['total_rows'] = $this->CueEntryModel->count_all();
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     // generate table data
     $this->load->library('table');
     $this->table->set_empty("");
     $new_order = $order_type == 'asc' ? 'desc' : 'asc';
     $this->table->set_heading(anchor('CueEntrylist/index/' . $offset . '/Name/' . $new_order, 'Name'), anchor('CueEntrylist/index/' . $offset . '/Description/' . $new_order, 'Description'), anchor('CueEntrylist/index/' . $offset . '/Number/' . $new_order, 'Num'), anchor('CueEntrylist/index/' . $offset . '/TimeAvail' . $new_order, 'Sec/Hour'), anchor('CueEntrylist/index/' . $offset . '/NCCAlias/' . $new_order, 'Alias'), 'Action');
     $i = 0 + $offset;
     foreach ($Users as $Users) {
         $this->table->add_row($Users->Name, $Users->Description, $Users->Number, $Users->TimeAvail, $Users->NCCAlias, anchor_popup('CueEntrylist/update/' . $Users->Name, 'update', array('class' => 'update'), $upd) . '   ' . anchor('CueEntrylist/delete/' . $Users->Name, 'delete', array('class' => 'delete', 'onclick' => "return confirm('Are you sure you want to remove this Network?')")));
     }
     $data['table'] = $this->table->generate();
     if ($this->uri->segment(3) == 'delete_success') {
         $data['message'] = 'The Data was successfully deleted';
     } else {
         if ($this->uri->segment(3) == 'add_success') {
             $data['message'] = 'The Data has been successfully added';
         } else {
             if ($this->uri->segment(3) == 'update_success') {
                 $data['message'] = 'The Data has been successfully updated';
             } else {
                 $data['message'] = '';
             }
         }
     }
     $data['add_networklink'] = anchor_popup('CueEntrylist/validate_add/', 'Add New Network', array('class' => 'AddNetwork'), $upd);
     // load view
     $data['Role'] = $this->session->userdata('role');
     $this->load->view('pages/template/header');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/CueEntrylist_view', $data);
     $this->load->view('pages/template/footer');
 }
コード例 #15
0
ファイル: scst.php プロジェクト: codethics/proteoerp
 function datafilter()
 {
     $this->rapyd->set_connection('farmax');
     $this->rapyd->load_db();
     $this->rapyd->load("datagrid", "datafilter");
     $this->rapyd->uri->keep_persistence();
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $modbus = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;digo Proveedor', 'nombre' => 'Nombre', 'rif' => 'RIF'), 'filtro' => array('proveed' => 'C&oacute;digo Proveedor', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'proveed'), 'titulo' => 'Buscar Proveedor');
     $boton = $this->datasis->modbus($modbus);
     $filter = new DataFilter("Filtro de Compras");
     $filter->db->select = array('numero', 'fecha', 'vence', 'nombre', 'montoiva', 'montonet', 'proveed', 'control');
     $filter->db->from('scst');
     $filter->fechad = new dateonlyField("Desde", "fechad", 'd/m/Y');
     $filter->fechah = new dateonlyField("Hasta", "fechah", 'd/m/Y');
     $filter->fechad->clause = $filter->fechah->clause = "where";
     $filter->fechad->db_name = $filter->fechah->db_name = "fecha";
     $filter->fechah->size = $filter->fechad->size = 10;
     $filter->fechad->operator = ">=";
     $filter->fechah->operator = "<=";
     //$filter->fecha_recep = new dateonlyField("Fecha Recepci&oacute;n", "fecha",'d/m/Y');
     //$filter->fecha_recep->clause  =$filter->fecha->clause="where";
     //$filter->fecha_recep->db_name =$filter->fecha->db_name="recep";
     //$filter->fecha_recep->insertValue = date("Y-m-d");
     //$filter->fecha_recep->size=10;
     //$filter->fecha_recep->operator="=";
     //$filter->fechah->group="Fecha Recepci&oacute;n";
     //$filter->fechad->group="Fecha Recepci&oacute;n";
     $filter->numero = new inputField("Factura", "numero");
     $filter->numero->size = 20;
     $filter->proveedor = new inputField("Proveedor", "proveed");
     $filter->proveedor->append($boton);
     $filter->proveedor->db_name = "proveed";
     $filter->proveedor->size = 20;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('farmacia/scst/dataedit/show/<#control#>', '<#numero#>');
     $uri2 = anchor_popup('formatos/verhtml/COMPRA/<#control#>', "Ver HTML", $atts);
     $grid = new DataGrid();
     $grid->order_by("fecha", "desc");
     $grid->per_page = 15;
     $grid->column_orderby("Factura", $uri, 'control');
     $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", 'fecha', "align='center'");
     $grid->column_orderby("Vence", "<dbdate_to_human><#vence#></dbdate_to_human>", 'vence', "align='center'");
     $grid->column_orderby("Nombre", "nombre", 'nombre');
     $grid->column_orderby("IVA", "montoiva", 'montoiva', "align='right'");
     $grid->column_orderby("Monto", "montonet", 'montonet', "align='right'");
     $grid->column_orderby("Control", 'pcontrol', 'pcontrol', "align='right'");
     $grid->add("compras/agregar");
     $grid->build();
     //echo $grid->db->last_query();
     $data['content'] = $filter->output . $grid->output;
     $data['head'] = $this->rapyd->get_head();
     $data['title'] = '<h1>Compras</h1>';
     $this->load->view('view_ventanas', $data);
 }
コード例 #16
0
ファイル: menu_helper.php プロジェクト: codethics/proteoerp
function arr2link($arr, $utf8c = false)
{
    $dialogos = '';
    $divis = '';
    $att = array('width' => $arr['ancho'], 'height' => $arr['alto'], 'scrollbars' => 'Yes', 'status' => 'Yes', 'resizable' => 'Yes', 'screenx' => "'+((screen.availWidth/2)-" . intval($arr['ancho'] / 2) . ")+'", 'screeny' => "'+((screen.availHeight/2)-" . intval($arr['alto'] / 2) . ")+'");
    $indi = parsePattern($arr['ejecutar']);
    if ($utf8c) {
        $arr['titulo'] = utf8_encode($arr['titulo']);
        $arr['mensaje'] = utf8_encode($arr['mensaje']);
    }
    if ($arr['target'] == 'popu') {
        $ejecutar = anchor_popup($indi, $arr['titulo'], $att);
    } elseif ($arr['target'] == 'tab') {
        $ejecutar = anchor_popup($indi, $arr['titulo']);
        $ejecutar = str_replace('_blank', '_nt' . $arr['modulo'], $ejecutar);
    } elseif ($arr['target'] == 'javascript') {
        $ejecutar = "<a href='javascript:" . str_replace('\'', "\\'", $indi) . "' title='" . $arr['mensaje'] . "'>" . $arr['titulo'] . "</a>";
    } elseif ($arr['target'] == 'dialogo') {
        $ejecutar = "<a href='javascript:void(0);' title='" . $arr['mensaje'] . "' onclick='f" . $arr['modulo'] . "();'>" . $arr['titulo'] . "</a> ";
        $dialogos .= '<script>';
        $dalto = $arr['alto'] - 100;
        $dancho = $arr['ancho'];
        $ialto = $arr['alto'] - 180;
        $iancho = $arr['ancho'] - 50;
        //$(function(){
        $dialogos .= '
			$("#d' . $arr['modulo'] . '").dialog({
				autoOpen:false, modal:false, width:' . $dancho . ', height:' . $dalto . ',minimize: "#toolbar",
				open: function(ev, ui){$(\'#d' . $arr['modulo'] . '\').html(\'<iframe src="' . base_url() . $indi . '" width="100%", height="100%"  seamless></iframe>\');}
			}).dialogExtend({"maximizable":true,"minimizable":true,"dblclick":"maximize","icons":{"maximize":"ui-icon-arrow-4-diag" },"icons":{"minimize":"ui-icon-circle-minus"}});
			function f' . $arr['modulo'] . '(){$("#d' . $arr['modulo'] . '").dialog("open");}
		';
        $dialogos .= '</script>';
        $divis .= '<div id="d' . $arr['modulo'] . '" title="' . $arr['titulo'] . ' (' . $arr['modulo'] . ')"></div>';
    } elseif ($arr['target'] == 'ajax') {
        $ejecutar = "<a href='javascript:void(0);' title='" . $arr['mensaje'] . "' onclick='f" . $arr['modulo'] . "();'>" . $arr['titulo'] . "</a> ";
        $dialogos .= '<script>';
        $dalto = $arr['alto'] - 100;
        $dancho = $arr['ancho'];
        $ialto = $arr['alto'] - 180;
        $iancho = $arr['ancho'] - 50;
        //$(function(){base_url().$indi
        $dialogos .= '
			$("#d' . $arr['modulo'] . '").dialog({
				autoOpen:false, modal:false, width:' . $dancho . ', height:' . $dalto . ',minimize: "#toolbar"
			}).dialogExtend({"maximizable":true,"minimizable":true,"dblclick":"maximize","icons":{"maximize":"ui-icon-arrow-4-diag" },"icons":{"minimize":"ui-icon-circle-minus"}});
			function f' . $arr['modulo'] . '(){$("#d' . $arr['modulo'] . '").load("' . base_url() . $indi . '").dialog("open");}
		';
        $dialogos .= '</script>';
        $divis .= '<div id="d' . $arr['modulo'] . '" title="' . $arr['titulo'] . ' (' . $arr['modulo'] . ')"></div>';
    } else {
        $ejecutar = anchor($indi, $arr['titulo']);
    }
    return $ejecutar . $divis . $dialogos;
}
コード例 #17
0
ファイル: bans.php プロジェクト: Argentinian/isamp-panel
 private function actions($ban)
 {
     $acts = "";
     $acts .= anchor("player/user/" . $ban->pName, "<img src='/gtasa-mapicons/zoom.png' title 'Detalles' width='18px' height='18px'/>");
     if ($ban->banActive == 1) {
         $acts .= anchor_popup("bans/lift/" . $ban->pID, '<img src="/gtasa-mapicons/property_green.gif" title="Levantar ban" />');
     } else {
         $acts .= anchor_popup("bans/ban/" . $ban->pID, '<img src="/gtasa-mapicons/property_red.gif" title "Banear" />');
     }
     return $acts;
 }
コード例 #18
0
ファイル: pfaclitemayor.php プロジェクト: codethics/proteoerp
 function filteredgrid()
 {
     $this->rapyd->load('datagrid', 'datafilter');
     $this->rapyd->uri->keep_persistence();
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $atts2 = array('width' => '480', 'height' => '240', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '980', 'screeny' => '760');
     $scli = array('tabla' => 'scli', 'columnas' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre'), 'retornar' => array('cliente' => 'cod_cli'), 'titulo' => 'Buscar Cliente');
     $boton = $this->datasis->modbus($scli);
     $filter = new DataFilter('Filtro de Pedidos Clientes al mayor', 'pfac');
     $filter->fechad = new dateonlyField('Desde', 'fechad');
     $filter->fechah = new dateonlyField('Hasta', 'fechah');
     $filter->fechad->clause = $filter->fechah->clause = 'where';
     $filter->fechad->db_name = $filter->fechah->db_name = 'fecha';
     $filter->fechah->size = $filter->fechad->size = 10;
     $filter->fechah->rule = $filter->fechad->rule = 'trim';
     $filter->fechad->operator = '>=';
     $filter->fechah->operator = '<=';
     $filter->fechad->group = 'uno';
     $filter->fechah->group = 'uno';
     $filter->numero = new inputField('N&uacute;mero', 'numero');
     $filter->numero->size = 10;
     $filter->numero->rule = 'trim';
     $filter->numero->group = 'dos';
     $filter->cliente = new inputField('Cliente', 'cod_cli');
     $filter->cliente->size = 8;
     $filter->cliente->append($boton);
     $filter->cliente->rule = 'trim';
     $filter->cliente->group = 'dos';
     $filter->buttons('reset', 'search');
     $filter->build('dataformfiltro');
     $uri = anchor($this->url . 'dataedit/<raencode><#cod_cli#></raencode>/show/<#id#>', '<#numero#>');
     $uri2 = anchor_popup('formatos/verhtml/PFAC/<#numero#>', 'Ver HTML', $atts);
     $uri3 = anchor('ventas/sfac_add/creafrompfac/<#numero#>/create', 'Facturar');
     $grid = new DataGrid('');
     $grid->order_by('numero', 'desc');
     $grid->per_page = 50;
     $grid->column_orderby('N&uacute;mero', $uri, 'numero');
     $grid->column_orderby('Factura', 'factura', 'factura');
     $grid->column_orderby('Fecha', '<dbdate_to_human><#fecha#></dbdate_to_human>', 'fecha', 'align=\'center\'');
     $grid->column_orderby('Cliente', 'cod_cli', 'cod_cli');
     $grid->column_orderby('Nombre', 'nombre', 'nombre');
     $grid->column_orderby('IVA', '<nformat><#iva#></nformat>', 'iva', "align=right");
     $grid->column_orderby('Total', '<nformat><#totalg#></nformat>', 'totalg', "align=right");
     $grid->column_orderby('Status', 'status', 'status');
     $grid->add($this->url . 'filterscli');
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['head'] = $this->rapyd->get_head();
     //$data['head']   .= script('jquery-min.js');
     //$data['head']   .= script('nformat.js');
     //$data['head']   .= script('jquery-ui.custom.min.js');
     $data['title'] = heading('Pedidos Clientes');
     $this->load->view('view_ventanas', $data);
 }
コード例 #19
0
ファイル: ebillsummary.php プロジェクト: agundran/addige
 function index($offset = 0, $order_column = '', $order_type = 'asc')
 {
     if (empty($offset)) {
         $offset = 0;
     }
     if (empty($order_column)) {
         $order_column = 'ShortName';
     }
     if (empty($order_type)) {
         $order_type = 'asc';
     }
     if (empty($filter)) {
         $filter = 0;
     }
     $currentuser = $this->session->userdata('username');
     $BMStartDate = $this->ebillsummarymodel->get_billingstartdate($currentuser);
     $BMEndDate = $this->ebillsummarymodel->get_billingenddate($currentuser);
     $upd = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $filter = $this->input->post('Name');
     $limit = $this->ebillsummarymodel->count_all();
     $Users = $this->ebillsummarymodel->get_paged_list($limit, $offset, $order_column, $order_type, $filter)->result();
     // generate pagination
     $this->load->library('pagination');
     $config['base_url'] = site_url('/billingelectronic/index');
     $config['total_rows'] = $this->ebillsummarymodel->count_all();
     $config['per_page'] = $this->ebillsummarymodel->count_all();
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $data['title'] = "All Customers";
     $data['title2'] = "From" . " " . $BMStartDate . " " . "to" . " " . $BMEndDate;
     // generate table datav
     $this->load->library('table');
     $this->table->set_empty("");
     $new_order = $order_type == 'asc' ? 'desc' : 'asc';
     $tmpl = array('table_open' => '<table id="table2excel" class="table2excel">');
     $this->table->set_template($tmpl);
     $this->table->set_heading('Customer', 'Gross Booked', 'Gross Earned', 'Select');
     $i = 0 + $offset;
     $totalgch = 0;
     foreach ($Users as $Users) {
         $gch = $this->ebillsummarymodel->computepercust($Users->Seq, $BMStartDate, $BMEndDate);
         $this->table->add_row($Users->Name, number_format($gch, 2), '0.0', anchor_popup(array('legacyinvoicingcust/index/' . $Users->Seq), 'View Details', array('class' => 'view'), $upd));
         $totalgch += $gch;
     }
     $this->table->add_row("Total", number_format($totalgch, 2), "0.00", "");
     $data['table'] = $this->table->generate();
     // load view
     $data['Role'] = $this->session->userdata('role');
     $this->load->view('pages/template/header');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/ebillsummary_view', $data);
     $this->load->view('pages/template/footer');
 }
コード例 #20
0
ファイル: relch.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->rapyd->load("datafilter2", "datagrid");
     $filter = new DataFilter2("", "relch");
     $filter->db->select(array("relch.status status2", "relch.id", "relch.numero", "relch.usuario", "relch.fecha", "IF(relch.destino='C','Caja','Interno') destino", "mbanc.cheque"));
     $filter->db->join("mbanc", "relch.id=mbanc.relch");
     $filter->db->groupby("relch.numero");
     $filter->id = new inputField("Ref. Relacion", "id");
     $filter->id->db_name = "relch.id";
     $filter->numero = new inputField("Numero", "numero");
     $filter->numero->db_name = "relch.numero";
     $filter->usuario = new dropdownField("Usuario", "usuario");
     $filter->usuario->db_name = "relch.usuario";
     $filter->usuario->option("", "");
     $filter->usuario->options("SELECT us_codigo,CONCAT_WS(' ',us_codigo,us_nombre) FROM usuario");
     $filter->usuario->style = "width:200px;";
     $filter->fecha = new dateonlyField("Fecha", 'fecha', 'd/m/Y');
     $filter->fecha->db_name = "mbanc.fecha";
     $filter->fecha->dbformat = 'Y-m-d';
     $filter->cheque = new inputField("Cheque", "cheque");
     $filter->cheque->db_name = "mbanc.cheque";
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('tesoreria/relch/dataedit/modify/<#id#>', '<#id#>');
     $uri2 = anchor('tesoreria/relch/busca/<#id#>', 'Modificar');
     $grid = new DataGrid("");
     $grid->per_page = 20;
     $grid->order_by("relch.id", "desc");
     $grid->column_orderby("id", $uri, "relch.id");
     $grid->column_orderby("Numero", "numero", "numero");
     $grid->column_orderby("Cheque", "cheque", "cheque");
     $grid->column_orderby("Usuario", "usuario", "usuario");
     $grid->column_orderby("Fecha", "fecha", "fecha");
     $grid->column_orderby("Destino", "destino", "destino");
     $grid->column_orderby("Fondo", "fondo", "fondo");
     $grid->column_orderby("Estado", "status2", "status2");
     $grid->column("Modificar Cheques", $uri2);
     $grid->build();
     //$grid->db->last_query();
     $atts3 = array('width' => '640', 'height' => '480', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '5', 'screeny' => '5', 'id' => 'recibo');
     $salida = anchor('tesoreria/relch/busca/', "Crear Relacion");
     $salida .= '</br>';
     $salida .= anchor_popup('reportes/ver/relch/', "Ordenes Pagadas", $atts3);
     $salida .= '</br>';
     $salida .= anchor_popup('reportes/ver/relch2/', "Cheques Emitidos", $atts3);
     $salida .= '</br>';
     $salida .= anchor_popup('reportes/ver/relch3/', "Anulacion y Reposicion", $atts3);
     $data['content'] = $filter->output . $salida . $grid->output;
     $data['title'] = "Relaciones de Ordenes Pagadas";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #21
0
ファイル: broadcastcalendar.php プロジェクト: agundran/addige
 function index($offset = 0, $order_column = 'Year', $order_type = 'desc')
 {
     if (empty($offset)) {
         $offset = 0;
     }
     if (empty($order_column)) {
         $order_column = 'Year';
     }
     if (empty($order_type)) {
         $order_type = 'desc';
     }
     $filter = $this->input->post('Year');
     //TODO: check for valid column
     // load data
     $Users = $this->broadcastcalendarmodel->get_paged_list($this->limit, $offset, $order_column, $order_type, $filter)->result();
     // generate pagination
     $this->load->library('pagination');
     $config['base_url'] = site_url('/broadcastcalendar/index');
     $config['total_rows'] = $this->broadcastcalendarmodel->count_all();
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     // generate table data
     $this->load->library('table');
     $this->table->set_empty("");
     $new_order = $order_type == 'desc' ? 'desc' : 'asc';
     $this->table->set_heading(anchor('broadcastcalendar/index/' . $offset . '/Year/' . $new_order, 'Year'), anchor('broadcastcalendar/index/' . $offset . '/Month/' . $new_order, 'Month'), anchor('broadcastcalendar/index/' . $offset . '/Start_Week/' . $new_order, 'Start Week'), anchor('broadcastcalendar/index/' . $offset . '/End_Week/' . $new_order, 'End Week'), anchor('broadcastcalendar/index/' . $offset . '/Start_Date/' . $new_order, 'Start Date'), anchor('broadcastcalendar/index/' . $offset . '/End_Date/' . $new_order, 'End Date'), 'Actions', "");
     $upd = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $i = 0 + $offset;
     foreach ($Users as $Users) {
         $this->table->add_row($Users->Year, $Users->Month, $Users->Start_Week, $Users->End_Week, $Users->Start_Date, $Users->End_Date, anchor_popup(array('broadcastcalendar/update/' . $Users->Year, $Users->Month), 'Update', array('class' => 'update'), $upd), anchor(array('broadcastcalendar/delete/' . $Users->Year, $Users->Month), 'Delete', array('class' => 'delete', 'onclick' => "return confirm('Are you sure you want to remove this Calendar Entry?')")));
     }
     $data['table'] = $this->table->generate();
     $upd = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     if ($this->uri->segment(3) == 'delete_success') {
         $data['message'] = 'The Data was successfully deleted';
     } else {
         if ($this->uri->segment(3) == 'add_success') {
             $data['message'] = 'The Data has been successfully added';
         } else {
             $data['message'] = '';
         }
     }
     $data['add_calendar'] = anchor_popup('broadcastcalendar/validate_add', 'Add Calendar Entry', array('class' => 'addentry'), $upd);
     // load view
     $data['Role'] = $this->session->userdata('role');
     $this->load->view('pages/template/header2');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/broadcastcalendar_view', $data);
     $this->load->view('pages/template/footer');
 }
コード例 #22
0
ファイル: bitacora.php プロジェクト: codethics/proteoerp
 function filteredgrid()
 {
     $this->rapyd->load("datafilter2", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $modbus = array('tabla' => 'usuario', 'columnas' => array('us_codigo' => 'C&oacute;digo', 'us_nombre' => 'Nombre'), 'filtro' => array('us_nombre' => 'nombre'), 'retornar' => array('us_codigo' => 'usuario'), 'titulo' => 'Buscar Usuario');
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $link = anchor_popup('supervisor/bitacora/resumen', 'Ver Promedio de &eacute;xitos', $atts);
     $filter = new DataFilter2("Filtro de Bit&aacute;cora ({$link})");
     $select = array("actividad", "fecha", "hora", "nombre", "comentario", "actividad", "id", 'evaluacion', "if(revisado='P','Pendiente',if(revisado='B','Bueno',if(revisado='C','Consulta','Fallo'))) revisado");
     $filter->db->select($select);
     $filter->db->from('bitacora');
     $filter->db->orderby('fecha AND hora', 'desc');
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->clause = "where";
     $filter->fecha->operator = "=";
     $filter->fecha->insertValue = date("Y-m-d");
     $filter->revisado = new dropdownField("Revisado", "revisado");
     $filter->revisado->option("", "Todos");
     $filter->revisado->option("P", "Pendiente");
     $filter->revisado->option("F", "Fallos");
     $filter->revisado->option("B", "Buenos");
     $filter->revisado->option("C", "Consulta");
     $filter->usuario = new inputField("C&oacute;digo de usuario", "usuario");
     $filter->usuario->size = 11;
     $filter->usuario->append($this->datasis->modbus($modbus));
     $filter->actividad = new inputField("Actividad", "actividad");
     $filter->actividad->clause = "likesensitive";
     $filter->actividad->append("Sencible a las Mayusc&uacute;las");
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = "supervisor/bitacora/dataedit/show/<#id#>";
     $grid = new DataGrid("Lista de Bitacora");
     $grid->order_by("fecha", "desc");
     $grid->per_page = 10;
     $link = anchor($uri, "<dbdate_to_human><#fecha#></dbdate_to_human>");
     $grid->column("Fecha", $link);
     $grid->column("Hora", "hora");
     $grid->column("Nombre", "nombre");
     $grid->column("Actividad realizada", "actividad");
     $grid->column("Resultado", "evaluacion");
     $grid->column("Revisado", "revisado");
     $grid->add("supervisor/bitacora/dataedit/create");
     $grid->build();
     $data["crud"] = $filter->output . $grid->output;
     $data["titulo"] = 'Bit&aacute;cora de Bitacora';
     //echo $filter->db->last_query();
     $data['content'] = $filter->output . $grid->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = '<h1>Control de Bit&aacute;cora</h1>';
     $this->load->view('view_ventanas', $data);
 }
コード例 #23
0
 function index($offset = 0, $order_column = 'ShortName', $order_type = 'asc')
 {
     if (empty($offset)) {
         $offset = 0;
     }
     if (empty($order_column)) {
         $order_column = 'ShortName';
     }
     if (empty($order_type)) {
         $order_type = 'asc';
     }
     $filter = $this->input->post('ShortName');
     //TODO: check for valid column
     // load data
     $Users = $this->manageoperatormodel->get_paged_list($this->limit, $offset, $order_column, $order_type, $filter)->result();
     // generate pagination
     $this->load->library('pagination');
     $config['base_url'] = site_url('/manageoperatorlist/index');
     $config['total_rows'] = $this->manageoperatormodel->count_all();
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     // generate table data
     $this->load->library('table');
     $this->table->set_empty("");
     $new_order = $order_type == 'asc' ? 'desc' : 'asc';
     $this->table->set_heading(anchor('manageoperatorlist/index/' . $offset . '/ShortName/' . $new_order, 'ShortName'), anchor('manageoperatorlist/index/' . $offset . '/FTP Address/' . $new_order, 'FTPAddress'), anchor('manageoperatorlist/index/' . $offset . '/Address1/' . $new_order, 'Address1'), anchor('manageoperatorlist/index/' . $offset . '/City/' . $new_order, 'City'), anchor('manageoperatorlist/index/' . $offset . '/State/' . $new_order, 'State'), 'Actions', "");
     $upd = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $i = 0 + $offset;
     foreach ($Users as $Users) {
         $this->table->add_row($Users->ShortName, $Users->FTPAddress, $Users->Address1, $Users->City, $Users->State, anchor_popup('manageoperatorlist/update/' . $Users->ShortName, 'Update', array('class' => 'update'), $upd), anchor('manageoperatorlist/delete/' . $Users->ShortName, 'Delete', array('class' => 'delete', 'onclick' => "return confirm('Are you sure you want to remove this Operator?')")));
     }
     $data['table'] = $this->table->generate();
     if ($this->uri->segment(3) == 'delete_success') {
         $data['message'] = 'The Data was successfully deleted';
     } else {
         if ($this->uri->segment(3) == 'add_success') {
             $data['message'] = 'The Data has been successfully added';
         } else {
             $data['message'] = '';
         }
     }
     // load view
     $data['Role'] = $this->session->userdata('role');
     $this->load->view('pages/template/header');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/manageoperatorlist_view', $data);
     $this->load->view('pages/template/footer');
 }
コード例 #24
0
 function index($offset = 0, $order_column = 'Date', $order_type = 'asc')
 {
     if (empty($offset)) {
         $offset = 0;
     }
     if (empty($order_column)) {
         $order_column = 'Date';
     }
     if (empty($order_type)) {
         $order_type = 'asc';
     }
     $filter = $this->input->post('Name');
     $Users = $this->AuditTrail->get_paged_list($this->limit, $offset, $order_column, $order_type, $filter)->result();
     // generate pagination
     $this->load->library('pagination');
     $config['base_url'] = site_url('/ControllerAuditTrail/index');
     $config['total_rows'] = $this->AuditTrail->count_all();
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     // generate table data
     $this->load->library('table');
     $this->table->set_empty("");
     $new_order = $order_type == 'asc' ? 'desc' : 'asc';
     $this->table->set_heading(anchor('ControllerAuditTrail/index/' . $offset . '/User/' . $new_order, 'User'), anchor('ControllerAuditTrail/index/' . $offset . '/Role/' . $new_order, 'Role'), anchor('ControllerAuditTrail/index/' . $offset . '/Action/' . $new_order, 'Action'), anchor('ControllerAuditTrail/index/' . $offset . '/Date/' . $new_order, 'Date'), anchor('ControllerAuditTrail/index/' . $offset . '/IPAddress/' . $new_order, 'IPAddress'), 'Actions');
     $i = 0 + $offset;
     foreach ($Users as $Users) {
         $this->table->add_row($Users->User, $Users->Role, $Users->Action, $Users->Date, $Users->IPAddress, anchor('ControllerAuditTrail/delete/' . $Users->User, 'delete', array('class' => 'delete', 'onclick' => "return confirm('Are you sure you want to remove this Operator?')")));
     }
     $data['table'] = $this->table->generate();
     if ($this->uri->segment(3) == 'delete_success') {
         $data['message'] = 'The Data was successfully deleted';
     } else {
         if ($this->uri->segment(3) == 'add_success') {
             $data['message'] = 'The Data has been successfully added';
         } else {
             $data['message'] = '';
         }
     }
     // load view
     $data['Role'] = $this->session->userdata('role');
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $data['print_me'] = anchor_popup('/ControllerAudittrail/print_hello_world/', 'Print Audit Trail List', array('class' => 'print_hello_world'), $atts);
     $this->load->view('pages/template/header');
     $this->load->view('pages/template/nav', $data);
     $this->load->view('pages/AuditTrailList', $data);
     $this->load->view('pages/template/footer');
 }
コード例 #25
0
ファイル: menu_helper.php プロジェクト: codethics/proteoerp
function arr2link($arr)
{
    $att = array('width' => $arr['ancho'], 'heigth' => $arr['alto'], 'scrollbars' => 'Yes', 'status' => 'Yes', 'resizable' => 'Yes', 'screenx' => "'+((screen.availWidth/2)-" . intval($arr['ancho'] / 2) . ")+'", 'screeny' => "'+((screen.availHeight/2)-" . intval($arr['alto'] / 2) . ")+'");
    $indi = parsePattern($arr['ejecutar']);
    if ($arr['target'] == 'popu') {
        $ejecutar = anchor_popup($indi, $arr['titulo'], $att);
        $arr['titulo'] = htmlentities($arr['titulo']);
        $arr['mensaje'] = htmlentities($arr['mensaje']);
    } elseif ($arr['target'] == 'javascript') {
        $ejecutar = "<a href='javascript:" . str_replace("'", "\\'", $indi) . "' title='{$arr['mensaje']}'>{$arr['titulo']}</a> ";
    } else {
        $ejecutar = anchor($indi, $arr['titulo']);
    }
    return $ejecutar;
}
コード例 #26
0
ファイル: fallas.php プロジェクト: codethics/proteoerp
 function index()
 {
     $this->rapyd->load('datagrid', 'dataform', 'datafilter');
     $this->rapyd->uri->keep_persistence();
     $form = new DataFilter('Seleccione las fallas');
     foreach ($this->falla as $ind => $checkbox) {
         $id = 'f_' . $ind;
         $form->{$id} = new checkboxField($checkbox['nombre'], $id, '1');
         $form->{$id}->clause = '';
     }
     $form->submit('reset', 'Resetear');
     $form->submit('btnsubmit', 'Buscar');
     $form->build_form();
     $algo['falla'] = $this->falla;
     $algo['form'] =& $form;
     $salida = $this->load->view('view_fallas', $algo, true);
     if ($this->input->post('btnsubmit')) {
         $grid = new DataGrid('Lista de Productos');
         $grid->db->select = array('codigo', 'LEFT(descrip,20)AS descrip', 'margen1', 'margen2', 'margen3', 'margen4', 'base1', 'base2', 'base3', 'base4', 'precio1', 'precio2', 'precio3', 'precio4', 'id', 'existen', 'ultimo', 'pond');
         $grid->db->from('sinv');
         $grid->per_page = 15;
         $grid->order_by('existen', 'desc');
         foreach ($this->falla as $ind => $data) {
             $id = 'f_' . $ind;
             if ($this->input->post($id)) {
                 $grid->db->or_where($data['sql']);
             }
         }
         $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
         $link = anchor_popup('/inventario/sinv/dataedit/show/<#id#>', '<#codigo#>', $atts);
         $grid->column('C&oacute;digo', $link);
         $grid->column('Descripci&oacute;n', 'descrip');
         $grid->column('Margenes', '<ol><li><#margen1#></li><li><#margen2#></li><li><#margen3#></li><li><#margen4#></li></ol>');
         $grid->column('Bases', '<ol><li><#base1#></li><li><#base2#></li><li><#base3#></li><li><#base4#></li></ol>');
         $grid->column('Precios', '<ol><li><#precio1#></li><li><#precio2#></li><li><#precio3#></li><li><#precio4#></li></ol>');
         $grid->column('Costos', '<ul><li><b>Ultimo:</b><#ultimo#></li><li><b>Promedio:</b><#pond#></li></ul>');
         $grid->column_orderby('Existencia', 'existen', 'existen', 'align=\'right\'');
         $grid->build();
         //echo $grid->db->last_query();
         $salida .= $grid->output;
         $salida .= $grid->recordCount . ' Registros encontrados';
     }
     $data['content'] = $salida;
     $data['title'] = '<h1>Productos con fallas</h1>';
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #27
0
ファイル: Products.php プロジェクト: NimzyMaina/sma
    function getProducts($warehouse_id = NULL)
    {
        $this->sma->checkPermissions('index');
        if (!$this->Owner && !$warehouse_id) {
            $user = $this->site->getUser();
            $warehouse_id = $user->warehouse_id;
        }
        $detail_link = anchor('products/view/$1', '<i class="fa fa-file-text-o"></i> ' . lang('product_details'));
        //'data-toggle="modal" data-target="#myModal"'
        $delete_link = "<a href='#' class='tip po' title='<b>" . $this->lang->line("delete_product") . "</b>' data-content=\"<p>" . lang('r_u_sure') . "</p><a class='btn btn-danger po-delete1' id='a__\$1' href='" . site_url('products/delete/$1') . "'>" . lang('i_m_sure') . "</a> <button class='btn po-close'>" . lang('no') . "</button>\"  rel='popover'><i class=\"fa fa-trash-o\"></i> " . lang('delete_product') . "</a>";
        $single_barcode = anchor_popup('products/single_barcode/$1/' . ($warehouse_id ? $warehouse_id : ''), '<i class="fa fa-print"></i> ' . lang('print_barcode'), $this->popup_attributes);
        $single_label = anchor_popup('products/single_label/$1/' . ($warehouse_id ? $warehouse_id : ''), '<i class="fa fa-print"></i> ' . lang('print_label'), $this->popup_attributes);
        $action = '<div class="text-center"><div class="btn-group text-left">' . '<button type="button" class="btn btn-default btn-xs btn-primary dropdown-toggle" data-toggle="dropdown">' . lang('actions') . ' <span class="caret"></span></button>
		<ul class="dropdown-menu pull-right" role="menu">
			<li>' . $detail_link . '</li>
			<li><a href="' . site_url('products/add/$1') . '"><i class="fa fa-plus-square"></i> ' . lang('duplicate_product') . '</a></li>';
        if ($this->session->userdata('group_id') == 1) {
            $action .= '<li><a href="' . site_url('products/edit/$1') . '"><i class="fa fa-edit"></i> ' . lang('edit_product') . '</a></li>';
        }
        if ($warehouse_id) {
            $action .= '<li><a href="' . site_url('products/set_rack/$1/' . $warehouse_id) . '" data-toggle="modal" data-target="#myModal"><i class="fa fa-bars"></i> ' . lang('set_rack') . '</a></li>';
        }
        $action .= '<li><a href="' . site_url() . 'assets/uploads/$2" data-type="image" data-toggle="lightbox"><i class="fa fa-file-photo-o"></i> ' . lang('view_image') . '</a></li>
			<li>' . $single_barcode . '</li>
			<li>' . $single_label . '</li>
			<li><a href="' . site_url('products/add_damage/$1/' . ($warehouse_id ? $warehouse_id : '')) . '" data-toggle="modal" data-target="#myModal"><i class="fa fa-filter"></i> ' . lang('add_damage_qty') . '</a></li>    
				<li class="divider"></li>
				<li>' . $delete_link . '</li>
			</ul>
		</div></div>';
        $this->load->library('datatables');
        if ($warehouse_id) {
            $this->datatables->select($this->db->dbprefix('products') . ".id as productid, " . $this->db->dbprefix('products') . ".image as image, " . $this->db->dbprefix('products') . ".code as code, " . $this->db->dbprefix('products') . ".name as name, " . $this->db->dbprefix('categories') . ".name as cname, cost as cost, price as price, COALESCE(quantity, 0) as quantity, unit, NULL as rack, alert_quantity", FALSE)->from('products')->join('categories', 'products.category_id=categories.id', 'left')->group_by("products.id");
        } else {
            $this->datatables->select($this->db->dbprefix('products') . ".id as productid, " . $this->db->dbprefix('products') . ".image as image, " . $this->db->dbprefix('products') . ".code as code, " . $this->db->dbprefix('products') . ".name as name, " . $this->db->dbprefix('categories') . ".name as cname, cost as cost, price as price, COALESCE(quantity, 0) as quantity, unit, NULL as rack, alert_quantity", FALSE)->from('products')->join('categories', 'products.category_id=categories.id', 'left')->group_by("products.id");
        }
        if (!$this->Owner && !$this->Admin) {
            if (!$this->session->userdata('show_cost')) {
                $this->datatables->unset_column("cost");
            }
            if (!$this->session->userdata('show_price')) {
                $this->datatables->unset_column("price");
            }
        }
        $this->datatables->add_column("Actions", $action, "productid, image, code, name");
        echo $this->datatables->generate();
    }
コード例 #28
0
ファイル: snte.php プロジェクト: codethics/proteoerp
 function index()
 {
     $this->rapyd->load("datagrid", "datafilter");
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $scli = array('tabla' => 'scli', 'columnas' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre'), 'retornar' => array('cliente' => 'cod_cli'), 'titulo' => 'Buscar Cliente');
     $boton = $this->datasis->modbus($scli);
     $filter = new DataFilter("Filtro de Nota Entrega");
     $filter->db->select('fecha,numero,cod_cli,nombre,stotal,gtotal,impuesto');
     $filter->db->from('snte');
     $filter->fechad = new dateonlyField("Desde", "fechad", 'd/m/Y');
     $filter->fechah = new dateonlyField("Hasta", "fechah", 'd/m/Y');
     $filter->fechad->clause = $filter->fechah->clause = "where";
     $filter->fechad->db_name = $filter->fechah->db_name = "fecha";
     $filter->fechad->insertValue = date("Y-m-d");
     $filter->fechah->insertValue = date("Y-m-d");
     $filter->fechah->size = $filter->fechad->size = 10;
     $filter->fechad->operator = ">=";
     $filter->fechah->operator = "<=";
     $filter->numero = new inputField("N&uacute;mero", "numero");
     $filter->numero->size = 30;
     $filter->factura = new inputField("Factura", "factura");
     $filter->factura->size = 30;
     $filter->cliente = new inputField("Cliente", "cod_cli");
     $filter->cliente->size = 30;
     $filter->cliente->append($boton);
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('ventas/snte/dataedit/show/<#numero#>', '<#numero#>');
     $uri2 = anchor_popup('formatos/verhtml/SNTE/<#numero#>', "Ver HTML", $atts);
     $grid = new DataGrid();
     $grid->order_by("numero", "desc");
     $grid->per_page = 15;
     $grid->column("N&uacute;mero", $uri);
     $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "align='center'");
     $grid->column("Nombre", "nombre");
     $grid->column("Sub.Total", "<number_format><#stotal#>|2</number_format>", "align=right");
     $grid->column("IVA", "<number_format><#impuesto#>|2</number_format>", "align=right");
     $grid->column("Total", "<number_format><#gtotal#>|2</number_format>", "align=right");
     $grid->column("Vista", $uri2, "align='center'");
     //$grid->add("ventas/agregarne");
     $grid->build();
     //echo $grid->db->last_query();
     $data['content'] = $filter->output . $grid->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = '<h1>Nota de Entrega</h1>';
     $this->load->view('view_ventanas', $data);
 }
コード例 #29
0
ファイル: factura.php プロジェクト: codethics/proteoerp
 function index()
 {
     $this->rapyd->load("datagrid", "datafilter");
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $scli = array('tabla' => 'scli', 'columnas' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre'), 'retornar' => array('cliente' => 'cod_cli'), 'titulo' => 'Buscar Cliente');
     $boton = $this->datasis->modbus($scli);
     $filter = new DataFilter("Filtro de Facturas", 'sfac');
     $filter->fechad = new dateonlyField("Desde", "fechad", 'd/m/Y');
     $filter->fechah = new dateonlyField("Hasta", "fechah", 'd/m/Y');
     $filter->fechad->clause = $filter->fechah->clause = "where";
     $filter->fechad->db_name = $filter->fechah->db_name = "fecha";
     $filter->fechad->insertValue = date("Y-m-d");
     $filter->fechah->insertValue = date("Y-m-d");
     $filter->fechah->size = $filter->fechad->size = 10;
     $filter->fechad->operator = ">=";
     $filter->fechah->operator = "<=";
     $filter->numero = new inputField("N&uacute;mero", "numero");
     $filter->numero->size = 30;
     $filter->cliente = new inputField("Cliente", "cod_cli");
     $filter->cliente->size = 30;
     $filter->cliente->append($boton);
     $filter->vende = new dropdownField("Vendedor", "vd");
     $filter->vende->option("", "Todos");
     $filter->vende->options("SELECT vendedor, CONCAT(vendedor,' ',nombre) nombre FROM vend ORDER BY vendedor");
     $filter->vende->size = 5;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('ventas/factura/dataedit/show/<#tipo_doc#>/<#numero#>', '<#numero#>');
     $uri2 = anchor_popup('formatos/verhtml/FACTURA/<#tipo_doc#>/<#numero#>', "Ver HTML", $atts);
     $grid = new DataGrid();
     $grid->order_by("fecha", "desc");
     $grid->per_page = 15;
     $grid->column("N&uacute;mero", $uri);
     $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "align='center'");
     $grid->column("Nombre", "nombre");
     $grid->column("Sub.Total", "<number_format><#totals#>|2</number_format>", "align=right");
     $grid->column("IVA", "<number_format><#iva#>|2</number_format>", "align=right");
     $grid->column("Total", "<number_format><#totalg#>|2</number_format>", "align=right");
     $grid->column("Vista", $uri2, "align='center'");
     //$grid->add("ventas/agregarfac");
     $grid->build();
     //echo $grid->db->last_query();
     $data['content'] = $filter->output . $grid->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = '<h1>Factura</h1>';
     $this->load->view('view_ventanas', $data);
 }
コード例 #30
0
ファイル: sitemslog.php プロジェクト: codethics/proteoerp
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $filter = new DataFilter("Filtro de Busqueda", 'sitemslog');
     $filter->fechad = new dateonlyField("Desde", "fechad", 'd/m/Y');
     $filter->fechah = new dateonlyField("Hasta", "fechah", 'd/m/Y');
     $filter->fechad->clause = $filter->fechah->clause = "where";
     $filter->fechad->db_name = $filter->fechah->db_name = "fecha";
     $filter->fechad->size = $filter->fechah->size = 12;
     $filter->fechad->insertValue = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 30, date("Y")));
     $filter->fechah->insertValue = date("Y-m-d");
     $filter->fechad->operator = ">=";
     $filter->fechah->operator = "<=";
     $filter->cajero = new dropdownField("Cajero", "cajero");
     $filter->cajero->option('', 'Todos');
     $filter->cajero->options("Select cajero, nombre as value from scaj ");
     $filter->cajero->style = 'width:150px;';
     $filter->vendedor = new dropdownField("Vendedor", "vendedor");
     $filter->vendedor->option('', 'Todos');
     $filter->vendedor->options("Select vendedor, nombre from vend ");
     $filter->vendedor->style = 'width:150px;';
     $filter->buttons("reset", "search");
     $filter->build();
     if ($this->rapyd->uri->is_set("search") and $filter->is_valid()) {
         $grid = new DataGrid("Resultados");
         $grid->per_page = 15;
         $uri = anchor_popup('supervisor/sitemslog/detalle/<#id#>', '<#id#>', $atts);
         $grid->column("Numero", $uri);
         $grid->column("Fecha", "<b><dbdate_to_human><#fecha#></dbdate_to_human></b>", 'fecha', "align='center'");
         $grid->column("Cajero", "cajero");
         $grid->column("Vendedor", "vendedor");
         $grid->column("Tipo", "tipo");
         $grid->column("Cliente", "cod_cli");
         $grid->column("Hora", "<#hora#>", 'hora', "align='center'");
         $grid->build();
         //echo $grid->db->last_query();
         $tabla = $grid->output;
     } else {
         $tabla = '';
     }
     $data['content'] = $filter->output . $tabla;
     $data['title'] = "<h1>Log de Ventas</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }