| // | rajesh kushwaha | // | sandeep srivatava | // +----------------------------------------------------------------------+ session_start(); //for admin login. //print_r($_SESSION); require_once('configuration.php'); //contain configuration of the project. require_once('includes/database/MySQLConnect.php'); //handles database related functionalities. require_once('includes/database/PageNavigator.php'); // Handles pagination require_once('includes/database/PageNavigatorRep.php'); require_once('includes/function.inc.php'); //generic function of reporter connection. require_once('components/admin/admin.controller.php'); // contains business logic of administrator. global $site_path; $p = $_GET['p'];//parameter p is used to switch over different pages from index.php. $showtop = checkPage($p,'admin'); // checks page authentication. // Getting database information. global $database; $con = new MySQLConnect($hostname, $username, $password);//database connection. parameters comes from configuration.php. $database = $con->createResultSet($databasename);//initialising database class. if ($p == 'reporter_post_query_save') { //fetching data. $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $job_title = $_POST['job_title']; $media_outlet = $_POST['media_outlet']; $phone1 = $_POST['phone1']; $phone2 = $_POST['phone2']; $email_contact = $_POST['email_contact']; $email_query = $_POST['email_query']; $company = $_POST['company']; ///*NAI 12-21-09 Added media_print //$media_print = (trim($media_outlet) . ", " . trim($company)); ///*NAI 1-25-10 Removed above and added below to prevent commas $media_print=addslashes(TRIM($_POST['media_outlet'])); $co_len = strlen(TRIM($_POST['company'])); if ($co_len > 0) { $media_print=addslashes("".TRIM($_POST['media_outlet']).", ".TRIM($_POST['company']).""); } //setting cookies, expires in 1 year. setcookie("first_name", $first_name, time()+60*60*24*360); setcookie("last_name", $last_name, time()+60*60*24*360); setcookie("job_title", $job_title, time()+60*60*24*360); setcookie("media_outlet", $media_outlet, time()+60*60*24*360); setcookie("phone1", $phone1, time()+60*60*24*360); setcookie("phone2", $phone2, time()+60*60*24*360); setcookie("email_contact", $email_contact, time()+60*60*24*360); setcookie("email_query", $email_query, time()+60*60*24*360); setcookie("company", $company, time()+60*60*24*360); } if ($p == 'pubse_response_save') { //fetching data. //-- Remove single quotes and double quotes starts here --// $remarr=array('first_name','last_name','job_title','phone1','phone2','email','website','city','province','country','company','speakperson','comp_represented','other_website','responder_type'); foreach($_POST as $pkey=>$pval) { if(in_array($pkey,$remarr)){ $p1key=str_replace("'","'",trim($pval)); $_POST[$pkey]=stripslashes(str_replace('"',""",$p1key)); } } //-- Remove single quotes and double quotes ends here --// $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $job_title = $_POST['job_title']; $phone1 = $_POST['phone1']; $phone2 = $_POST['phone2']; $email = $_POST['email']; $website = $_POST['website']; $city = $_POST['city']; $province = $_POST['province']; $country = $_POST['country']; $company = $_POST['company']; $speakperson = $_POST['speakperson']; $comp_represented = $_POST['comp_represented']; $other_website = $_POST['other_website']; $responder_type = $_POST['responder_type']; //setting cookies, expires in 1 year. setcookie("pubse_first_name", $first_name, time()+60*60*24*360); setcookie("pubse_last_name", $last_name, time()+60*60*24*360); setcookie("pubse_job_title", $job_title, time()+60*60*24*360); setcookie("pubse_phone1", $phone1, time()+60*60*24*360); setcookie("pubse_phone2", $phone2, time()+60*60*24*360); setcookie("pubse_email", $email, time()+60*60*24*360); setcookie("pubse_website", $website, time()+60*60*24*360); setcookie("pubse_city", $city, time()+60*60*24*360); setcookie("pubse_province", $province, time()+60*60*24*360); setcookie("pubse_country", $country, time()+60*60*24*360); setcookie("pubse_company", $company, time()+60*60*24*360); setcookie("pubse_speakperson", $speakperson, time()+60*60*24*360); setcookie("pubse_comp_represented", $comp_represented, time()+60*60*24*360); setcookie("pubse_other_website", $other_website, time()+60*60*24*360); setcookie("pubse_responder_type", $responder_type, time()+60*60*24*360); } ?>
  ADMIN PANEL
  WELCOME!
You're logged in to the Reporter Connection
media center
 
getRows($sql); $reg= $reg[0]['messege_description']; $confirm=stripslashes($reg); //get_thankyouapage($confirm, $rth); get_thankyouapage($confirm."
A confirmation has been sent to you at ".$_SESSION['reporterun']."

Would you like to submit your first query right now?
(click the option you prefer)", $rth); } break; case 'thank_you': if (!file_exists('components/reporter/'.$page.'.php')) { $page = $default; } include_once('components/reporter/'.$page.'.php'); $email_query = $_COOKIE['email_query']; $sql = "SELECT * from rc_message where id='2'"; $content = $database->getRows($sql); $content= $content[0]['messege_description']; $msg1 =stripslashes($content); $msg = $msg1.'
A confirmation has been sent to you at '.$email_query.'.

