コード例 #1
0
ファイル: table.php プロジェクト: goudaelalfy/nahda
<?php

$this->load->view('admin/includes/header');
?>
<form id="frm_display_data" name="frm_display_data" action="<?php 
echo base_url() . $this->lang->lang() . '/' . ADMIN;
?>
/menulink/delete_all" method="post">

<div class="form-actions">

<?php 
$this_object = new Menulink();
if ($this_object->user_screen_privielge_allowed($this_object->screen_id, $this_object->privielge_delete)) {
    ?>
<a class='btn btn-danger'  href="javascript: submitform()" class="bt_red" onclick="return delete_all_confirm('<?php 
    echo $this->lang->lang();
    ?>
');">
<i class='icon-trash icon-white'></i> 
<?php 
    echo $this->lang->line('btn_delete_all');
    ?>
</a>                          
<?php 
}
if ($this_object->user_screen_privielge_allowed($this_object->screen_id, $this_object->privielge_add)) {
    ?>
<a class='btn btn-info' href="<?php 
    echo base_url() . $this->lang->lang() . '/' . ADMIN;
    ?>
コード例 #2
0
ファイル: form.php プロジェクト: goudaelalfy/nahda
    }
}
/**
 * Dropdowns object.
 * 
 * Intialize object from Dropdowns class which contains methods fill all dropdowns of website.
 * @var object.
 */
$dropdowns = new Dropdowns();
/**
 * Menulink controller object.
 * 
 * Intialize object from Menulink controller class.
 * @var object.
 */
$this_object = new Menulink();
/**
 * Menu object.
 * 
 * Intialize object from Menu controller class.
 * @var object.
 */
$this->load->controller(ADMIN . '/Menu');
$menu_object = new Menu();
?>
<SCRIPT type="text/javascript">
pic1 = new Image(16, 16); 
pic1.src = "<?php 
echo base_url();
?>
images/icons/loader.gif";
コード例 #3
0
ファイル: functions.php プロジェクト: goudaelalfy/nahda
 public function display_data_table($array_of_data, $link_to_screen = '', $object)
 {
     echo "\n\t\t<script type='text/javascript'  src='" . base_url() . "js/includes/functions.js' > </script>\n\t\t<script type='text/javascript'  src='" . base_url() . "js/admin/menu_link/form.js' > </script>\n\t\t";
     //echo "<table style=' width:962px; table-layout:fixed;' border='0' cellpadding='3' cellspacing='1'>";
     echo "<table class='table table-striped table-bordered bootstrap-datatable datatable'>";
     $index = 0;
     $color_row = '';
     $height_row = '';
     foreach ($array_of_data as $record) {
         $current_row_id = 0;
         if ($index == 0) {
             echo "<thead><tr>";
             foreach ($record as $key => $value) {
                 if ($key == 'id') {
                     echo "<th > <input type='checkbox' name='chk_all' id='chk_all' onchange='checkUncheck_DisplayDataForm()' /> </th> ";
                 } else {
                     if ($key == 'approved') {
                         if ($object->session->userdata('user_session')->admin == 1) {
                             echo "<th >" . lang($key) . " </th>";
                         }
                     } else {
                         if ($key != 'are_canceled') {
                             echo "<th >" . lang($key) . " </th>";
                         }
                     }
                 }
             }
             echo "<th >" . lang('btn_actions') . "</th>";
             echo "</tr></thead>";
         }
         echo "<tbody><tr>";
         foreach ($record as $key => $value) {
             if ($index % 2 == 1) {
                 //$color_row='#e6f6fd';
                 $height_row = '30px';
             } else {
                 //$color_row='#FFFFFF';
                 $height_row = '25px';
             }
             $color_row = '';
             if ($key == 'id') {
                 echo "<td  ><input type='checkbox' id='chk_current_row[]' name='chk_current_row[]' value='{$value}' ></td>";
                 $current_row_id = $value;
             } else {
                 if ($key == 'are_canceled') {
                     if ($value == 0) {
                         $what_will = 1;
                         $icon = "cancel_for_table.png";
                         $title = $object->lang->line('btn_cancel');
                     } else {
                         $what_will = 0;
                         $icon = "uncancel_for_table.png";
                         $title = $object->lang->line('btn_uncancel');
                     }
                     //$cancel_link="<a href='$link_to_screen/cancel_uncancel/$current_row_id/$what_will/view' ><img src='".base_url()."/images/icons/$icon' width='15'; height='15'  title='".$title."' /></a>";
                 } else {
                     if ($key == 'alias' || $key == 'title' || $key == 'title_ar') {
                         $width_td = '140px';
                         echo "<td class='center' width='{$width_td}'> <a  href='{$link_to_screen}/form/{$current_row_id}/view' >{$value}</a>  </td>";
                     } else {
                         if ($key == 'banner_image_thumb_selected') {
                             $width_row = '210px';
                             echo "<td class='center' > <img src='" . base_url() . $value . "' title='{$value}' width='100px' height='50px' /> </td>";
                         } else {
                             if ($key == 'approved') {
                                 if ($object->session->userdata('user_session')->admin == 1) {
                                     if ($value == 0) {
                                         echo "<td class='center'> <a  href='{$link_to_screen}/approve/{$current_row_id}/1' ><span class='label label-warning'>" . lang('no') . "</span></a> </td>";
                                     } else {
                                         echo "<td class='center'> <a  href='{$link_to_screen}/approve/{$current_row_id}/0' ><span class='label label-success'>" . lang('yes') . "</span></a>  </td>";
                                     }
                                 }
                             } else {
                                 $width_row = '150px';
                                 echo "<td  class='center'> {$value} </td>";
                             }
                         }
                     }
                 }
             }
         }
         echo "\n\t\t\t\t<td class='center'>\n\t\t\t\t\t\t\t\t\t<a class='btn btn-success' href='{$link_to_screen}/form/{$current_row_id}/view'>\n\t\t\t\t\t\t\t\t\t\t<i class='icon-zoom-in icon-white'></i>  \n\t\t\t\t\t\t\t\t\t\t\t" . lang('btn_view') . "                                            \n\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t\t\t\t\t\t";
         $this_object = new Menulink();
         if ($this_object->user_screen_privielge_allowed($this_object->screen_id, $this_object->privielge_edit)) {
             echo "<a class='btn btn-info' href='{$link_to_screen}/form/{$current_row_id}/edit'>\n\t\t\t\t\t\t\t\t\t\t<i class='icon-edit icon-white'></i>  \n\t\t\t\t\t\t\t\t\t\t" . lang('btn_edit') . "                                            \n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t";
         }
         if ($this_object->user_screen_privielge_allowed($this_object->screen_id, $this_object->privielge_delete)) {
             echo "<a class='btn btn-danger' href='{$link_to_screen}/delete/{$current_row_id}' onclick='return delete_confirm(\"" . $object->lang->lang() . "\")'>\n\t\t\t\t\t\t\t\t\t\t<i class='icon-trash icon-white'></i> \n\t\t\t\t\t\t\t\t\t\t" . lang('btn_delete') . "\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t";
         }
         echo "</td></tr>";
         $index = $index + 1;
     }
     echo "</tbody></table>";
 }