Mini Shell Moded By TiGER HeX
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
var
/
www
/
ridazz
/
Linux midnightridazz 4.19.0-11-cloud-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64
Upload File :
New :
File
Dir
//var/www/ridazz/eventAdd.php
<? include_once('includes/static/configure.php'); include_once('includes/static/util.php'); include_once('includes/static/dbcon2.php'); include_once('includes/static/gdimg.php'); include_once('includes/static/sessions.php'); include_once('includes/static/adminutil.php'); include_once('includes/appTop2.php'); if(!is_authorized()){ header("Location: login.php?refurl=".urlencode($_SERVER['PHP_SELF'])); exit(); } if(is_banned()){ header("Location: banned.php"); exit(); } $html=""; $uid = 0; if(isset($_SESSION['admin_id'])){ $uid = isNum($_SESSION['admin_id'], 0); }elseif(isset($_SESSION['editor_id'])){ $uid = isNum($_SESSION['editor_id'], 0); }elseif(isset($_SESSION['user_id'])){ $uid = isNum($_SESSION['user_id'], 0); } if(isset($_POST['submit'])){ //store text $story_title = $db->sanitize_input(sanitize_title($_REQUEST['title'])); $story_body = $db->sanitize_input(sanitize_body(get_html_text($_REQUEST['body']))); $date=sanitize_date($_REQUEST['year']."-".$_REQUEST['month']."-".$_REQUEST['day']); //$sql = "INSERT INTO 50mm_stories (user_id,story_title,story_body,story_type,approved,entry_time) VALUES ('$uid','$story_title','$story_body','EVENT',1,'$date')"; $sql = "INSERT INTO 50mm_stories (user_id,story_title,story_body,story_type,approved,entry_time) VALUES (?,?,?,'EVENT',1,'$date')"; //'$uid','$story_title','$story_body','EVENT',1,'$date' $stmt = $db->sql_prepare($sql); mysqli_stmt_bind_param($stmt, 'sss', $uid, $story_title, $story_body); $result = mysqli_stmt_execute($stmt); if($result == false){ $sql_error = $db->sql_error(); die($sql_error['message']); } $sql = "SELECT LAST_INSERT_ID() AS story_id"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); $story_id = $row['story_id']; //store images for($i=1;$i<=count($_FILES);$i++){ $cur_file = $_FILES['file'.$i]['name']; $cur_temp = $_FILES['file'.$i]['tmp_name']; $cur_size = $_FILES['file'.$i]['size']; $cur_type = $_FILES['file'.$i]['type']; $cur_mime = $_FILES['file'.$i]['type']; $cur_error = $_FILES['file'.$i]['error']; if(!empty($cur_file)){ $valid = validate_content($cur_error,$cur_mime,$cur_size,$cur_file,EVENT_MAX_KB); if($valid['result']){ $type = explode("/",$cur_mime); $cur_type = trim($type[0]); $unique_name = $db->sanitize_input(get_unique_filename($cur_file)); //check to see if image needs resizing $image_info = getimagesize($cur_temp); //create image resource $gd = new gd_img($cur_mime,$cur_temp); if(!$gd->img_id){ die($gd->gd_error);} //check to see if thumb image needs resizing if(($image_info[0] > EVENT_THUMB_WIDTH) || ($image_info[1] > EVENT_THUMB_HEIGHT)){ //resize $id_t = $gd->gd_scale_img(EVENT_THUMB_WIDTH,EVENT_THUMB_WIDTH,IMG_QUALITY); if(!$id_t){ die($gd->gd_error);} $res = $gd->gd_create_img($id_t,ROOT_DIR.STORY_SIMG_DIR.$unique_name); if(!$res){ die($gd->gd_error);} }else{ //don't resize $res = $gd->gd_create_img($gd->img_id,ROOT_DIR.STORY_SIMG_DIR.$unique_name); if(!$res){ die($gd->gd_error);} } //create watermark image $w_type = getimagesize(WATERMARK_FILE); $gdw = new gd_img($w_type['mime'],WATERMARK_FILE); if(!$gdw->img_id){ die($gdw->gd_error);} //check to see if full size image needs resizing if(($image_info[0] > EVENT_IMG_WIDTH) || ($image_info[1] > EVENT_IMG_HEIGHT)){ //scale image $id = $gd->gd_scale_img(EVENT_IMG_WIDTH,EVENT_IMG_WIDTH,IMG_QUALITY); if(!$id){ die($gd->gd_error);} //apply watermark $res = $gd->gd_merge_ids($id,$gdw->img_id); if(!$res){ die($gd->gd_error);} //create scaled image $res = $gd->gd_create_img($id,ROOT_DIR.STORY_LIMG_DIR.$unique_name); if(!$res){ die($gd->gd_error);} }else{ $id = $gd->img_id; //apply watermark $res = $gd->gd_merge_ids($id,$gdw->img_id); if(!$res){ die($gd->gd_error);} //create full image $res = $gd->gd_create_img($gd->img_id,ROOT_DIR.STORY_LIMG_DIR.$unique_name); if(!$res){ die($gd->gd_error);} } $sql = "INSERT INTO 50mm_embed (story_id,image) VALUES ('$story_id','$unique_name')"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } }else{ $html.="<div class=\"error\">Unable to store the following content $cur_file<br> Reason: ".$valid['error']."</div>"; } } } $html.= "<div class=\"hilite\">Your have successfully added you ride! Click \"Edit my rides\" if you need to update or make changes to this ride.</div>"; } include_once('includes/header.php'); ?><?echo $html;?> <h2>To submit Ride or Event to MidnightRidazz.com, fill out the form below.</h2> <table width=550> <tr> <td>SERVER ISSUE: If you are unable to upload an event due to an error, please make sure to remove all punctuation from your event. Sorry, we are working on it.<br> <br> IMPORTANT: PLEASE include as many details about the ride as possible... Date, time, description, a route map. Including all details in text allows people to copy paste it into emails. Providing a map link would be helpful as well. Use <a href="http://www.gmap-pedometer.com/?r=419022" taget=_blank>www.gmap-pedometer.com</a> to create an interactive map of your route.<br> <br> If you are promoting a ride that ends at an event you must include the cost of entry and there must be a place for Bicyclists to safely lock up their bikes at the event!</td> </tr> </table> <p> <script>divs = new Array('title','body');</script> <form action="<?echo $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data" onSubmit="return validateForm(this,divs,'eventError');"> <table cellspacing="0" cellpadding="4" border="0"> <tr> <td width="70">Ride / Event Title<span id="errtitle" class="error" style="visibility:hidden;"> *</span></td></td> <td><input type="text" name="title" value="" class="field" style="width: 550px;"></td> </tr> <tr> <td width="70">Date of Ride</td> <td> <? $m_opt = '<select name="month">'."\n"; while (list($key, $txt) = each($month_array)) { $m_opt.= '<option value="'.$key.'">'.$txt.'</option>'."\n"; } $m_opt.= '</select>'."\n"; echo $m_opt; ?> - <? $d_opt = '<select name="day">'."\n"; for($i=1;$i<=31;$i++){ if($i<=9){ $key = "0".$i; }else{ $key = $i; } $d_opt.= '<option value="'.$key.'">'.$i.'</option>'."\n"; } $d_opt.= '</select>'."\n"; echo $d_opt; ?> - <? $start_year = date('Y') - 0; $end_year = date('Y') + 1; $y_opt = '<select name="year">'."\n"; for($i=$start_year;$i<=$end_year;$i++){ $y_opt.= '<option value="'.$i.'">'.$i.'</option>'."\n"; } $y_opt.= '</select>'."\n"; echo $y_opt; ?> </td> </tr> <tr> <td width="70">Upload Flyer Art, Maps and Image(s)</td> <td> <? for($i=1;$i<=5;$i++){ echo "<input type=\"file\" name=\"file".$i."\" class=\"field\"><br>"; } ?> </td> </tr> <tr> <td colspan="2"><table width="550"><tr><td><br><br>Please submit all the ride details (date, time, when, where etc.) in text format below. You can use custom html if you wish or use the sample html provided... NOTE: Please provide address and zip code of starting point for those browsing with cellphones. (Yes this site rocks ass so hard you can view it on a cellphone.)<br><br><span id="errbody" class="error" style="visibility:hidden;"> *</span></td></tr></table></td> </tr> <tr> <td colspan="2"><textarea wrap="on" name="body" class="body" style="width: 680px; height: 650px;">Place your RIDE description here!<?echo $story_body?></textarea></td> </tr> <tr> <td colspan="2" align="center">By clicking the "Submit Ride/Event"<br> button below you agree that this site and it's owners and moderators<br> bear no liability what so ever for anything that occurs as<br> a result of this event posting. Thanks.<br> <br> <input name="submit" type="submit" class="button" value="Submit Event"> <div id="eventError" class="error" style="visibility:hidden;">Please correct the fields marked by *</div> </td> </tr> </table> </form> <br>Have you considered donating to the website?<br> All funds will be used for hosting and improvements.<br><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="RB49W473VYUYN"> <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit2" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> <br><br> Before submitting your ride please consider these guidelines:<BR><BR> <h2>Rulezz of the Ride...</h2>Lets be honest. No one is particularly eager to be an authority figure of massive bike rides. The reality is that a ride doesnt really need to have figures of authority. If every one observes common sense guidelines and are actively vocal about them as individuals we can all stay safe AND keep the rides fun. Ridazz works because every individual rider recognizes that the safety of one is the safety of all. Ridazz are vocal about hazzards in the road, Ridazz call out potholes, turns and slow downs. They are vocal about staying to the right and about thanking our friends in cars that we share the road with for waiting a few extra minutes for us to get through. It is because of these following guidelines that one can truly say: Ridazz don't die... they multiply.<br><br><br><img src="/images/stories/small/STREET_1156306415.gif" border="0" vspace="20" style="cursor:pointer;" onclick="popImage('%2Fimages%2Fstories%2Flarge%2FSTREET_1156306415.gif','410','600');"><br>Stay out of the left lane. Stay to the right.Most routes take Ridazz down 4 lane streets... This allows for the use of one entire lane while allowing for automobiles to continue using the left lane to pass on by. This is perhaps the most important rule we can follow. This also means maintaining the right lane as our own not to be confused with the <i>right hand turn lane</i> which some Ridazz tend to drift into when it becomes available or when there are no longer parked cars blocking it. We get one single un-obstructed lane and we maintain this lane until the route changes direction.<br><br><br>Don't Litter.There's nothing that hurts the Ridazz reputation quite like the mess of trash that invariably gets left behind at every rest stop we make. Please show respect for the neighborhood and for the small businesses by picking up after yourself and your friends.<br><br><br>Make some noise!Bicycle riders need to be noticed. Not because of their silly aviator goggles, but because being noticed means that drivers hear them and then see them.... and therefore avoid hitting them. We're not talking about yelling at drivers or scaring people... We're talking about whistles, cat calls, wolf howls and any other sexy noises you can muster that will put drivers on alert especially while crossing through an intersection. It's for YOUR safety.<br><br>Bicycle riders need to be notified of dangers. Potholes, cracks, railroad tracks... They can all cause serious injury. When a rida observes any such hazzards in the road they speak up and pass the message back. "Pothole to the right! Pass it back!" "Stop ahead!" "Slowing down slowing down!" All of these signals help keep the beast moving along SAFELY.<br><br><br>No Rida Left Behind.We've come a long way since the days of 30 Ridazz and everyone of them being able to stop when a fellow Rida was in trouble. Today this timeless slogan continues to be an important rule. Because it is simply impossible to stop 1000+ riders in their tracks for every person that gets a flat or experiences a mechanical failure we need to re-define what that slogan means. Understand that you as an individual rider are responsible for your well being. Have a buddy on the ride and stay in touch via cell phone. Make some contacts while getting ready at the start. It is EXTREMELY important to have your bicycle in good working order before you ride. Bring a flat fix kit, tubes and tools. You owe it to yourself to be prepared. And if you happen to see a lone rida stranded on the side, use that opportunity to make a new friend and help them out... No rida left behind.<br><br><br>Slowing down or stopping? Move to the right!If you as an individual have to suddenly slow down or you need to stop and the ride is moving along, PLEASE move as quickly as possible to the right and out of the way. Make sure you aren't cutting someone off in the process!<br><br><br>Enforcing the Rulezz?Nobody wants to be told by some "busybody" how to ride... Yet we all want to experience a flowing harmonious ride that keeps everyone safe and out of the cops radar. So how do you communicate to a rida that he or she is being a drag? Speak up! A simple "Stay to the right" is often enough to remind a rida that they're slipping. If you see a knucklehead throwing a bottle or littering simply boo that person. It's called community shaming. When everyone participates, it really works. Thanks for making Ridazz safe and fun for the years to come.<br><br><br><br><br><br> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?></p>