If you have any questions, email us at staff@reporterconnection.com.

That email also contains a link in case you need to close your query and no longer wish to receive responses.
'; get_thankyouapage($msg, $rth); break; case 'query_permission': $quid = $_GET['quid']; if (!file_exists('components/reporter/'.$page.'.php')) { $page = $default; } include_once('components/reporter/'.$page.'.php'); break; case 'query_off': $quid = $_GET['quid']; $sql = "SELECT query_id FROM rc_main_queries WHERE query_id = '".$quid."' and hashvalue = '".$_GET['h']."'"; $yesQuery = $database->isRows($sql); $sql_chk = "SELECT query_id FROM rc_main_queries WHERE query_id = '".$quid."' AND is_open = 1"; $chknum = $database->getNumRows($sql_chk); if($chknum != 0){ // Putting query id into the session to track response and comments of the reporter $_SESSION['quid'] = $quid; if ($yesQuery) { include_once('components/reporter/reporter_post_query.controller.php'); query_off(); $sql = "SELECT * from rc_message where id='4'"; $content = $database->getRows($sql); $content= $content[0]['messege_description']; $msg1 =stripslashes($content); $msg = $msg1; include_once('components/reporter/queryoff_thank_you.php'); get_thankyouapage($msg, $rth); } else{ include_once('components/home.php'); } } else{ ?> getRows($sql); $content= $content[0]['messege_description']; $msg1 =stripslashes($content); $msg = $msg1; get_thankyouapage($msg, $rth); break; ///////////////////////////////////reporter - finish//////////////////////////////////////////////////// ///////////////////////////////////administrator - start//////////////////////////////////////////////// case 'admin': if (!file_exists('components/admin/'.$page.'.php')){ $page = $default; } include('components/admin/'.$page.'.php'); break; ///////////////////////////////////administrator - end ////////////////////////////////////////////////// case 'admin_manage_question': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; // case 'admin_manage_message': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; case 'admin_response_view': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; case 'admin_manage_feedback': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; // NAI 3-8-2010 Added selection for newsletters case 'admin_manage_newsletter_profile': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; // NAI 3-10-2010 Added selection for newsletters case 'admin_create_newsletter_profile': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; // NAI 3-8-2010 Added selection for newsletters case 'admin_manage_newsletter_list': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; // NAI 3-10-2010 Added selection for newsletters case 'admin_manage_newsletter_list2': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; // NAI 3-24-2010 Added selection for newsletters case 'qstats': if (!file_exists('components/admin/admin_download_qstats.php')){ $page = $default; } include_once('components/admin/admin_download_qstats.php'); break; case 'admin_manage_reporter': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; case 'admin_query_view_detail': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; // case 'admin_manage_category': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; case 'admin_manage_salutation': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; case 'admin_manage_responder': if (!file_exists('components/admin/'.$page.'.php')) { $page = $default; } include_once('components/admin/'.$page.'.php'); break; case 'PublishedRecordsReport': // Added by NAI 12/7/09 if (!file_exists('components/admin/PublishedRecordsReport.php')){ $page = $default; } include_once('components/admin/PublishedRecordsReport.php'); break; case 'admin_query_review_report': // Added by NAI 12/7/09 if (!file_exists('components/admin/admin_query_review_report.php')){ $page = $default; } include_once('components/admin/admin_query_review_report.php'); break; case 'admin_download_query': if (!file_exists('components/admin/admin_download_query.php')){ $page = $default; } include_once('components/admin/admin_download_query.php'); break; case 'admin_manage_unpublished_queries': if (!file_exists('components/admin/admin_manage_unpublished_queries.php')){ $page = $default; } include_once('components/admin/admin_manage_unpublished_queries.php'); break; case 'admin_manage_newsletter': if (!file_exists('components/admin/admin_manage_newsletter.php')){ $page = $default; } include_once('components/admin/admin_manage_newsletter.php'); break; case 'admin_download_feedback': if (!file_exists('components/admin/admin_download_feedback.php')){ $page = $default; } include_once('components/admin/admin_download_feedback.php'); break; case 'user_show_response_query': if (!file_exists('popups/'.$page.'.php')) { $page = $default; } include_once('popups/'.$page.'.php'); break; ///////////////////////////////////publicity seeker - start////////////////////////////////////////////// case 'pub_default': if (!file_exists('components/reporter/thank_you.php')) { $page = $default; } include_once('components/reporter/thank_you.php'); $sql = "SELECT * from rc_message where id='8'"; $content = $database->getRows($sql); $content= $content[0]['messege_description']; $msg1 =stripslashes($content); $msg = $msg1; get_thankyouapage($msg, $rth); break; case 'pubse_response_query': if (!file_exists('components/seeker/'.$page.'.php')) { $page = $default; } include_once('components/seeker/'.$page.'.php'); break; case 'pubse_response_query_v2': if (!file_exists('components/seeker/'.$page.'.php')) { $page = $default; } include_once('components/seeker/'.$page.'.php'); break; case 'pubse_response_query_v2b': if (!file_exists('components/seeker/'.$page.'.php')) { $page = $default; } include_once('components/seeker/'.$page.'.php'); break; case 'pubse_response_query_v2_new': if (!file_exists('components/seeker/'.$page.'.php')) { $page = $default; } include_once('components/seeker/'.$page.'.php'); break; case 'pubse_response_query_shared': if (!file_exists('components/seeker/'.$page.'.php')) { $page = $default; } include_once('components/seeker/'.$page.'.php'); break; case 'response_thank_you': if (!file_exists('components/reporter/thank_you.php')) { $page = $default; } $rth = $_GET['rth']; include_once('components/reporter/thank_you.php'); $sql = "SELECT * from rc_message where id='6'"; $responce = $database->getRows($sql); $responce= $responce[0]['messege_description']; $msg = stripslashes($responce); get_thankyouapage($msg, $rth); break; case 'response_thank_you_beforeyougo': if (!file_exists('components/reporter/thank_you_beforeyougo.php')) { $page = $default; } $rth = $_GET['rth']; include_once('components/reporter/thank_you_beforeyougo.php'); $sql = "SELECT * from rc_message where id='10'"; $responce = $database->getRows($sql); $responce= $responce[0]['messege_description']; $msg = stripslashes($responce); get_thankyouapage($msg, $rth); break; ///////////////////////////////////publicity seeker - end////////////////////////////////////////////////// /********************************** view - end ************************************************************/ /********************************** logic - start *********************************************************/ ///////////////////////////////////reporter - start//////////////////////////////////////////////////////// //reporter logic file. - reporter_post_query.controller.php case 'reporter_post_query_save': if (!file_exists('components/reporter/reporter_post_query.controller.php')){ $page = $default; } include_once('components/reporter/reporter_post_query.controller.php'); save_query(); break; case 'reporter_register_save': //print_r($_POST); //die(); if (!file_exists('components/reporter/reporter_post_query.controller.php')){ $page = $default; } include_once('components/reporter/reporter_post_query.controller.php'); save_registration_details(); break; case 'reporter_info_save': if (!file_exists('components/reporter/reporter_post_query.controller.php')){ $page = $default; } include_once('components/reporter/reporter_post_query.controller.php'); save_reporter_details(); ?> isRows($sql); if ($yesQuery) { include_once('components/admin/admin.controller.php'); publish_on(); } break; case 'admin_update_responder': include_once('components/admin/admin.controller.php'); update_responder(); break; case 'admin_delete_responder': include_once('components/admin/admin.controller.php'); delete_responder(); break; case 'admin_add_responder': include_once('components/admin/admin.controller.php'); add_responder(); break; case 'admin_query_off': global $site_path; $sql= "SELECT query_id FROM rc_main_queries WHERE query_id = '".$_GET['quid']."' and hashvalue = '".$_GET['h']."'"; $yesQuery = $database->isRows($sql); if ($yesQuery) { include_once('components/reporter/reporter_post_query.controller.php'); query_off(); } ?> isRows($sql); if ($yesQuery) { include_once('components/reporter/reporter_post_query.controller.php'); query_on(); } ?> isRows($sql); if ($yesQuery) { include_once('components/reporter/reporter_post_query.controller.php'); query_off(); } ?> isRows($sql); if ($yesQuery) { include_once('components/reporter/reporter_post_query.controller.php'); query_on(); } ?> isRows($sql); if ($yesQuery) { include_once('components/admin/admin.controller.php'); delete_query(); } break; case 'admin_reporter_delete': global $site_path; $sql= "SELECT query_id FROM rc_main_queries WHERE query_id = '".$_GET['quid']."'"; $yesQuery = $database->isRows($sql); if ($yesQuery) { include_once('components/admin/admin.controller.php'); delete_query(); } break; case 'admin_mark_process': markProcessedQuery(); break; case 'save_feedback': $qid = $_SESSION['quid']; $res = $_POST['reporter_response']; $comm = $_POST['reporter_comments']; saveReporterResponse($qid, $res, $comm); break; ///////////////////////////////////administrator - end/////////////////////////////////////////////////////// ///////////////////////////////////publicity seeker - start////////////////////////////////////////////////// case 'pubse_response_save': if (!file_exists('components/seeker/pubse_response_query.controller.php')){ $page = $default; } include_once('components/seeker/pubse_response_query.controller.php'); save_response(); break; case 'pub_query_close': if (!file_exists('components/reporter/thank_you.php')) { $page = $default; } include_once('components/reporter/thank_you.php'); $sql = "SELECT * from rc_message where id='7'"; $content = $database->getRows($sql); $content= $content[0]['messege_description']; $msg1 =stripslashes($content); $msg = $msg1; get_thankyouapage($msg, $rth); break; ///////////////////////////////////publicity seeker - end//////////////////////////////////////////////////// /********************************** logic - end ************************************************************/ default: $page = $default; include_once('components/'.$page.'.php'); } ?>  
 
Copyright © 2009 Reporter Connection. All Rights Reserved.?>
Home About Us Register As A Source Register / Login As A Journalist Why Free Other Products & Services Frequently Asked Questions Contact Us Web Analytics