Esempio n. 1
0
 /**
  *This method loads the homepage 
  *
  *@param null
  *@return void
  */
 public function index()
 {
     //get all list names from the database
     $data['lists'] = ListsModel::all();
     //get the ending date today
     View::render('home/home', $data);
 }
 /**
  * This method loads the users edit profile page.
  * @param int $user_id The unique id of the user whose information to update
  */
 public function getUpdate($user_id)
 {
     $user = UsersModel::where('id = ?', $user_id)->all();
     $user = $user->result_array();
     $data['user'] = $user[0];
     //get the ending date today
     View::render('users/update', $data);
 }
 /**
  *This method loads the admin  homepage 
  *
  *@param null
  *@return void
  */
 public function getIndex()
 {
     // get a list of all  users fromt he database
     $users = UsersModel::all();
     $data['users'] = $users->result();
     $online = LogModel::where('online = ?', true)->count();
     $data['online'] = $online->num_rows();
     //get the ending date today
     View::render('admin/home', $data);
 }
 /**
  *This method loads the caching page 
  *
  *@param null
  *@return void
  */
 public function getCaching()
 {
     //get the ending date today
     View::render('caching');
 }
 /**
  *This method loads the users and admin  homepage 
  *
  *@param null
  *@return void
  */
 public function postDelete()
 {
     //get the ending date today
     View::render('admin/home');
 }
Esempio n. 6
0
 /**
  *This method loads the homepage 
  *@param int $id The user id
  *@return void
  */
 public function getIndex($id)
 {
     $data['title'] = $this->site_title;
     $data['request_time'] = $this->request_exec_time();
     View::render('index', $data);
 }
 /**
  *This method loads a csv file content into the database for a new list
  *
  *@param null
  *@return void
  */
 public function getManagenew()
 {
     //get the list id to manage
     $list_id = Input::get('list_id');
     //get information about this list
     $list_info = ListsModel::getById($list_id);
     //open the csv file
     $full_path = Path::base() . $list_info[0]['csv_file_path'];
     //get the first 10 lines
     $file_pointer = fopen($full_path, 'r');
     $itr = 5;
     while (!feof($file_pointer)) {
         if ($itr == 0) {
             break;
         }
         //read data into csv
         $data['list_data'][] = fgetcsv($file_pointer);
         --$itr;
     }
     //get the column list
     $data['column_list'] = $data['list_data'][0];
     //get table fielnames
     $data['table_fields'] = SubscribersModel::getTableColumnNames();
     //lod the view page with this information
     View::render('lists/managenew', $data);
 }
 /**
  *This method loads the login form 
  *
  *@param null
  *@return void
  */
 public function getLogout()
 {
     LogModel::where('id = ?', Session::get('log_id'))->save(array('online' => false));
     UsersModel::where('id = ?', Session::get('userInfo')['id'])->save(array('online' => false));
     //destry all session data
     Session::flush();
     //load the login form
     View::render('login/form');
 }
 /**
  *This method loads the login form 
  *
  *@param null
  *@return void
  */
 public function getLogout()
 {
     //load the login form
     View::render('login/form');
 }
 /**
  *This method loads the signup form 
  *
  *@param null
  *@return void
  */
 public function getIndex()
 {
     //load the singup form
     View::render('signup/form');
 }
 /**
  *This method loads the homepage 
  *
  *@param null
  *@return void
  */
 public function index()
 {
     //get the ending date today
     View::render('home/home');
 }