Server IP : 51.89.169.208 / Your IP : 18.216.230.65 Web Server : Apache System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64 User : yellowleaf ( 1019) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/yellowleaf/public_html/members/ |
Upload File : |
<? include_once('../connect.php'); include 'accesscontrol.php'; // css for menu $styleSubmit = 'color:#ff6131;background-color:#fff;border-top:1px solid #c9c9c9;font-weight:bold;'; $adid=$_GET['adid']; // check if advert beleongs to members if(advert_check($adid,$memberid)===false){header('Location: index.html');exit();} if(isset($_POST['submit'])){ $monday=$_POST['monday']; $tuesday=$_POST['tuesday']; $wednesday=$_POST['wednesday']; $thursday=$_POST['thursday']; $friday=$_POST['friday']; $saturday=$_POST['saturday']; $sunday=$_POST['sunday']; $promotion=$_POST['promotion']; $urlPattern='#^http[s]?://+#i'; $facebook=preg_replace($urlPattern,"",$_POST['facebook']); $twitter=preg_replace($urlPattern,"",$_POST['twitter']); $google=preg_replace($urlPattern,"",$_POST['google']); $youtube=preg_replace($urlPattern,"",$_POST['youtube']); $linkedin=preg_replace($urlPattern,"",$_POST['linkedin']); if($promotion==""){$promotion=0;}else{$promotion=1;} // if promo set it as 1 if not 0 /// operning hours table $q3 = "INSERT INTO `opening_hours` SET `opadid` = '$adid', `monday` = '$monday', `tuesday` = '$tuesday', `wednesday` = '$wednesday', `thursday` = '$thursday', `friday` = '$friday', `saturday` = '$saturday', `sunday` = '$sunday'"; $r3 = mysql_query($q3) or die(mysql_error()); /// ads table $promo = "UPDATE `ads` SET `promotion` = '$promotion',`completed` = '1' WHERE `adid` = '$adid' and `memberid` = '$memberid'"; $promo_row = mysql_query($promo) or die(mysql_error()); /// promotions table $prom_title=$_POST['prom_title']; $prom_desc=$_POST['prom_desc']; $prom_date=time(); $expiry_day=$_POST['expiry_day']; $expiry_month=$_POST['expiry_month']; $expiry_year=$_POST['expiry_year']; $valid_day=$_POST['valid_day']; $valid_month=$_POST['valid_month']; $valid_year=$_POST['valid_year']; // converting valid $val=$valid_month.'/'.$valid_day.'/'.$valid_year; $prom_valid=strtotime($val); // converting expiry $expiry_dmy=$expiry_month.'/'.$expiry_day.'/'.$expiry_year; $prom_expiry=strtotime($expiry_dmy); if($promotion==1){ $q5 = "INSERT INTO promotions SET member_id = '$memberid', ad_id = '$adid', prom_title = '$prom_title', prom_desc = '$prom_desc', prom_date = '$prom_date', prom_valid = '$prom_valid', prom_expiry = '$prom_expiry'"; $r5 = mysql_query($q5) or die(mysql_error()); } if($_POST['facebook']!=""||$_POST['twitter']!=""||$_POST['google']!=""||$_POST['youtube']!=""||$_POST['linkedin']!=""){ $q6 = "INSERT INTO social_links SET so_member_id = '$memberid', so_ad_id = '$adid', facebook = '$facebook', googleplus = '$google', twitter = '$twitter', youtube = '$youtube', linkedin = '$linkedin'"; $r6 = mysql_query($q6) or die(mysql_error()); } ?><script>location.href='postad4.html?adid=<?=$adid?>'</script><? } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>YellowLeaf UK</title> <link href="style.css" rel="stylesheet" type="text/css"> <script language="javascript"> <!-- function CheckPostAd(){ // mon if(document.getElementById('monCheck').checked==false){ // if not closed, then validate if(document.RegForm.monday.value==""){ window.alert('Please your business opening and closing time for Monday.'); document.RegForm.monday.focus(); return false; } } // tue if(document.getElementById('tueCheck').checked==false){ // if not closed, then validate if(document.RegForm.tuesday.value==""){ window.alert('Please your business opening and closing time for Tuesday.'); document.RegForm.tuesday.focus(); return false; } } // wed if(document.getElementById('wedCheck').checked==false){ // if not closed, then validate if(document.RegForm.wednesday.value==""){ window.alert('Please your business opening and closing time for Wednesday'); document.RegForm.wednesday.focus(); return false; } } // thur if(document.getElementById('thuCheck').checked==false){ // if not closed, then validate if(document.RegForm.thursday.value==""){ window.alert('Please your business opening and closing time for Thursday'); document.RegForm.thursday.focus(); return false; } } // fri if(document.getElementById('friCheck').checked==false){ // if not closed, then validate if(document.RegForm.friday.value==""){ window.alert('Please your business opening and closing time for Friday'); document.RegForm.friday.focus(); return false; } } // sat if(document.getElementById('satCheck').checked==false){ // if not closed, then validate if(document.RegForm.saturday.value==""){ window.alert('Please your business opening and closing time for Saturday'); document.RegForm.saturday.focus(); return false; } } // sun if(document.getElementById('sunCheck').checked==false){ // if not closed, then validate if(document.RegForm.sunday.value==""){ window.alert('Please your business opening and closing time for Sunday'); document.RegForm.sunday.focus(); return false; } } if(document.RegForm.promotion.checked==true){ if(document.RegForm.prom_title.value==""){ window.alert('Please enter the title of your business promotion.'); document.RegForm.prom_title.focus(); return false; } if(document.RegForm.prom_desc.value==""){ window.alert('Please enter the description of your promotion.'); document.RegForm.prom_desc.focus(); return false; } if(document.RegForm.valid_day.value==""){ window.alert('Please select the \'Day\' for the \'Valid From\' date.'); document.RegForm.valid_day.focus(); return false; } if(document.RegForm.valid_month.value==""){ window.alert('Please select the \'Month\' for the \'Valid From\' date.'); document.RegForm.valid_month.focus(); return false; } if(document.RegForm.valid_year.value==""){ window.alert('Please select the \'Year\' for the \'Valid From\' date.'); document.RegForm.valid_year.focus(); return false; } if(document.RegForm.expiry_day.value==""){ window.alert('Please select the\'Day\' for the \'Expiry\' date.'); document.RegForm.expiry_day.focus(); return false; } if(document.RegForm.expiry_month.value==""){ window.alert('Please select the \'Month\' for the \'Expiry\' date.'); document.RegForm.expiry_month.focus(); return false; } if(document.RegForm.expiry_year.value==""){ window.alert('Please select the\'Year\' for the \'Expiry\' date.'); document.RegForm.expiry_year.focus(); return false; } } } function promCheck(){ var promCheckBox = document.getElementById('promo_check'); var addPromo = document.getElementById('add_promo'); if(promCheckBox.checked==false){ addPromo.style.display='none'; promCheckBox.value='0'; }else{ addPromo.style.display=''; promCheckBox.value='1'; } } //--> </script> <style> .optmeDv{color:#444;padding:3px 15px;border-bottom:1px solid #ddd} .closedTd{font-size:11pt;} .socialTbl td{color:#444;} </style> </head> <body> <? include 'header.php'; ?> <table class="tbwdth"> <tr> <td valign="top" style="width:210px;"> <? include 'member_menu.php'; ?> </td> <td valign="top" class="cnGrad"> <div class="cnHead">Submit Advert</div> <div style="position:relative;margin-bottom:70px"> <hr class="stpBar" noshade size="1" color="#cccccc"> <img class="nav stepflat1 subPos1" src="/img/img_trans.gif" width="1" height="1" /> <img class="nav stepflat2 subPos2" src="/img/img_trans.gif" width="1" height="1" /> <img class="nav sel3 subPos3" src="/img/img_trans.gif" width="1" height="1" /> <img class="nav stepflat4 subPos4" src="/img/img_trans.gif" width="1" height="1" /> <img class="nav stepflat5 subPos5" src="/img/img_trans.gif" width="1" height="1" /> <img class="nav stepflat7 subPos7" src="/img/img_trans.gif" width="1" height="1" /> </div> <form name="RegForm" action="postad3.html?adid=<?=$adid?>" method="POST" enctype="multipart/form-data" onsubmit="return CheckPostAd();" autocomplete="off"> <table width="100%" class="cnTbl"> <tr> <td align="left" valign="top" class="cnTitle" style="padding-left:25px">Opening Times*:<br> <div class="cnTitleDesc">Please enter the business opening times.</div><br> <div class="optmeDv"> <table> <tr> <td colspan="2" style="color:#244471" class="cnTitle">Monday</td></td> </tr> <tr> <td> <div id="monOp"> <input type="text" size="30" name="monday" id="monday"> </div> </td> <td class="closedTd"></td> </tr> </table> </div> <div class="optmeDv"> <table> <tr> <td colspan="2" style="color:#244471" class="cnTitle">Tuesday</td></td> </tr> <tr> <td> <div id="tueOp"> <input type="text" size="30" name="tuesday" id="tuesday"> </div> </td> <td class="closedTd"></td> </tr> </table> </div> <div class="optmeDv"> <table> <tr> <td colspan="2" style="color:#244471" class="cnTitle">Wednesday</td></td> </tr> <tr> <td> <div id="wedOp"> <input type="text" size="30" name="wednesday" id="wednesday"> </div> </td> <td class="closedTd"></td> </tr> </table> </div> <div class="optmeDv"> <table> <tr> <td colspan="2" style="color:#244471" class="cnTitle">Thursday</td></td> </tr> <tr> <td> <div id="thuOp"> <input type="text" size="30" name="thursday" id="thursday"> </div> </td> <td class="closedTd"></td> </tr> </table> </div> <div class="optmeDv"> <table> <tr> <td colspan="2" style="color:#244471" class="cnTitle">Friday</td></td> </tr> <tr> <td> <div id="friOp"> <input type="text" size="30" name="friday" id="friday"> </div> </td> <td class="closedTd"></td> </tr> </table> </div> <div class="optmeDv"> <table> <tr> <td colspan="2" style="color:#244471" class="cnTitle">Saturday</td></td> </tr> <tr> <td> <div id="satOp"> <input type="text" size="30" name="saturday" id="saturday"> </div> </td> <td class="closedTd"></td> </tr> </table> </div> <div class="optmeDv" style="border-bottom:0px"> <table> <tr> <td colspan="2" style="color:#244471" class="cnTitle">Sunday</td></td> </tr> <tr> <td> <div id="sunOp"> <input type="text" size="30" name="sunday" id="sunday"> </div> </td> <td class="closedTd"></td> </tr> </table> </div> </td> </tr> <tr> <td><hr noshade color="#C9C9C9" size="1"></td> </tr> <tr> <td align="left" valign="top" class="cnTitle" style="padding-left:25px">Promotional Deals</span> & Offers (optional)<br> <div class="cnTitleDesc">Please state any promotional deals or offers that your business is currently offering.</div> <div style="font-size:11pt;margin-top:20px;color:#444;"> <input type="checkbox" onclick="promCheck()" name="promotion" id="promo_check" value="0" class="nostyle"> I wish to add a promotion </div> <table width="100" id="add_promo" style="display:none;margin-top:20px;background-color:#f6f6f6;color:#444;"> <td valign="top" colspan="2"></td> </tr> <tr> <td class="cnWidth cnTitle" style="padding-left:25px;color:#244471" valign="top"> Promotion Title*:<br> <div class="cnTitleDesc">Please enter the title of your business promotion.</div> <input name="prom_title" type="text" class="txbox" size="40"></td> </tr> <tr> <td><hr noshade color="#C9C9C9" size="1"></td> </tr> <tr> <td class="cnWidth cnTitle" style="padding-left:25px;padding-right:25px;color:#244471" valign="top"> Promotion Description *:<br> <div class="cnTitleDesc">Please enter the description of your promotion.</div> <textarea name="prom_desc" rows="6" style="width:590px"></textarea></td> </tr> <tr> <td><hr noshade color="#C9C9C9" size="1"></td> </tr> <tr> <td class="cnWidth cnTitle" style="padding-left:25px;color:#244471" valign="top"> Promotion Valid From*:<br> <div class="cnTitleDesc">Please enter the date that your promotion is valid from.</div> <select name="valid_day"> <option value selected>Day</option> <? for($d=1; $d<=31; $d++){ echo '<option value="'.$d.'">'.$d.'</option>'; } ?> </select> <select name="valid_month"> <option value selected>Month</option> <option value="1">January</option> <option value="2">February</option> <option value="3">March</option> <option value="4">April</option> <option value="5">May</option> <option value="6">June</option> <option value="7">July</option> <option value="8">August</option> <option value="9">September</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select> <select name="valid_year"> <option value selected>Year</option> <? $y=date('Y'); for($i=1; $i<=50; $i++){ echo '<option value="'.$y.'">'.$y.'</option>'; $y++; } ?> </select> </td> </tr> <tr> <td><hr noshade color="#C9C9C9" size="1"></td> </tr> <tr> <td class="cnWidth cnTitle" style="padding-left:25px;color:#244471" valign="top"> Promotion Expiry*:<br> <div class="cnTitleDesc">Please enter the expiry date of your promotion.</div> <select name="expiry_day"> <option value selected>Day</option> <? for($d2=1; $d2<=31; $d2++){ echo '<option value="'.$d2.'">'.$d2.'</option>'; } ?> </select> <select name="expiry_month"> <option value selected>Month</option> <option value="1">January</option> <option value="2">February</option> <option value="3">March</option> <option value="4">April</option> <option value="5">May</option> <option value="6">June</option> <option value="7">July</option> <option value="8">August</option> <option value="9">September</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select> <select name="expiry_year"> <option value selected>Year</option> <? $y=date('Y'); for($i=1; $i<=50; $i++){ echo '<option value="'.$y.'">'.$y.'</option>'; $y++; } ?> </select> </td> </tr> </table> </td> </tr> <tr> <td><hr noshade color="#C9C9C9" size="1"></td> </tr> <tr> <td align="left" valign="top" class="cnTitle" style="padding-left:25px">Your Social Links (optional)<br> <div class="cnTitleDesc">Please provide the links to your social pages.</div> <table class="socialTbl"> <tr> <td>Facebook:</td> <td valign="middle"> <input name="facebook" type="text" class="txbox" size="30" value="http://" onblur="if(this.value==''){this.value='http://';}" /> <i><span style="font-weight:normal">e.g http://www.facebook.com/</span><b>YourPageName</b></i></td> </tr> <tr> <td>Twitter:</td> <td> <input name="twitter" type="text" class="txbox" size="30" value="http://" onblur="if(this.value==''){this.value='http://';}" /><i><span style="font-weight:normal"> e.g http://www.twitter.com/</span><b>YourPageName</b></i></td> </tr> <tr> <td>Google+:</td> <td> <input name="google" type="text" class="txbox" size="30" value="http://" onblur="if(this.value==''){this.value='http://';}" /><i><span style="font-weight:normal"> e.g http://plus.google.com/</span><b>+YourPageName</b></i></td> </tr> <tr> <td>YouTube:</td> <td> <input name="youtube" type="text" class="txbox" size="30" value="http://" onblur="if(this.value==''){this.value='http://';}" /><i><span style="font-weight:normal"> e.g http://www.youtube.com/user/</span><b>YourPageName</b></i></td> </tr> <tr> <td>LinkedIn:</td> <td> <input name="linkedin" type="text" class="txbox" size="30" value="http://" onblur="if(this.value==''){this.value='http://';}" /><i><span style="font-weight:normal"> e.g http://www.linkedin.com/in/</span><b>YourPageName</b></i></td> </tr> </table> </td> </tr> <tr> <td><hr noshade color="#C9C9C9" size="1"></td> </tr> <tr> <td> <span style="font-size:9pt;color:#666;">* mandatory fields that must be filled in.</span> </td> </tr> </table> <input class="blueBtn fancyBtn" style="border:0px;float:left;" type="submit" value="Next >" name="submit"> </form> </td> </tr> </table> <? include 'footer.php'; ?> </body> </html>