Server IP : 68.65.122.142 / Your IP : 3.147.55.155 Web Server : LiteSpeed System : Linux server167.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64 User : glenirhm ( 1318) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/glenirhm/.ftp-scan/../mygc.glenbowcollege.ca/admin/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php // We need to use sessions, so you should always start sessions using the below code. session_start(); // If the user is not logged in redirect to the login page... if (!isset($_SESSION['loggedin'])) { header('Location: index.html'); exit; } error_reporting(E_ALL); // speed things up with gzip plus ob_start() is required for csv export if(!ob_start('ob_gzhandler')) ob_start(); header('Content-Type: text/html; charset=utf-8'); include('lazy_mofo.php'); include('../common/header_admin.php'); include('../common/connectPDO.php'); // create LM object, pass in PDO connection, see i18n folder for country + language options $lm = new lazy_mofo($pdo, 'en-us'); // table name for updates, inserts and deletes $lm->table = 'student'; // identity / primary key for table $lm->identity_name = 'id'; // show search box, but _search parameter still needs to be passed to query below $lm->grid_show_search_box = true; // query to define grid view // IMPORTANT - last column must be the identity/key for [edit] and [delete] links to appear // include an 'order by' to prevent potential parsing issues $lm->grid_sql = " select id , fname , lname , registration_fee , book_fee , tuition_fee , student_aid_grant , student_aid_loan , self_financed , agreed_total_fee , scholarship , financial_notes , id from student order by lname desc "; // bind parameter for grid query $lm->grid_sql_param[':_search'] = '%' . trim(@$_REQUEST['_search']) . '%'; // optional, define what is displayed on edit form. identity id must be passed in also. $lm->form_sql = " select id , registration_fee , book_fee , tuition_fee , student_aid_grant , student_aid_loan , self_financed , agreed_total_fee , scholarship , financial_notes , id from student where id = :id "; // bind parameter for form query $lm->form_sql_param[':id'] = @$_REQUEST['id']; // copy validation rules, same rules when updating $lm->on_update_validate = $lm->on_insert_validate; // run the controller $lm->run(); echo "</body></html>";