%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php class Common extends MY_Controller { function __construct() { parent::__construct(); } function error404() { $this->load->view('layouts/error404'); } function getLatLong(){ $loc=$this->input->post('loc'); $c=get_lat_long($loc); echo json_encode($c); } function bkp_db(){ ini_set('memory_limit', '2048M'); set_time_limit(3000); $this->load->dbutil(); $backup = $this->dbutil->backup(array('format'=>'gzip', 'foreign_key_checks'=>FALSE)); $this->load->helper('download'); $fname="db_backup_".date('Y-m-d-H:i:s').".sql.gz"; force_download($fname, $backup); } function downloadFile($filePath){ $this->load->helper('download'); force_download(decode($filePath), NULL); } function downloadReceipt($appId){ $dtl=$this->common->applicationNdUsrInfo($appId); $html=$this->load->view("pdf/receipt", $dtl, TRUE); create_pdf($html, "receipt-".$dtl['application_no'].".pdf"); //echo $html; } function printReceipt($appId){ $dtl=$this->common->applicationNdUsrInfo($appId); $html=$this->load->view("pdf/receipt", $dtl, TRUE); echo $html.'<script>window.print();</script>'; } /** To be used in lead form */ function cities($stateId=0){ $data['cities']=$this->common->cities($stateId); $this->json_data($data); } function programs(){ $qs=trim_array($this->input->post()); $data['programs']=$this->common->programs($qs['ac_id'], $qs['campus_id']); $data['acDtl']=$this->common->acDtl($qs['ac_id']); $this->json_data($data); } function plans($programId=0, $campus_id=0){ $data['plans']=$this->common->plans($programId, $campus_id); $this->json_data($data); } function countries($programId=0, $campus_id=0){ $data['country']=$this->common->countriesList(); $this->json_data($data); } function reigon($programId=0, $campus_id=0){ $data['reigons']=$this->common->reigonList(); $this->json_data($data); } /** \ */ /** */ function users_with_access(){ if(!USER_ID){ redirect(URLF); } $this->load->model("dataset_model", "dataset"); $this->load->model("user_model", "user"); $data=[ 'users'=>$this->common->users_with_access() ]; $this->load->view("pages/users_access", $data); } function dwn_query_list(){ $q=trim(urldecode($_REQUEST['q'])); $word=strtolower(substr($q, 0, 6)); if($word!=='select'){ die('Invalid Query'); } $this->load->dbutil(); $this->load->helper('file'); $this->load->helper('download'); $query = $this->db->query($q); $delimiter = ","; $newline = "\r\n"; $data = $this->dbutil->csv_from_result($query, $delimiter, $newline); force_download("list.csv", $data); } function download_adm_forms(){ $q="select a.*, d.title academic_career, b.title program, c.title plan from adm_form a join master_programs b on b.id=a.program_id join master_program_plans c on c.id=a.plan_id join master_academic_careers d on d.id=a.ac_id"; $_REQUEST['q']=$q; $this->dwn_query_list(); } /** */ function sendLeadNotiEmail(){ ignore_user_abort(true); $noti_id=(int)$_POST['noti_id']; $this->common->sendLeadNotiEmail($noti_id); } function getNotificationCount(){ $rs=$this->common->getUnreadNotifications(); json_data(['n'=>count($rs)]); } function isThisNotificationForYou(){ $noti_id=(int)$_POST['noti_id']; $dtl=$this->db->get_where("lead_notifications", ['id'=>$noti_id])->row_array(); $userIds=explode(",", $dtl['to_user_ids']); if(in_array(USER_ID, $userIds)){ json_data([ 'success'=>1, 'type'=>$dtl['type'], 'msg'=>$dtl['msg'], ]); }else{ json_data([ 'success'=>0, ]); } } function studentPayment(){ $this->load->view("student-payment"); } function studentProfilePicFromBlob($system_id=''){ $blob=$this->db->select("EMPLOYEE_PHOTO")->get_where("people_soft_tbl", ['EMPLID'=>$system_id])->row("EMPLOYEE_PHOTO"); if($blob){ //$blob=base64_encode($blob); header("Content-Type: image/jpeg"); echo $blob; //echo '<img src="data:image/jpeg;base64,'.$blob.'"/>'; } } /** */ function socialCompaignDetail($id=0){ $res=['code'=>200, 'message'=>'']; $res['result']=$this->db->select("t.subject, t.body, c.sender_name, c.sender_email, c.reply_to") ->order_by("c.id", "desc") ->from("social_campaigns c") ->join("social_templates t", "t.id=c.template_id") ->where(['c.id'=>$id]) ->get() ->row_array(); jsonData($res); } function socialCompaignLeadUpdateSentOn($campaign_id=0, $app_id=0){ $res=['code'=>200, 'message'=>'']; $this->db->update("social_campaign_leads", ['sent_on'=>currentDT()], ['campaign_id'=>$campaign_id, 'app_id'=>$app_id]); jsonData($res); } function socialCompaignLeadUpdateOpenedOn($campaign_id=0, $app_id=0){ $res=['code'=>200, 'message'=>'']; $this->db->update("social_campaign_leads", ['opened_on'=>currentDT()], ['campaign_id'=>$campaign_id, 'app_id'=>$app_id]); jsonData($res); } /** \ */ function test(){ /* $instance=$this->db->select("whatsapp_instance")->get_where("users", ['id'=>USER_ID])->row("whatsapp_instance"); $resp=sendWhatsAppText('919958808167', "Hello".PHP_EOL."Test", $instance); pr($resp); return; */ /* $sms="Your OTP is 182609. Please use this code to initiate your application for Sharda University. Call us at +91120-4570000 for any queries."; $sms="Dear ajeet test, Thank you for applying at Sharda University. Your System ID is - 2023208467. Login at https://admissions.sharda.ac.in/apply-new/dashboard/auto-login/67e358f3eb28b8fa32a3dc38c9c3fa6e/0 to complete your application. Call us at 0120-4570000 for any queries."; pr(send_sms("9958808167", $sms)); return; */ pr(send_email("sat.web1989@gmail.com", "Welcome to Sharda", "Dear User!<br />How are you?")); //$res=$this->db->select("id, narration, debit, credit")->limit(10000)->from("imagesdb_account.transactions")->get()->result_array(); //$this->json_data(['records'=>($res)]); /* $mob="9958808167"; $sms="Your OTP is 402709. Please use this code to initiate your application for Sharda University. Call us at +91120-4570000 for any queries."; $sms="Your OTP is 735233. Please login to your application dashboard at Sharda University using this code. Call us at +91120-4570000 for any queries."; pr(send_sms($mob, $sms)); die; $r=['Appeared ', 'Hello Boss']; foreach($r as $i=>$v){ $v=trim(replace_special_chars($v, ' ')); pr($i.' <> '.strlen($v).' <> '.$v); } */ } } //EOF