|
Server IP : 2a02:4780:3:2287:0:3736:a38e:8 / Your IP : 216.73.216.228 Web Server : LiteSpeed System : Linux sg-nme-web2187.main-hosting.eu 5.14.0-611.54.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 6 18:03:03 EDT 2026 x86_64 User : u926327694 ( 926327694) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u926327694/domains/smsoft.in/../evisioninfotech.in/public_html/job/admin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
// Path to root directory of app.
require_once('../includes/config.php');
require_once('../includes/sql_builder/idiorm.php');
require_once('../includes/db.php');
require_once('../includes/functions/func.global.php');
require_once('../includes/functions/func.admin.php');
require_once('../includes/functions/func.users.php');
require_once('../includes/functions/func.sqlquery.php');
require_once('../includes/lang/lang_'.$config['lang'].'.php');
$mysqli = db_connect();
admin_session_start();
checkloggedadmin();
if(isset($_POST['export'])){
// set headers to force download on csv format
header('Content-Type: text/csv; charset=utf-8');
header('Content-Disposition: attachment; filename=product_table.csv');
// we initialize the output with the headers
$output = "id,user_id,product_name,status,category,sub_category,description,price,phone,city,state,country,image,created_at,updated_at,expire_date\n";
// select all members
$rows = ORM::for_table($config['db']['pre'].'product')->limit(20)->find_many();
foreach ($rows as $info) {
// add new row
$title = str_replace(array(',', ' '), '-', $info['product_name']);
$desc = str_replace(array(',', ' '), '-', $info['description']);
$price = str_replace(array(',', ' '), '-', $info['price']);
$phone = str_replace(array(',', ' '), '-', $info['phone']);
$main_Screen = $info['screen_shot'];
$screen_shot = str_replace(array(',', ' '), '-', $main_Screen);
$output .= $info['id'].",".$info['user_id'].",".$title.",".$info['status'].",".$info['category'].",".$info['sub_category'].",".$desc.",".$price.",".$phone.",".$info['city'].",".$info['state'].",".$info['country'].",".$main_Screen.",".$info['created_at'].",".$info['expire_date']."\n";
}
// export the output
echo $output;
exit;
}
?>