<head> <link rel="stylesheet" type="text/css" href="style.css"> <title> <?php echo Data_display::show_thread_title($conn); ?> </title> </head> </html> <?php if (isset($_GET["thread_id"]) and isset($_GET["cat_id"])) { $Thread_editor = new Thread_editor($conn); //shows whole thread info, like thread body, title, thread by and time. $Show_thread_body = new Data_display($conn); //show thread body. $Show_thread_body->show_thread_body(); //show thread replies. $Show_thread_body->show_replies(); //code below only runs if user is logged in. if ($Thread_editor->is_user_logged_in("logged_in")) { //***************************************************************************// //*****************TAKES CARE OF SHOWING REPLY OPTIONS***********************// //***************************************************************************// //do these if only is user if logged in. this also shows the form to reply if user if logged in. $Post_reply = new reply($conn); $Post_reply->show_form(); //takes care of making sure user is logged in. thread_id and cat_id variables exist, reply length and empty reply... if ($Post_reply->set_reply()) { $Post_reply->post_reply();
//* Script created by Samiuddin Samiuddin //* Email: phpdevsami@gmail.com //* Skype: n0h4cks //* - This is not an open source project, functions/classes //* or any other code form this script cannot be //* used for other scripts or applications. //* You are not allowed to resell this script. //* - You are free to make modification/changes, //* however it must be for your own use. //*********************************************************************// //start session session_start(); include_once "general/general_class.php"; include_once "connection_to_db.php"; include_once "show_data_class.php"; $Data_display = new Data_display($conn); include_once "create_thread/create_thread_class.php"; //$Create_thread = new create($conn); //if get variable contains cat_id value.. if (isset($_GET["cat_id"])) { //show the threads that belong to that form $Data_display->show_threads(); //if user is logged in then.. let him create a thread. if ($Data_display->is_user_logged_in("logged_in")) { echo "<form method=\"POST\" action=\"{$_SERVER['PHP_SELF']}?cat_id={$_GET['cat_id']}\">\n\t\t\t<p class='form_title'> Thread title: </p> <input name=\"thread_title\" type=\"text\"> </br>\n\t\t\t<p class='form_title'>Thread body: </p> <textarea name=\"thread_body\" type=\"text\"></textarea></br>\n\t\t\t\t\t\t <input name=\"submit_thread\" type=\"submit\" value=\"Submit thread\">\n\t\t\t</form>"; //class to create thread. if (isset($_POST["submit_thread"])) { $Create = new create($conn); } } else { echo "You need to login to create a new thread";
//* Version 1.0 //* Script created by Samiuddin Samiuddin //* Email: phpdevsami@gmail.com //* Skype: n0h4cks //* - This is not an open source project, functions/classes //* or any other code form this script cannot be //* used for other scripts or applications. //* You are not allowed to resell this script. //* - You are free to make modification/changes, //* however it must be for your own use. //*********************************************************************// session_start(); if (!isset($_SESSION["logged_in"])) { header("location: index.php"); } include_once "../general/general_class.php"; include_once "../connection_to_db.php"; include_once "../show_data_class.php"; include_once "edit_info_class.php"; include_once "admin_class.php"; $Admin_cp = new Admin($conn); if (isset($_SESSION["logged_in"]) and $Admin_cp->is_admin()) { $Data_display_to_edit = new Data_display($conn); $Data_display_to_edit->file = "edit_category.php"; $Data_display_to_edit->set_title("</br> <b> Click on the category title to edit </b>"); $Data_display_to_edit->show_categories(); $Edit_info = new edit_info($conn); $Edit_info->edit_category(); } else { header("location: ../index.php"); }
//* Email: phpdevsami@gmail.com //* Skype: n0h4cks //* - This is not an open source project, functions/classes //* or any other code form this script cannot be //* used for other scripts or applications. //* You are not allowed to resell this script. //* - You are free to make modification/changes, //* however it must be for your own use. //*********************************************************************// //work on search feature include_once "track_clicks_class.php"; include_once "general/general_class.php"; include_once "connection_to_db.php"; include_once "show_data_class.php"; include_once "login_user/login_class.php"; $Data_display = new Data_display($conn); $Login = new Login($conn); session_start(); if (!$Login->is_user_logged_in("logged_in")) { //if user is not logged in then show login, register, and recover_password options //link to search bar echo "<a href=\"search/search.php\"> Search on this site </a> </br>"; echo "<a href='login_user/login.php'> Login </a> </br>"; echo "<a href='register_account/register.php'> Register new account </a> </br>"; echo "<a href='recover_password/recover_password.php'> Recover password </a> </br>"; } if ($Login->is_user_logged_in("logged_in")) { //greet user echo "<p style=\"display:inline\">Hello</p> <p style=\"display:inline\" class='thread_by'> {$_SESSION["logged_in"]} </p> </br>"; //link to search bar echo "<a href=\"search/search.php\"> Search on this site </a> </br>";