Example #1
0
 /**
  * Files::mass_delete()
  *
  * Mass delete files
  *
  * @access	public
  * @return	void
  */
 public function mass_delete()
 {
     if ($this->input->post('files') and is_array($this->input->post('files'))) {
         foreach ($this->input->post('files') as $id) {
             $this->files_db->delete_file_user($id, $this->session->userdata('id'));
         }
         $count = count($this->input->post('files'));
         $this->session->set_flashdata('msg', nlang('%d file has been deleted', '%d files have been deleted', $count));
     }
     redirect('files/manage');
 }
Example #2
0
              <th><?php 
            echo $group->{$name};
            ?>
</th>
<?php 
        } elseif ($name == 'wait_time') {
            ?>
              <td><?php 
            printf(nlang('%s second', '%s seconds', $group->{$name}), $group->{$name});
            ?>
</td>
<?php 
        } elseif ($name == 'file_expire') {
            // SHOULD BE CLEANED BETTER AND CHANGE FOR LANGUAGE.
            if ($group->{$name} > 0) {
                $strings = sprintf(nlang('%s day', '%s days', $group->{$name}), $group->{$name});
            } else {
                $strings = lang('Forever!');
            }
            ?>
              <td><?php 
            echo $strings;
            ?>
</td>
<?php 
        } elseif ($name == 'price') {
            if ($group->{$name} <= 0.0) {
                $strings = lang('Free!');
            } else {
                $strings = sprintf(lang('$%s'), $group->{$name});
            }
Example #3
0
        }
    } else {
        printf(nlang('%s second', '%s seconds', ini_get($k)), ini_get($k));
    }
    ?>
            </a>
<?php 
    if (intval(ini_get($k)) < intval($ini_rec[$k])) {
        $is_not_good = true;
        echo ' - <img src="' . base_url() . 'assets/images/icons/cancel_16.png" alt="' . lang('Error!') . '" title="' . lang('Error!') . '" class="nb"><span style="color:#F00">' . lang('Recommended') . ': ';
        if ($k == 'upload_max_filesize' or $k == 'post_max_size' or $k == 'memory_limit') {
            echo $ini_rec[$k] . 'B';
        } elseif ($k == 'short_open_tag') {
            echo lang('On');
        } else {
            printf(nlang('%s second', '%s seconds', $ini_rec[$k]), $ini_rec[$k]);
        }
        echo '</span>';
    } else {
        echo '<img src="' . base_url() . 'assets/images/icons/ok_16.png" alt="' . lang('Ok!') . '" title="' . lang('Ok!') . '" class="nb" />';
    }
    ?>
            <span id="php_<?php 
    echo $k;
    ?>
" style="display:none">
              <strong style="padding-left:12px; text-decoration:underline"><?php 
    echo str_replace('{$}', rename_ini_result(ini_get($k), $k), $v);
    ?>
</strong>
            </span>
Example #4
0
 /**
  * Files::mass_delete()
  *
  * Many files delete
  *
  * @access	public
  * @param	string	$query	Database query
  * @return	void
  */
 public function mass_delete($query = '')
 {
     if ($this->input->post('files') && is_array($this->input->post('files'))) {
         foreach ($this->input->post('files') as $id) {
             $this->files_db->delete_file_admin($id);
         }
         $count = count($this->input->post('files'));
         $this->session->set_flashdata('msg', sprintf(nlang('%d file has been deleted.', '%d files have been deleted.', $count), $count));
     }
     if (!empty($query)) {
         redirect('admin/files/search/' . $query);
     } else {
         redirect('admin/files/view');
     }
 }
Example #5
0
 /**
  * Skin::install_new()
  *
  * Install new skin
  *
  * @access	public
  * @return	void
  */
 public function install_new()
 {
     if ($handle = opendir(APPPATH . 'views')) {
         $i = 0;
         while (false !== ($file = readdir($handle))) {
             if ($file != "." && $file != ".." && $file != ".svn" && $file != "_protected" && is_dir(APPPATH . 'views/' . $file)) {
                 $skin = $this->db->get_where('skin', array('name' => $file));
                 if ($skin->num_rows() == '0') {
                     $this->skin_db->install_skin($file);
                     $i++;
                 }
             }
         }
         closedir($handle);
     }
     $this->session->set_flashdata('msg', sprintf(nlang('%s new skin was installed.', '%s new skins were installed.', $i), $i));
     redirect('admin/skin/view');
 }
Example #6
0
    ?>
        <div id="massActions" style="clear:both; padding-top:4px;">
          <div class="float-right">
            <?php 
    echo generate_link_button(lang('New Search'), site_url('files/search'), base_url() . 'assets/images/icons/new_16.png', NULL);
    ?>
 
          </div>
        </div>
        <div style=" clear:both;"></div>
        <?php 
    echo $flash_message;
    ?>
 
        <h3><?php 
    printf(nlang('Your query \'%s\' returned %d result', 'Your query \'%s\' returned %d results', $num_results), $query, $num_results);
    ?>
</h3>
        <table border="0" style="width:95%" id="file_list_table">
          <tr>
            <th><?php 
    echo lang('File name');
    ?>
</th>
            <th><?php 
    echo lang('Size');
    ?>
</th>
            <th style="width:80px"><?php 
    echo lang('Actions');
    ?>
Example #7
0
 /**
  * User::mass_delete()
  *
  * Mass user delete
  *
  * @access	public
  * @param	string	$query	Search string
  * @return	void
  */
 public function mass_delete($query = '')
 {
     if ($this->input->post('users') and is_array($this->input->post('users'))) {
         foreach ($this->input->post('users') as $id) {
             $this->users_db->delete_user($id);
         }
         $count = count($this->input->post('users'));
         $this->session->set_flashdata('msg', sprintf(nlang('%d user has been deleted', '%d users have been deleted', $count), $count));
     }
     if (!empty($query)) {
         redirect('admin/user/search/' . $query);
     } else {
         redirect('admin/user/view');
     }
 }