0) ? (int)$_GET['view'] : false; if ($view !== false) { if (!empty($_POST['reply_text'])) { // Save ticket reply on database $query = array( 'tid' => $view, 'username'=> getValue($_POST['username']), 'message' => getValue($_POST['reply_text']), 'created' => time(), ); $fields = '`'. implode('`, `', array_keys($query)) .'`'; $data = '\''. implode('\', \'', $query) .'\''; mysql_insert("INSERT INTO `znote_tickets_replies` ($fields) VALUES ($data)"); mysql_update("UPDATE `znote_tickets` SET `status`='Player-Reply' WHERE `id`='$view' LIMIT 1;"); } $ticketData = mysql_select_single("SELECT * FROM znote_tickets WHERE id='$view' LIMIT 1;"); if($ticketData['owner'] != $session_user_id) { echo 'You can not view this ticket!'; include 'layout/overall/footer.php'; die; } ?>

View Ticket # [CLOSED]'; } ?>

- Created by:

- Posted by:




$value) { if (empty($value) && in_array($key, $required_fields) === true) { $errors[] = 'You need to fill in all fields.'; break 1; } } // check errors (= user exist, pass long enough if (empty($errors) === true) { /* Token used for cross site scripting security */ if (!Token::isValid($_POST['token'])) { $errors[] = 'Token is invalid.'; } if ($config['use_captcha']) { $captcha = (isset($_POST['g-recaptcha-response'])) ? $_POST['g-recaptcha-response'] : false; if(!$captcha) { $errors[] = 'Please check the the captcha form.'; } else { $secretKey = $config['captcha_secret_key']; $ip = $_SERVER['REMOTE_ADDR']; // curl start $curl_connection = curl_init("https://www.google.com/recaptcha/api/siteverify"); $post_string = "secret=".$secretKey."&response=".$captcha."&remoteip=".$ip; curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 5); curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 0); curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string); $response = curl_exec($curl_connection); curl_close($curl_connection); // Curl end $responseKeys = json_decode($response,true); if(intval($responseKeys["success"]) !== 1) { $errors[] = 'Captcha failed.'; } } } // Reversed this if, so: first check if you need to validate, then validate. if ($config['validate_IP'] === true && validate_ip(getIP()) === false) { $errors[] = 'Failed to recognize your IP address. (Not a valid IPv4 address).'; } } } ?>

Latest Tickets

'; echo ''; echo ''; echo ''; echo ''; echo ''; } ?>
ID: Subject: Creation: Status:
'. $ticket['id'] .''. $ticket['subject'] .''. getClock($ticket['creation'], true) .''. $ticket['status'] .'

Helpdesk

$session_user_id, 'username'=> getValue($_POST['username']), 'subject' => getValue($_POST['subject']), 'message' => getValue($_POST['message']), 'ip' => getIPLong(), 'creation' => time(), 'status' => 'Open' ); $fields = '`'. implode('`, `', array_keys($query)) .'`'; $data = '\''. implode('\', \'', $query) .'\''; mysql_insert("INSERT INTO `znote_tickets` ($fields) VALUES ($data)"); header('Location: helpdesk.php?success'); exit(); } else if (empty($errors) === false) { echo ''; echo output_errors($errors); echo ''; } ?>