473,320 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Notice: Undefined variable

232 100+
I again started working on php after 4 years but now when i run any php project it gives following error which was fine 4 years back.I am using wamp 2.2

( ! ) Notice: Undefined variable: PDF in C:\wamp\www\Recruitment Management System\mamook.php on line 37
Call Stack
# Time Memory Function Location
1 0.0216 830216 {main}( ) ..\mamook.php:0
include(misc/release_constants.inc) [function.include]: failed to open stream: No such file or directory
( ! ) Notice: Use of undefined constant PATH_LOGS - assumed 'PATH_LOGS' in C:\wamp\www\Recruitment Management System\misc\userErrorHandler.inc on line 97
Call Stack
# Time Memory Function Location
1 0.0216 830216 {main}( ) ..\mamook.php:0
2 0.2199 871928 userErrorHandler( ) ..\mamook.php:67
include() [function.include]: Failed opening 'misc/release_constants.inc' for inclusion (include_path='.;C:\php\pear')
( ! ) Notice: Use of undefined constant PATH_LOGS - assumed 'PATH_LOGS' in C:\wamp\www\Recruitment Management System\misc\userErrorHandler.inc on line 97
Call Stack
# Time Memory Function Location
1 0.0216 830216 {main}( ) ..\mamook.php:0
2 0.3062 1271320 userErrorHandler( ) ..\mamook.php:67
include(PATH_ADODBadodb.inc.php) [function.include]: failed to open stream: No such file or directory
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. /*
  3.  
  4.  +------------------------------------------------------------------------------+
  5.  | Mamook(R) Software                                                           |
  6.  +------------------------------------------------------------------------------+
  7.  | Copyright (c) 2000-2005 University of Victoria.  All rights reserved.        |
  8.  +------------------------------------------------------------------------------+
  9.  | THE LICENSED WORK IS PROVIDED UNDER THE TERMS OF THE ADAPTIVE PUBLIC LICENSE |
  10.  | ("LICENSE") AS FIRST COMPLETED BY: The University of Victoria. ANY USE,      |
  11.  | PUBLIC DISPLAY, PUBLIC PERFORMANCE, REPRODUCTION OR DISTRIBUTION OF, OR      |
  12.  | PREPARATION OF DERIVATIVE WORKS BASED ON, THE LICENSED WORK CONSTITUTES      |
  13.  | RECIPIENT'S ACCEPTANCE OF THIS LICENSE AND ITS TERMS, WHETHER OR NOT SUCH    |
  14.  | RECIPIENT READS THE TERMS OF THE LICENSE. "LICENSED WORK" AND "RECIPIENT"    |
  15.  | ARE DEFINED IN THE LICENSE. A COPY OF THE LICENSE IS LOCATED IN THE TEXT     |
  16.  | FILE ENTITLED "LICENSE.TXT" ACCOMPANYING THE CONTENTS OF THIS FILE. IF A     |
  17.  | COPY OF THE LICENSE DOES NOT ACCOMPANY THIS FILE, A COPY OF THE LICENSE MAY  |
  18.  | ALSO BE OBTAINED AT THE FOLLOWING WEB SITE: http://www.mamook.net            |  
  19.  |                                                                              |
  20.  | Software distributed under the License is distributed on an "AS IS" basis,   |
  21.  | WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for |
  22.  | the specific language governing rights and limitations under the License.    | 
  23.  +------------------------------------------------------------------------------+
  24.  | Filename: mamook.php                                                        |
  25.  +------------------------------------------------------------------------------+
  26.  | Description:                                                                 |
  27.  +------------------------------------------------------------------------------+
  28.  
  29. */
  30. //set_error_handler('myHandlerForMinorErrors', E_NOTICE | E_STRICT);
  31.  
  32.  
  33. ob_start('ob_gzhandler', 2048);
  34. // stupid IE workaround, PDFs don't save over SSL for stupid IE
  35. if ($PDF) {
  36.     session_cache_limiter("must-revalidate");
  37. }
  38. session_start();
  39. define("DEBUG", false);  // do a `tail -f logs/test.txt` to watch the debugging output
  40. define("DEBUG_QUERY_TRACE", false);
  41. if (DEBUG) { include("misc/debug_functions.inc"); }
  42.  
  43. if (DEBUG)
  44. {  // *** DEBUG CODE BELOW ***
  45.     dumpToLog("*** BEGIN mamook.php at " . date("Y-m-d H:i:s") . " ***\n");
  46.     dumpToLog("INITIAL COOKIE VALUES {\n");
  47.     dumpCookies();
  48.     dumpToLog("}\n");
  49. }  // *** DEBUG CODE ABOVE ***
  50.  
  51. // Filename:  mamook.php
  52. // this is the main code for the information sign up system.  The code in this file determines whether or not user
  53. // has logged in, if the user is an administrator or a student, and if the user has selected a menu bar item.  If 
  54. // the user has selected a menu bar item, code from another file is included to perform the selected function.  
  55.  
  56. include('misc/compatibility.inc');
  57. /* User Defined Error Handling */
  58. include('misc/userErrorHandler.inc');
  59.  
  60. // *** constants, functions, configuration, etc  ***
  61. $select=urldecode($select);
  62.   $PHP_SELF_MENU = "mamook.php";
  63.  
  64. $PHP_SELF = $PHP_SELF_MENU . "?menu_select=" . urlencode($menu_select);
  65. include('misc/release_constants.inc'); // release_constants to be included before constants.inc
  66. include('misc/constants.inc');    // constants must be included before wwwclient.inc
  67. include('misc/names.inc');
  68. include('misc/functions.inc');
  69. include('misc/wwwclient.inc');
  70. include(PATH_ADODB . 'adodb.inc.php');
  71. include('misc/db.inc');
  72. include('plugins/plugin_control.inc.php');
  73. include('misc/resume_functions.inc');
  74. include('misc/special_flags_functions.inc');
  75. $client = new wwwclient();
  76.  
  77. $GLOBALS['plugin_control']->LoadPluginsByType("*");
  78.  
  79. /*
  80.  If the user is userlevel MULTIPLE and they have selected a department_choice, we need
  81.  to set that as a cookie.
  82. */
  83.  
  84. include("misc/authenticate.inc");
  85. $auth = new authenticate_class();
  86.  
  87. if ($userlevel == MULTIPLE && $department_choice) {
  88.     $_SESSION['SESSION_department'] = $department_choice;
  89. }
  90. // If someone is trying to login as a student using the quickmenu, we need to set up the variables here.
  91. if ($PDF && $select == 'login_as_student') 
  92. {
  93.     //:TODO: limit user level to this
  94.     unset($PDF);
  95.     $select = 'student_login';
  96.     $admin_student_login = 'yes';
  97.     $submit = 'Log In';
  98.     $sql = ("
  99.         SELECT student_number
  100.         FROM student_department
  101.         WHERE record_id='" . $record_id . "'
  102.         ");
  103.     $result = $GLOBALS['dbh']->Execute($sql);
  104.     $row = $result->FetchRow();
  105.     $student_number_login = $row["student_number"];
  106. }
  107.  
  108. if ($admin_student_login == 'yes')
  109. {
  110.     // Test to make sure that the student the user is trying to login using has not withdrawn from all of their departments.
  111.     // :CAUTION: We need to first determine all of the departments that are in the admin user's group, then use this in the
  112.     // query below.
  113.     $depts_in_group = department_groups($_SESSION['SESSION_department']);
  114.  
  115.     // Make sure we have an array, and that it has a size.
  116.     if (is_array($depts_in_group) && sizeof($depts_in_group))
  117.     {
  118.         foreach($depts_in_group as $dig)
  119.         {
  120.             $dept_string .= "'" . $dig . "',";
  121.         }
  122.         // Trim the trailing comma
  123.         $dept_string = substr($dept_string, 0, -1);
  124.     }
  125.     else
  126.     {
  127.         // This should NEVER occur!
  128.         assert(false);
  129.     }
  130.  
  131.     $sql = ("
  132.         SELECT DISTINCT sd.record_id
  133.         FROM student_department AS sd
  134.         WHERE (sd.withdraw='' OR sd.withdraw IS NULL)
  135.         AND sd.department_id IN (" . $dept_string . ")
  136.         ");
  137.  
  138.     // They've used either the text input or the select box, so determine which, and include the appropriate clause in the query
  139.     if ($student_number_login)
  140.     {
  141.         $sql .= ("
  142.             AND sd.student_number='" . $student_number_login . "'
  143.         ");
  144.     }
  145.     else
  146.     {
  147.         $sql .= ("
  148.             AND sd.student_number='" . $student_number_login2 . "'
  149.             ");
  150.     }
  151.  
  152.     $result = $GLOBALS['dbh']->Execute($sql);
  153.     if (!$result->RecordCount())
  154.     { 
  155.         $error = ("The student you have tried to log in as is either not a student in your department, or has been withdrawn from all co-op departments, and so you may not log in as them.");
  156.         $admin_student_login = "";
  157.         $select = 'student_login';
  158.     }
  159. }
  160. if ($select == "logout")
  161. {
  162.     $auth->logout();  // logout is in misc/authenticate.inc
  163. }
  164.  
  165. $auth->authenticate();
  166. $userlevel = $auth->userlevel;
  167. $login_id = $auth->login;
  168. $student_number = -1;
  169.  
  170. if (DEBUG)
  171. {  // *** DEBUG CODE BELOW ***
  172.     dumpToLog("POST AUTHENTICATION CONDITIONS {\n");
  173.     dumpToLog("\tUserlevel: " . $auth->userlevel . "\n");
  174.     dumpToLog("\tLogin: " . $auth->login . "\n");
  175.     dumpToLog("\tDepartment: " . $auth->department . "\n");
  176.     dumpToLog("}\n");
  177. }  // *** DEBUG CODE ABOVE ***
  178.  
  179.  
  180. // Set up Department Information for logged on use
  181. $departments_in_group = department_groups($auth->department);
  182.  
  183. // Select color scheme wanted for the user
  184. include('misc/colorscheme.inc');
  185.  
  186. // Determine which menubar to show to the user based on the userlevel assigned to them by authenticate.
  187. switch($userlevel)
  188. {
  189.     case HREMPLOYER:
  190.     case EMPLOYER:
  191.         $sql = ("SELECT a.employer_id, a.contact_id, b.department_id
  192.             FROM employer_login AS a, contact_employer AS b
  193.             WHERE a.login_id='" . $auth->login . "'
  194.             AND b.contact_id=a.contact_id");
  195.  
  196.         $result = $GLOBALS['dbh']->Execute($sql);
  197.  
  198.         if ($row = $result->FetchRow()) 
  199.         {
  200.             $employer_id = $row["employer_id"];
  201.             $contact_id = $row["contact_id"];
  202.             $department_id = $row["department_id"];
  203.         }
  204.         else 
  205.         {
  206.             // probably wanna put checking in here
  207.         }
  208.  
  209.         if (!$select)
  210.         {
  211.             $select = "welcome";
  212.         }
  213.         break;
  214.  
  215.     case OFFICE:
  216.     case TRAFFICDIRECTOR:
  217.         // if user is admin, show admin menu bar
  218.         if (!$select)
  219.         {
  220.             // if user hasn't selected from the menu bar, show welcome screen
  221.             $select = "welcome";
  222.         }
  223.         break;
  224.  
  225.     case ADMINEMPLOYER:
  226.         // Login as AdminEmployer, choose from list after throwing in search criteria
  227.         $checkExists = $GLOBALS['dbh']->Execute ("
  228.             SELECT login_id 
  229.             FROM employer_login 
  230.             WHERE contact_id='$employer_contact_id_login'
  231.             ");
  232.  
  233.         $sql = ("
  234.             SELECT employer_id, contact_id, department_id
  235.             FROM contact_employer
  236.             WHERE contact_id='" . $employer_contact_id_login . "'
  237.             ");
  238.         $result = $GLOBALS['dbh']->Execute($sql);
  239.         $row = $result->FetchRow();
  240.  
  241.         $employer_id = $row["employer_id"];
  242.         $contact_id = $row["contact_id"];
  243.         $department_id = $row["department_id"];
  244.  
  245.         if ($checkExists->RecordCount() > 0)
  246.         {
  247.             $PHP_SELF .= "&amp;admin_employer_login=yes&amp;employer_contact_id_login=$employer_contact_id_login";
  248.         }
  249.         else 
  250.         {
  251.             $userlevel=$auth->userlevel=OFFICE;
  252.             $error = "Contact is not currently registered as having a login id; therefore, you can not be logged-in as them.";
  253.         }
  254.  
  255.         if (!$select || ($select=="employer_login" && $error==""))
  256.         {  
  257.             $select="welcome";
  258.         }
  259.  
  260.         break;
  261.  
  262.     case ADMINSTUDENT:
  263.         // Login as Adminstudent, 3 ways to select, student login, student number, or pulldown (student_number is sent).
  264.         // Priority is now sent to the pulldown, next the student login, then the student number field.
  265.         if (trim($student_login_id) != "" && trim($student_number_login2) == "")
  266.         {
  267.             $result = $GLOBALS['dbh']->Execute("
  268.                 SELECT student_number
  269.                 FROM student
  270.                 WHERE login_id = '" . $student_login_id . "'
  271.                 AND department_id IN ('" . implode("', '", $departments_in_group) . "')");
  272.         }
  273.         else
  274.         {
  275.             if(trim($student_number_login) == "") 
  276.             {
  277.                 $student_number_login = $student_number_login2;
  278.             }
  279.             $result = $GLOBALS['dbh']->Execute("
  280.                 SELECT s.student_number 
  281.                 FROM student as s ,student_department as sd 
  282.                 WHERE s.student_number = '" . $student_number_login . "' 
  283.                 AND sd.student_number=s.student_number 
  284.                 AND sd.department_id IN ('" . implode("', '", $departments_in_group) . "')
  285.                 ");
  286.         }
  287.  
  288.         if ($result->RecordCount() >= 1)
  289.         {
  290.             $row = $result->FetchRow();
  291.             $student_number = $row["student_number"];
  292.             $GLOBALS['student_number'] = $row['student_number'];
  293.             $PHP_SELF .= "&amp;admin_student_login=yes&amp;student_number_login=$student_number";
  294.         }
  295.         else
  296.         {
  297.             $userlevel=$auth->userlevel=OFFICE;
  298.             if ($student_login_id != "")
  299.             {
  300.                 $error = "Invalid userID";
  301.             }
  302.             else
  303.             {
  304.                 $error = "Invalid Student Number";
  305.             }
  306.         }
  307.  
  308.         if (!$select || ($select=="student_login" && $error=="") )
  309.         {
  310.             $select="welcome";
  311.         }
  312.         break;
  313.     case STUDENT:
  314.         if ($_SESSION['SESSION_netlog'] == SCRIPT_LOGIN)
  315.         {
  316.             $result = $GLOBALS['dbh']->Execute("
  317.                 SELECT student_number 
  318.                 FROM student 
  319.                 WHERE netlink_id='" . addslashes($login_id) . "'");
  320.         } 
  321.         else 
  322.         {
  323.             $result = $GLOBALS['dbh']->Execute("
  324.                 SELECT student_number 
  325.                 FROM student 
  326.                 WHERE login_id='" . addslashes($login_id) . "'");
  327.         }
  328.  
  329.         if ($result->RecordCount() == 1)
  330.         {
  331.             $row = $result->FetchRow();
  332.             $student_number = $row["student_number"];
  333.         }
  334.         else
  335.         {
  336.             // ***********
  337.             // ** Note: Might want to add some handling here because if we haven't
  338.             // **       matched a student number, then the student is not in the
  339.             // **       DB (or something worse)
  340.             // **       Alas, this will be caught later on, but it's appropriate
  341.             // **       to stop it here.
  342.             // ***********
  343.         }
  344.  
  345.         if (!$select)
  346.         {
  347.             // if user hasn't selected from the menu bar, show welcome screen
  348.             $select = "welcome";
  349.         }
  350.         break;
  351.  
  352.     case FACULTY:
  353.         if (!$select)
  354.         {
  355.             // if user hasn't selected from the menu bar, show welcome screen
  356.             $select = "welcome";
  357.         }
  358.         break;
  359.  
  360.     case NEW_EMPLOYER:
  361.         // This is a first time employer
  362.         if (!$select)
  363.         {
  364.             $select = "new_employer";
  365.         }
  366.         break;
  367.  
  368.     case FORGOTTEN_PASSWORD:
  369.         // This is an employer who has forgotten her password
  370.         if (!$select)
  371.         {
  372.             $select = "forgotten_password";
  373.         }
  374.         break;
  375.     case LIMBO:
  376.         // password validated, but not belonging to a group with any access
  377.         $menu_bar = $levels[LIMBO];
  378.         $select = "not_in_group";
  379.         break;
  380.  
  381.     case MULTIPLE:
  382.         // Password validated, but the user belongs to multiple departments.  Let them choose their department.
  383.         $menu_bar = $levels[LIMBO];
  384.         $select = "department_choices";
  385.         break;
  386.  
  387.     case USERLEVEL_PUBLIC:
  388.         // no password was entered
  389.         if ($authcheck)
  390.         {
  391.             // if user tried to enter system without a password, indicate that the login was invalid, display login sceeen
  392.             $bad_login = "wrong_pass";
  393.             $auth->logout();
  394.             $_SESSION['SESSION_colorscheme'] = DEFAULT_COLORSCHEME;
  395.  
  396.         } // fall through
  397.  
  398.     default:
  399.         $menu_bar = $levels[USERLEVEL_PUBLIC];
  400.         //This is to make SURE a public user cant go anywhere        
  401.         include('header.inc');
  402.         include('login.inc');
  403.         include('footer.inc');
  404.         ob_end_flush();
  405.         die; // processing ends here.
  406.  
  407. }
  408. assert_options(ASSERT_ACTIVE, TRUE);
  409. assert_options(ASSERT_QUIET_EVAL, TRUE);
  410. /*
  411.  If we are exporting to a file for the user to download.
  412.  The button to export has to have the name "export" (or case there of), which is how it catches
  413. */
  414. if ($export) 
  415.     include ('export_file/Export_File.class');
  416.     $file = new ExportTabFile ();
  417.  
  418.     switch ($export) 
  419.     {
  420.         case 'Export Mail Labels':
  421.             $file->EmployerMailLabels ($contact_id_string);
  422.             break;
  423.  
  424.         default:
  425.             $file->CreateTabFileString(unpackObject($export_string));
  426.             break;
  427.     }
  428.  
  429.     // this is set so we don't fall through way below (where everything is found
  430.     // this means you shouldn't change the "elseif ($PDF)" to just an if, cause it'll screw up
  431.     $PDF = 1;
  432.     // just in case, just to see
  433.     $exported = true;
  434. }
  435. elseif($PDF && !$exported)
  436.     // If we are displaying something in PDF, then do this now before processing anything else.
  437.     // This switch statement also deals with all quickmenu calls. 
  438.     switch ($select)
  439.     {
  440.                  case "url_bouncer":
  441.             // Stupid hack that bounces to URLs... makes forms that take people to a predefined place much easier.
  442.             header ("Location: $bounce");
  443.             break;
  444.  
  445.          case "applications":
  446.             include("applications/apply.inc");
  447.             break;
  448.  
  449.          case "coverletter":
  450.             include ("coverletters/coverletter.inc");
  451.             break;
  452.  
  453.          case "resume": 
  454.             include ("resume/resume.inc"); 
  455.               break;
  456.  
  457.          case "transcript":
  458.             include("transcript/transcript.inc");
  459.             break;
  460.  
  461.          case "jobOutput":
  462.          case "edit_job":
  463.             if($show_quick)
  464.             {
  465.                 unset($PDF);
  466.             }
  467.             else
  468.             {
  469.                 include("PDF/PDFconversion/ConvertToPDF.class");
  470.                 $convert = new ConvertToPDF();
  471.                 $convert->convert_job(urldecode($HTMLjob));
  472.             }
  473.             break;
  474.  
  475.          case "companyOutput":
  476.             include("PDF/PDFconversion/ConvertToPDF.class");
  477.             $convert = new ConvertToPDF();
  478.             $convert->convert_contactinfo(urldecode($HTMLCompany));
  479.             break;
  480.  
  481.         case "resume_transcript_output":
  482.             include("PDF/PDFconversion/ConvertToPDF.class");
  483.             if ($userlevel == OFFICE || $userlevel == FACULTY || $userlevel == TRAFFICDIRECTOR) {
  484.                 $convert = new ConvertToPDF();
  485.                 $resume_sql = ("
  486.                         SELECT resume
  487.                         FROM resume
  488.                         WHERE resume_id='".$resume_id."'
  489.                         ");
  490.  
  491.                 $resume_results = $GLOBALS['dbh']->Execute($resume_sql);
  492.                 $resume_row = $resume_results->FetchRow();
  493.                 $transcript_sql = ("
  494.                         SELECT transcript
  495.                         FROM transcript
  496.                         WHERE student_number='".$student_num."'
  497.                         ");
  498.                 $transcript_results = $GLOBALS['dbh']->Execute($transcript_sql);
  499.  
  500.                 $transcript_row=$transcript_results->FetchRow();
  501.  
  502.                 $HTMLresume_transcript=$resume_row['resume']."<!-- PAGE BREAK -->".$transcript_row['transcript'];
  503.  
  504.                 $convert->convert_contactinfo($HTMLresume_transcript);
  505.             } else {
  506.                 include ('misc/loguser.inc');
  507.             }
  508.             break;
  509.  
  510.         case "studentOutput":
  511.             include("PDF/PDFconversion/ConvertToPDF.class");
  512.             $convert = new ConvertToPDF();
  513.             $convert->convert_contactinfo(urldecode($HTMLStudent));
  514.             break;
  515.  
  516.         case "studentApplication":
  517.             include ( "PDF/PDFconversion/ConvertToPDF.class" );
  518.             $covert_class = new ConvertToPDF();
  519.             $covert_class->convert_single_application ($application_id); // :BUG:
  520.             break;
  521.  
  522.         case "historyOutput":
  523.             include("PDF/PDFconversion/ConvertToPDF.class");
  524.             $convert = new ConvertToPDF();
  525.             $convert->convert_contactinfo(urldecode($HTMLhistory));
  526.             break;
  527.  
  528.         case "reportOutput":
  529.             include("PDF/PDFconversion/ConvertToPDF.class");
  530.             $convert = unpackObject(($convertObject));
  531.             $convert->convert_HTMLcontactinfo();
  532.             $convert->send_output();
  533.             break;
  534.  
  535.         case "set_flags":
  536.             unset($PDF);
  537.             $select = 'set_contact_flag';
  538.             $level1 = 'flags';
  539.             $continue = 'show_specific';
  540.             break;
  541.  
  542.         case "set_actions":
  543.             unset($PDF);
  544.             $select = 'set_contact_flag';
  545.             $level1 = 'actions';
  546.             $continue = 'show_specific';
  547.             break;
  548.  
  549.         case "Set Flags for Matched Contacts":
  550.             unset($PDF);
  551.             $select = 'set_contact_flag';
  552.             $level1 = 'flags';
  553.             $contact_id_list_supplied = true;
  554.             $form_submitted = true;
  555.             break;
  556.  
  557.         case "Set Actions for Matched Contacts":
  558.             unset($PDF);
  559.             $select = 'set_contact_flag';
  560.             $level1 = 'actions';
  561.             $form_submitted = true;
  562.             break;
  563.  
  564.         case "history":
  565.             unset($PDF);
  566.             $continue = "View History";
  567.         break;
  568.  
  569.         case "edithistory":
  570.             unset($PDF);
  571.             $continue = "Edit History";
  572.         break;
  573.  
  574.         case "view_job":
  575.             unset($PDF);
  576.         break;
  577.  
  578.         case "view_company_divisions":
  579.             unset($PDF);
  580.             $select = 'view_contact';
  581.             $level1 = 'company';
  582.             $continue = 'company_quickview';
  583.             break;
  584.  
  585.        case "view_company_contacts":
  586.             unset($PDF);
  587.             $select = 'view_contact';
  588.             $level1 = 'contact';
  589.             $continue = 'company_quickview';
  590.             break;
  591.  
  592.         case "view_department_contacts":
  593.             unset($PDF);
  594.             $select = 'view_contact';
  595.             $level1 = 'contact';
  596.             $continue = 'department_quickview';
  597.             break;
  598.  
  599.         case "view_this_contact":
  600.             unset($PDF);
  601.             $select = 'view_contact';
  602.             $level1 = 'contact';
  603.             $continue = 'view_specific_contact';
  604.             $no_buttons = true;
  605.             $show_quick = true;
  606.             break;
  607.  
  608.         case "view_this_company":
  609.         case "view_this_division":
  610.             if($select == "view_this_company")
  611.             {
  612.                 unset($department_id);
  613.             }
  614.             unset($PDF);
  615.             $select = 'view_contact';
  616.             $level1 = 'company';
  617.             $continue = 'view_specific_details';
  618.             $no_buttons = true;
  619.             $show_quick = true;
  620.             break;
  621.  
  622.         case "view_this_interview":
  623.             unset($PDF);
  624.             $select = 'view';
  625.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  626.             {                
  627.                 $level1 = 'job_code';
  628.                 /* Commented out: Jon
  629.                    level2 and submit lead to the same place but submit
  630.                    seems safer. Replace if submit doesn't end up working
  631.  
  632.                    $level2 = 'job_id_or_job_code';
  633.                  */
  634.                 $submit = 'View Interview';
  635.                 unset($department_id);
  636.             }
  637.             break;
  638.  
  639.         case "add_job_under_company":
  640.         case "add_job_under_division":
  641.             unset($PDF);
  642.             $select = 'add_job';
  643.             break;
  644.  
  645.         case "add_job_under_contact":
  646.             unset($PDF);
  647.             $select = 'add_job';
  648.            $continue = 'level1';
  649.             if (!$department_id)
  650.             {
  651.                 $department_id = 'none';
  652.             }
  653.             break;
  654.  
  655.         case "edit_contact":
  656.             unset($PDF);
  657.             $select = 'edit_contact';
  658.             $level1 = 'contact';
  659.             break;
  660.  
  661.         case "edit_company":
  662.             unset($PDF);
  663.             $select = 'edit_contact';
  664.             $level1 = 'company';
  665.             break;
  666.  
  667.         case "edit_department":
  668.             unset($PDF);
  669.             $select = 'edit_contact';
  670.             $level1 = 'department';
  671.             break;
  672.  
  673.         case "create_lp":
  674.             unset($PDF);
  675.             $select = 'make_login_info';
  676.             $continue = 'contact_chosen';
  677.             break;
  678.  
  679.         case "add_division_to_company":
  680.             unset($PDF);
  681.             $select = 'add_contact';
  682.             $level1 = 'department';
  683.             break;
  684.  
  685.         case "add_contact_to_company":
  686.             $department_id = 'none';
  687.             // Drop through to next case statement.
  688.  
  689.         case "add_contact_to_division":
  690.             unset($PDF);
  691.             $select = 'add_contact';
  692.             $level1 = 'contact';
  693.             break;
  694.  
  695.         case "view_company_history":
  696.             unset($PDF);
  697.             $select = 'employer_history';
  698.             // Get rid of this variable, which may have been set from a quickmenu.  We don't want it set.
  699.             unset($department_id);
  700.             $employer_list = ("('" . $employer_id . "')");
  701.             $Submit = 'View';
  702.             break;
  703.  
  704.         case "view_division_history":
  705.             unset($PDF);
  706.             $select = 'employer_history';
  707.             $employer_list = ("('" . $employer_id . "')");
  708.             $department_list = $department_id;
  709.             $Submit = 'View';
  710.             break;
  711.  
  712.         // Student quickmenu calls
  713.         case "edit_student":
  714.             unset($PDF);
  715.             $select = 'edit_student'; // Just to be safe
  716.             $continue = 'chosen_student';
  717.             break;
  718.  
  719.         case "view_student":
  720.             unset($PDF);
  721.             $select = 'view_student'; // Just to be safe
  722.             $continue = 'Chosen Student';
  723.             break;
  724.  
  725.          case "student_coverletters":
  726.             unset($PDF);
  727.             if (isset($student_department)) {
  728.                 // We're coming from a history quickmenu
  729.                 $department_id = $student_department;
  730.             }
  731.  
  732.             $select = 'coverletter';
  733.             $page = 'View Cover Letters';
  734.  
  735.             if ($userlevel == STUDENT){
  736.                 $student_num = $auth->student_number;
  737.             } else {
  738.                 $sql = ("
  739.                     SELECT student_number
  740.                     FROM student_department
  741.                     WHERE record_id='" . $record_id . "'
  742.                     ");
  743.                 $result = $GLOBALS['dbh']->Execute($sql);
  744.                 $row = $result->FetchRow();
  745.                 $student_num = $row["student_number"];
  746.             }
  747.             break;
  748.  
  749.         case "student_resumes":
  750.             unset($PDF);
  751.             if (isset($student_department)) {
  752.                 // We're coming from a history quickmenu
  753.                 $department_id = $student_department;
  754.             }
  755.  
  756.             if ($userlevel == STUDENT){
  757.                 $student_num = $auth->student_number;
  758.             } else {
  759.                 $select = 'resume';
  760.                 $page = 'View Resumes';
  761.                 $sql = ("
  762.                     SELECT student_number
  763.                     FROM student_department
  764.                     WHERE record_id='" . $record_id . "'
  765.                     ");
  766.                 $result = $GLOBALS['dbh']->Execute($sql);
  767.                 $row = $result->FetchRow();
  768.                 $student_num = $row["student_number"];
  769.             }
  770.             break;
  771.  
  772.         case "student_history":
  773.             unset($PDF);            
  774.             $searchmode = 'simple';
  775.             $search_by_student = 'true';
  776.             $sql = ("
  777.                 SELECT student_number
  778.                 FROM student_department
  779.                 WHERE record_id='" . $record_id . "'
  780.                 ");
  781.             $result = $GLOBALS['dbh']->Execute($sql);
  782.             $row = $result->FetchRow();
  783.             $student_number_select = $row["student_number"];
  784.             $btnSubmit = 'View Placements';
  785.             break;
  786.  
  787.         case "student_transcripts":
  788.             if (isset($student_department)) {
  789.                 // We're coming from a history quickmenu
  790.                 $department_id = $student_department;
  791.             }
  792.             if ($userlevel == STUDENT){
  793.                 $student_num = $auth->student_number;
  794.             } else {
  795.                 $select = 'transcript';
  796.                 $PDF=1;
  797.                 $page = 'View HTML';
  798.                 $sql = ("
  799.                     SELECT student_number
  800.                     FROM student_department
  801.                     WHERE record_id='" . $record_id . "'
  802.                     ");
  803.                 $result = $GLOBALS['dbh']->Execute($sql);
  804.                 $row = $result->FetchRow();
  805.                 $student_num = $row["student_number"];
  806.             }
  807.             include ("transcript/transcript.inc" );
  808.             break;
  809.  
  810.         case "student_interviews": 
  811.             unset($PDF);
  812.             $select = 'view';
  813.             $level1 = 'student';
  814.             $leve2 = 'student_num_or_student_name';
  815.             $department_id='0';
  816.             $submit = 'View Interviews';
  817.             $sql = ("
  818.                 SELECT student_number
  819.                 FROM student_department
  820.                 WHERE record_id='" . $record_id . "'
  821.                 ");
  822.             $result = $GLOBALS['dbh']->Execute($sql);
  823.             $row = $result->FetchRow();
  824.             $student_num = $row["student_number"];
  825.             break;
  826.  
  827.         case "place_student_posted_job": 
  828.             unset($PDF);
  829.             $select = 'placement_by_student';
  830.             $sql = ("
  831.                 SELECT student_number
  832.                 FROM student_department
  833.                 WHERE record_id='" . $record_id . "'
  834.                 ");
  835.             $result = $GLOBALS['dbh']->Execute($sql);
  836.             $row = $result->FetchRow();
  837.             $student_num = $row["student_number"];
  838.             $btnSubmit = 'Submit';
  839.             break;
  840.  
  841.         case "place_student_own_job":
  842.             unset($PDF);
  843.             $select = 'add_history';
  844.             if(!$student_number)
  845.             {
  846.                 $sql = ("
  847.                     SELECT student_number
  848.                     FROM student_department
  849.                     WHERE record_id='" . $record_id . "'
  850.                     ");
  851.                 $result = $GLOBALS['dbh']->Execute($sql);
  852.                 $row = $result->FetchRow();
  853.                 $student_num = $row["student_number"];
  854.             }
  855.             break;
  856.  
  857.         case "place_student_returning_job":
  858.             unset($PDF);
  859.             $select = 'returning_placement';
  860.             if(!$student_number)
  861.             {
  862.                 $sql = ("
  863.                     SELECT student_number
  864.                     FROM student_department
  865.                     WHERE record_id='" . $record_id . "'
  866.                     ");
  867.                 $result = $GLOBALS['dbh']->Execute($sql);
  868.                 $row = $result->FetchRow();
  869.                 $student_num = $row["student_number"];
  870.             }
  871.             break;
  872.  
  873.         case "login_as_student":
  874.             break;
  875.  
  876.         case "log_me_out":
  877.             //They just need to be logged out, then taken to the forgotten password screen.
  878.             unset($PDF);
  879.             $auth->logout();
  880.             $select = 'forgotten_password';
  881.             break;
  882.  
  883.         case "view_company_job":
  884.         case "view_division_job":
  885.         case "view_contact_job":
  886.             unset($PDF);
  887.             break; 
  888.  
  889.         default:
  890.             if (!$job_id)
  891.             {
  892.                 include('misc/log_form_variables.inc');
  893.             }
  894.             assert ( $job_id );
  895.  
  896.             if( $selection == 'single' )
  897.             {
  898.                 include('interview/edit/EditInterview.class');
  899.                 include('PDF/PDFReport/SingleJobReport.class');    
  900.                 new SingleJobReport($job_id, $auth->department);
  901.             }
  902.             elseif( $selection == 'final' || $selection == "final_student")
  903.             {
  904.                 include('interview/edit/EditInterview.class');
  905.                 include('PDF/PDFReport/FinalScheduleReport.class');    
  906.  
  907.                 new FinalScheduleReport($job_id, $auth->department);
  908.             }
  909.             elseif( $selection == 'email_schedule' )
  910.             {
  911.                 unset( $PDF );
  912.                 $select = 'sign_up';
  913.                 $department_id = $auth->department;
  914.                 $email_employer = 'create';
  915.             }
  916.             elseif( $selection == 'email_students' )
  917.             {
  918.                 unset( $PDF );
  919.                 $select = 'view';
  920.                 $department_id = $auth->department;
  921.                 $email_employer = 'create';
  922.                 $level1 = 'email_students';
  923.             }
  924.             elseif( $selection == 'email_students' )
  925.             {
  926.                 unset( $PDF );
  927.                 $select = 'view';
  928.                 $department_id = $auth->department;
  929.                 $email_employer = 'create';
  930.                 $level1 = 'email_students';
  931.             }
  932.             elseif( $selection == 'view_company' )
  933.             {
  934.                 unset($department_id);
  935.                 unset($PDF);
  936.                 $select = 'view_contact';
  937.                 $level1 = 'company';
  938.                 $continue = 'view_specific_details';
  939.                 $no_buttons = true;
  940.                 $show_quick = true;
  941.             }
  942.             elseif( $selection == 'view_applications' )
  943.             {
  944.                 unset($PDF);
  945.                 $select = 'applications';
  946.                 $continue = 'jump_to_view';
  947.             }
  948.             elseif( $selection == 'view_contact' )
  949.             {
  950.                 unset($PDF);
  951.                 $select = 'view_contact';
  952.                 $level1 = 'contact';
  953.                 $continue = 'view_specific_contact';
  954.                 $no_buttons = true;                             
  955.                 $show_quick = true;     
  956.             }
  957.             elseif( $selection == 'view_department' )
  958.             {                               
  959.                 unset($PDF);                                
  960.                 $select = 'view_contact';
  961.                 $level1 = 'department';
  962.                 $continue = 'view_specific_details';
  963.                 $no_buttons = true;
  964.                 $show_quick = true;
  965.             }
  966.             elseif( $selection == 'edit' )
  967.             {
  968.                 unset($PDF);
  969.                 $department_id = $auth->department;
  970.                 $select = 'edit';
  971.             }
  972.             else
  973.             {
  974.                 unset( $PDF );
  975.                 $select = $selection;
  976.             }
  977.             break;
  978.     } // Switch
  979. } //elseif( $PDF && !$exported)
  980. if($password_changed && !$exported)
  981. {
  982.     /*
  983.      This happenes when the employer has changed their password.  We need to set the password to
  984.      equal the new password, and this must be done before we send the header.
  985.  
  986.      Check and make sure the password is valid.  If it is, save it in the database, and then change
  987.      the cookie.  If the password is invalid, unset $password_changed and change_login_info.inc
  988.      will let the user know their password was invalid.
  989.     */
  990.  
  991.     // We've been given a new password.  Validate it (it must be four characters or more) and save it.
  992.  
  993.     $password1 = removeSlashes($password1);
  994.     $password2 = removeSlashes($password2);
  995.  
  996.     if (trim($password1) != trim($password2))
  997.     {
  998.         $error = 1;
  999.         $error_msg = ("The two passwords you have entered do not match.  You must enter the same password in both text boxes.");
  1000.     }
  1001.     elseif (strlen($password1) < 4)
  1002.     {
  1003.         $error = 1;
  1004.         $error_msg = ("The password you have specified is less than 4 characters.  Passwords must be at least 4 characters long.");
  1005.     }
  1006.     elseif (strlen($password1) > 10)
  1007.     {
  1008.         // This shouldn't be possible, but just in case.
  1009.         $error = 1;
  1010.         $error_msg = ("The password you have specified is more than 10 characters.  Passwords must be 10 characters or less.");
  1011.     }
  1012.     elseif (!preg_match("/^[a-zA-Z0-9!@#$%^&*()]+$/", $password1))
  1013.     {
  1014.         $error = 1;
  1015.         $error_msg = ("The password you have provided contains illegal characters.  Passwords may only consist of alphanumeric 
  1016.                 characters, and any of the following special characters: !@#$%^&*()");
  1017.     }
  1018.  
  1019.     if ($error == 0)
  1020.     {
  1021.         // Save the password in the database, update the cookie, and change_login_info.inc will do the rest.
  1022.         if ($auth->contact_id) {
  1023.             $sql = ("
  1024.                     UPDATE employer_login
  1025.                     SET password='" . addslashes(crypt($password1, "EM")) . "'
  1026.                     WHERE contact_id='" . $auth->contact_id. "'
  1027.                     ");
  1028.             $result = $GLOBALS['dbh']->Execute($sql);
  1029.  
  1030.             if (!$GLOBALS['dbh']->Affected_Rows()) {
  1031.                 $error = 1;
  1032.                 if (crypt($password1, "EM") == $_SESSION['SESSION_passwd']) {
  1033.                     $error_msg = ("The password you entered was the same as your old one, so no changes have been saved.");
  1034.                 } else {
  1035.                     $error_msg = ("An error occured while trying to save your password to the database.  Please try again.");
  1036.                 }
  1037.             }
  1038.             else
  1039.             {
  1040.                 // Set the cookie password to the new password so they aren't logged out.
  1041.                 $crypt_pass = crypt($password1, "EM");
  1042.                 //setcookie("COOKIE_passwd", $_SESSION['SESSION_passwd'] = $crypt_pass, 0, "/", $auth->domain_for_cookie);
  1043.                 $_SESSION['SESSION_passwd'] = $crypt_pass;
  1044.             }
  1045.         }
  1046.     }
  1047. } // if($password_changed && !$exported)
  1048. if(!$PDF && !$exported)
  1049. {
  1050.     // show Mamook logo and menu bar
  1051.     include('header.inc');
  1052.     switch($select)
  1053.     {
  1054.         //Popup replacement stuff
  1055.         case "student_chooser":
  1056.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR){
  1057.                 include("misc/student_chooser.inc");
  1058.             }
  1059.             else {
  1060.                 include ('misc/loguser.inc');
  1061.             }
  1062.             break;
  1063.         case "student_chooser2":
  1064.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR){
  1065.                 include("misc/student_chooser2.inc");
  1066.             }
  1067.             else {
  1068.                 include ('misc/loguser.inc');
  1069.             }
  1070.             break;
  1071.         case "contact_choose":
  1072.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR){
  1073.                 include("misc/contact_choose.inc");
  1074.             }
  1075.             else {
  1076.                 include ('misc/loguser.inc');
  1077.             }
  1078.             break;
  1079.         case "company_choose":
  1080.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR){
  1081.                 include("misc/company_choose.inc");
  1082.             }
  1083.             else {
  1084.                 include ('misc/loguser.inc');
  1085.             }
  1086.             break;
  1087.         case "company_department_choose":
  1088.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR){
  1089.                 include("misc/company_department_choose.inc");
  1090.             }
  1091.             else {
  1092.                 include ('misc/loguser.inc');
  1093.             }
  1094.             break;
  1095.         case "company_department_choose_2":
  1096.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR){
  1097.                 include("misc/company_department_choose_2.inc");
  1098.             }
  1099.             else {
  1100.                 include ('misc/loguser.inc');
  1101.             }
  1102.             break;
  1103.         case "company_department_choose_3":
  1104.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR){
  1105.                 include("misc/company_department_choose_3.inc");
  1106.             }
  1107.             break;
  1108.         case "company_department_choose_4":
  1109.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR){
  1110.                 include ("misc/company_department_choose_4.inc");
  1111.             }
  1112.             break;
  1113.         case "popupChooser":
  1114.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR){
  1115.                 include ("misc/popupChooser.inc");
  1116.             }
  1117.             else {
  1118.                 include ('misc/loguser.inc');
  1119.             }
  1120.             break;
  1121.         case "student_photo_viewer":
  1122.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR){
  1123.                 include ("student_info/student_photo_viewer.inc");
  1124.             }
  1125.             else {
  1126.                 include ('misc/loguser.inc');
  1127.             }
  1128.             break;
  1129.         case "popupcalendar":
  1130.             include ("popupcalendar/calendar.inc");
  1131.             break;
  1132.         case "selectbox":
  1133.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR){
  1134.                 include ("misc/selectbox.inc");
  1135.             }
  1136.             break;
  1137.         case "redirect":
  1138.             $location="mamook.php?menu_select=1&select=lunch_send_email&cid=".$cid."&time_id=".$time_id;
  1139.             header("Location: $location");
  1140.             break;
  1141.         //End popup replacement code
  1142.  
  1143.         //TODO: This is the link to the new traffic director flag editor    
  1144.         case "flag_editor":
  1145.             if ($userlevel == TRAFFICDIRECTOR) {
  1146.                 include ("misc/flag_management/traffic_flag_editor.inc");
  1147.             }
  1148.             else {
  1149.                 include ('misc/loguser.inc');
  1150.             }
  1151.             break;
  1152.  
  1153.         case "flag_add":
  1154.             if ($userlevel == TRAFFICDIRECTOR) {
  1155.                 include ("misc/flag_management/traffic_flag_add.inc");
  1156.             }
  1157.             else {
  1158.                 include ('misc/loguser.inc');
  1159.             }
  1160.             break;
  1161.  
  1162.         // was applications/view/student/applications.inc changed though
  1163.         case "applications":
  1164.             include ("applications/apply.inc");
  1165.             break;
  1166.  
  1167.         case "save_search":
  1168.             include ("search/save_search.inc");
  1169.             break;    
  1170.  
  1171.         case "manage_searches":
  1172.             include ("search/manage_searches.inc");
  1173.             break;
  1174.         case "make_login_info":
  1175.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR) 
  1176.             {
  1177.                 include('contact/login_info/admin/login_info_header.inc');
  1178.             }
  1179.             else
  1180.             {
  1181.                 include ('misc/loguser.inc');
  1182.             }
  1183.             break;
  1184.  
  1185.         case "change_login_password":
  1186.             include('contact/login_info/employer/login_info_header.inc');
  1187.             break;
  1188.  
  1189.         case "apply_job":
  1190.             // Load up the applications scripts.
  1191.             include('applications/apply.inc');
  1192.             break;
  1193.  
  1194.         case "forgotten_password":
  1195.             /* 
  1196.              This is an employer that has forgotten their password
  1197.              Check and make sure that they haven't been blacklisted.
  1198.             */
  1199.  
  1200.             $sql = ("
  1201.                 SELECT DISTINCT blacklisted_IP
  1202.                 FROM forgot_password_blacklist
  1203.                 WHERE blacklisted_IP='" . $REMOTE_ADDR . "'
  1204.                 ");
  1205.             $result = $GLOBALS['dbh']->Execute($sql);
  1206.             if ($result->RecordCount())
  1207.             {
  1208.                 $error_msg = ("For security reasons, you will now need to contact a ".BRAND_NAME." administrator to retrieve your password.");
  1209.                 include('login.inc');
  1210.             }
  1211.             else
  1212.             {
  1213.                 include('contact/login_info/employer/forgotten_password_header.inc');
  1214.             }
  1215.             break;
  1216.  
  1217.         case "new_employer":
  1218.             // This is an employers first time logging in.
  1219.             include('new_employer/new_employer_header.inc');
  1220.             break;
  1221.  
  1222.         case "department_choices":
  1223.             // Give the user the choice of which department to login under.
  1224.             include('misc/department_choices.inc');
  1225.             break;
  1226.  
  1227.         case "welcome":
  1228.             // show welcome screen
  1229.                 $sqldept = ("SELECT DISTINCT department_id FROM department
  1230.                         WHERE using_full_system AND department_id = '". $auth->department."'");
  1231.                 $resultdept = $GLOBALS['dbh']->Execute($sqldept);
  1232.                 $rowdept=$resultdept->FetchRow();
  1233.  
  1234.                 if ($userlevel == STUDENT && ($auth->department == $rowdept['department_id']))
  1235.                 {
  1236.                     include("welcome_applicant.inc");
  1237.                 }
  1238.                 elseif ($userlevel == EMPLOYER)
  1239.                 {
  1240.                     include("welcome_employer.inc");
  1241.                 }
  1242.                 elseif ($userlevel == ADMINEMPLOYER)
  1243.                 {
  1244.                     include("welcome_employer.inc");
  1245.                 }
  1246.                 elseif ($userlevel == ADMINSTUDENT && ($auth->department == $rowdept['department_id'])) 
  1247.                 {
  1248.                     include("welcome_applicant.inc");
  1249.                 }
  1250.                 else
  1251.                 {
  1252.                     include("welcome.inc");
  1253.                 }
  1254.             break;
  1255.  
  1256.         case "logout":
  1257.             $logout = 1;
  1258.             $select = "";
  1259.             break;
  1260.  
  1261.         case "add":
  1262.             // go to add interview screens
  1263.             if ($userlevel == OFFICE) 
  1264.             { 
  1265.                 include("interview/add/add.inc"); 
  1266.             } 
  1267.             else 
  1268.             { 
  1269.                 include("misc/loguser.inc"); 
  1270.             }
  1271.             break;
  1272.  
  1273.         case "edit":
  1274.             // go to edit interview screens
  1275.             if ($userlevel == OFFICE) 
  1276.             { 
  1277.                 include("interview/edit/edit.inc"); 
  1278.             } 
  1279.             else 
  1280.             { 
  1281.                 include("misc/loguser.inc"); 
  1282.             }
  1283.             break;
  1284.  
  1285.         case "room_booking":
  1286.             // go to room booking screens
  1287.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR) 
  1288.             { 
  1289.                 include("misc/room/room.inc"); 
  1290.             } 
  1291.             else 
  1292.             { 
  1293.                 include("misc/loguser.inc"); 
  1294.             }
  1295.             break;
  1296.  
  1297.         case "sign_up":
  1298.             // go to the sign up (admin) screens
  1299.             if ($userlevel == OFFICE) 
  1300.             { 
  1301.                 include("interview/sign_up/admin/sign_up.inc"); 
  1302.             } 
  1303.             else 
  1304.             { 
  1305.                 include("misc/loguser.inc"); 
  1306.             }
  1307.             break;
  1308.  
  1309.         case "view":
  1310.             // new view.
  1311.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR) 
  1312.             {
  1313.                 include("interview/view/view.inc");
  1314.             }
  1315.             elseif(($userlevel == EMPLOYER) || ($userlevel == ADMINEMPLOYER))
  1316.             {
  1317.                 include("interview/view/employer/view.inc");
  1318.             }
  1319.             else 
  1320.             { 
  1321.                 include("misc/loguser.inc"); 
  1322.             }
  1323.             break;
  1324.  
  1325.         case "lunch_send_email":
  1326.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR) 
  1327.             {
  1328.                 include("interview/lunch/email/send_lunch_email.inc");
  1329.             }
  1330.             else
  1331.             {
  1332.                 include ("misc/loguser.inc");
  1333.             }
  1334.             break;
  1335.  
  1336.         case "lunchsome":
  1337.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1338.             {
  1339.                 include ("interview/lunch/some.inc");
  1340.             }
  1341.             else
  1342.             {
  1343.                 include("misc/loguser.inc");
  1344.             }
  1345.             break;
  1346.  
  1347.         case "lunchall":
  1348.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1349.             {
  1350.                 include ("interview/lunch/all.inc");    
  1351.             }
  1352.             else
  1353.             {
  1354.                 include("misc/loguser.inc");
  1355.             }
  1356.             break;
  1357.  
  1358.         case "add_student":
  1359.             // if a student doesn't have a login ID, add it to the database;
  1360.             if ($userlevel == OFFICE) 
  1361.             { 
  1362.                 include("student_info/add/add_student.inc"); 
  1363.             } 
  1364.             else 
  1365.             { 
  1366.                 include("misc/loguser.inc"); 
  1367.             }
  1368.             break;
  1369.  
  1370.         case "modify_contact":
  1371.             // if a student doesn't have a login ID, add it to the database;
  1372.             if ($userlevel == OFFICE) 
  1373.             { 
  1374.                 include("contact/modify_contact.inc"); 
  1375.             } 
  1376.             else 
  1377.             { 
  1378.                 include("misc/loguser.inc"); 
  1379.             }
  1380.             break;
  1381.  
  1382.         case "add_contact":
  1383.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1384.             {
  1385.                 include("contact/add/add.inc");
  1386.             }
  1387.             else
  1388.             {
  1389.                 include("misc/loguser.inc");
  1390.             }
  1391.             break;
  1392.  
  1393.         case "edit_contact":
  1394.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1395.             {
  1396.                 include("contact/edit/edit.inc");
  1397.             }
  1398.             else
  1399.             {
  1400.                 include("misc/loguser.inc");
  1401.             }
  1402.             break;
  1403.  
  1404.         case "view_contact":
  1405.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1406.             {
  1407.                 include("contact/view/view.inc");
  1408.             }
  1409.             else
  1410.             {
  1411.                 include("misc/loguser.inc");
  1412.             }
  1413.         break;
  1414.  
  1415.         case "verify_delete_contact":
  1416.             if ($userlevel == TRAFFICDIRECTOR)
  1417.             {
  1418.                 include("contact/delete/contact/verify_delete_contact.inc");
  1419.             }
  1420.             else
  1421.             {
  1422.                 include("misc/loguser.inc");
  1423.             }
  1424.         break;
  1425.  
  1426.         case "delete_contact":
  1427.             if ($userlevel == TRAFFICDIRECTOR)
  1428.             {
  1429.                 include("contact/delete/contact/delete_contact.inc");
  1430.             }
  1431.             else
  1432.             {
  1433.                 include("misc/loguser.inc");
  1434.             }
  1435.         break;
  1436.  
  1437.         // :TODO the following mail case statements are violating the way traffic is directed throughout the system. The
  1438.         // mail statements bypasses the tree hierarchy established.
  1439.         case "send_contact_mail":
  1440.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1441.             {
  1442.                 $level1 = 'contact';
  1443.                 $continue = 'send_contact_mail';
  1444.                 include("contact/view/view.inc");
  1445.             }
  1446.             else
  1447.             {
  1448.                 include("misc/loguser.inc");
  1449.             }
  1450.         break;
  1451.  
  1452.         case "set_company_mail":
  1453.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1454.             {
  1455.                 $level1 = 'company';
  1456.                 $continue = 'set_mail';
  1457.                 include("contact/view/view.inc");
  1458.             }
  1459.             else
  1460.             {
  1461.                 include("misc/loguser.inc");
  1462.             }
  1463.         break;
  1464.  
  1465.         case "send_company_mail":
  1466.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1467.             {
  1468.                 $level1 = 'company';
  1469.                 $continue = 'send_mail';
  1470.                 include("contact/view/view.inc");
  1471.             }
  1472.             else
  1473.             {
  1474.                 include("misc/loguser.inc");
  1475.             }
  1476.         break;
  1477.  
  1478.         case "set_department_mail":
  1479.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1480.             {
  1481.                 $level1 = 'company';
  1482.                 $continue = 'set_mail_department';
  1483.                 include("contact/view/view.inc");
  1484.             }
  1485.             else
  1486.             {
  1487.                 include("misc/loguser.inc");
  1488.             }
  1489.         break;
  1490.  
  1491.         case "send_department_mail":
  1492.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1493.             {
  1494.                 $level1 = 'company';
  1495.                 $continue = 'send_mail_department';
  1496.                 include("contact/view/view.inc");
  1497.             }
  1498.             else
  1499.             {
  1500.                 include("misc/loguser.inc");
  1501.             }
  1502.         break;
  1503.  
  1504.         case "set_company_search_results_mail":
  1505.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1506.             {
  1507.                 $level1 = 'company';
  1508.                 $continue = 'set_company_search_results_mail';
  1509.                 include("contact/view/view.inc");
  1510.             }
  1511.             else
  1512.             {
  1513.                 include("misc/loguser.inc");
  1514.             }
  1515.         break;
  1516.  
  1517.         case "send_company_search_results_mail":
  1518.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1519.             {
  1520.                 $level1 = 'company';
  1521.                 $continue = 'send_company_search_results_mail';
  1522.                 include("contact/view/view.inc");
  1523.             }
  1524.             else
  1525.             {
  1526.                 include("misc/loguser.inc");
  1527.             }
  1528.         break;
  1529.  
  1530.         case "set_contact_search_results_mail":
  1531.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1532.             {
  1533.                 $level1 = 'contact';
  1534.                 $continue = 'set_contact_search_results_mail';
  1535.                 include("contact/view/view.inc");
  1536.             }
  1537.             else
  1538.             {
  1539.                 include("misc/loguser.inc");
  1540.             }
  1541.         break;
  1542.  
  1543.  
  1544.         case "send_contact_search_results_mail":
  1545.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1546.             {
  1547.                 $level1 = 'contact';
  1548.                 $continue = 'send_contact_search_results_mail';
  1549.                 include("contact/view/view.inc");
  1550.             }
  1551.             else
  1552.             {
  1553.                 include("misc/loguser.inc");
  1554.             }
  1555.         break;
  1556.  
  1557.         case "send_department_search_results_mail":
  1558.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1559.             {
  1560.                 $level1 = 'company';
  1561.                 $continue = 'send_department_search_results_mail';
  1562.                 include("contact/view/view.inc");
  1563.             }
  1564.             else
  1565.             {
  1566.                 include("misc/loguser.inc");
  1567.             }
  1568.         break;
  1569.  
  1570.  
  1571.         case "search_contact":
  1572.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1573.             {
  1574.                 include("contact/search/search.inc");    
  1575.             }
  1576.             else
  1577.             {
  1578.                 include("misc/loguser.inc");
  1579.             }
  1580.             break;
  1581.  
  1582.         case "set_contact_flag":
  1583.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1584.             {
  1585.                 include("contact/set/set.inc");
  1586.             }
  1587.             else
  1588.             {
  1589.                 include("misc/loguser.inc");
  1590.             }
  1591.             break;
  1592.  
  1593.         case "getting_started":
  1594.             if ($userlevel == EMPLOYER || $userlevel == HREMPLOYER || $userlevel == ADMINEMPLOYER)
  1595.             {
  1596.                 include("help/employer/getting_started.inc");
  1597.             }
  1598.             else
  1599.             {
  1600.                 include("misc/loguser.inc");
  1601.             }
  1602.             break;
  1603.  
  1604.         case "student_sign_up":
  1605.             // go to the student sign up screens
  1606.             include("interview/sign_up/student/sign_up.inc");
  1607.             break;
  1608.  
  1609.         case "not_in_group":
  1610.             // use/password validated, but not in a group with any rights
  1611.             include("misc/not_in_group.inc");
  1612.             break;
  1613.  
  1614.            case "resume":
  1615.             include ("resume/resume.inc");
  1616.             break;
  1617.  
  1618.         case "coverletter":
  1619.              include ("coverletters/coverletter.inc");
  1620.             break;
  1621.  
  1622.         case "transcript":
  1623.             include ("transcript/transcript.inc" );
  1624.             break;
  1625.  
  1626.         case "shortlist":
  1627.             include( "shortlist/shortlist.inc");
  1628.             break;
  1629.  
  1630.         case "add_job":
  1631.             if ($userlevel == OFFICE || $userlevel == EMPLOYER || $userlevel == TRAFFICDIRECTOR)
  1632.             {
  1633.                 include('job_descriptions/add_job/add.inc');
  1634.             }
  1635.             else
  1636.             {
  1637.                 include('misc/loguser.inc');
  1638.             }
  1639.             break;
  1640.  
  1641.         case "edit_job":
  1642.             if ($userlevel == OFFICE || $userlevel == EMPLOYER || $userlevel == TRAFFICDIRECTOR)
  1643.             {
  1644.                 include('job_descriptions/edit_job/edit_job.inc');
  1645.             }
  1646.             else
  1647.             {
  1648.                 include('misc/loguser.inc');
  1649.             }
  1650.             break;
  1651.  
  1652.         case "view_company_job":
  1653.             $select = 'search_job';
  1654.             $show_quick = true;
  1655.             $quick_type = 'company_quickview';
  1656.             $submit = 'Contact Division Company Search';
  1657.             include('job_descriptions/search_job/search.inc');
  1658.             break;
  1659.  
  1660.         case "view_division_job":
  1661.             $select = 'search_job';
  1662.             $show_quick = true;
  1663.             $quick_type = 'division_quickview';
  1664.             $submit = 'Contact Division Company Search';
  1665.             include('job_descriptions/search_job/search.inc');
  1666.             break;
  1667.  
  1668.         case "view_contact_job":
  1669.             $select = 'search_job';
  1670.             $show_quick = true;
  1671.             $quick_type = 'contact_quickview';
  1672.             $submit = 'Contact Division Company Search';
  1673.             include('job_descriptions/search_job/search.inc');
  1674.             break;
  1675.  
  1676.         case "search_job":
  1677.             include('job_descriptions/search_job/search.inc');
  1678.             break;
  1679.  
  1680.         case "pending_jobs":
  1681.             //if ($userlevel == OFFICE  || $userlevel == TRAFFICDIRECTOR)
  1682.             if ($userlevel == TRAFFICDIRECTOR)
  1683.             {
  1684.                 include('job_descriptions/pending_jobs/pending_jobs_header.inc');
  1685.             }
  1686.             else
  1687.             {
  1688.                 include('misc/loguser.inc');
  1689.             }
  1690.             break;
  1691.  
  1692.         case "holding_jobs":
  1693.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1694.             {
  1695.                 include('job_descriptions/holding_jobs/holding_jobs.inc');
  1696.             }
  1697.             else
  1698.             {
  1699.                 include('misc/loguser.inc');
  1700.             }
  1701.             break;
  1702.  
  1703.         case "view_job":
  1704.             if($level1 == "folders" || $level1 == "Manage Folders")
  1705.             {
  1706.                 include('job_descriptions/folders/folders.inc');
  1707.             }
  1708.             elseif($job_code)
  1709.             {
  1710.                 $sql = "SELECT DISTINCT job_id ".
  1711.                     "FROM job_info ".
  1712.                     "WHERE job_code = '".$job_code."'";
  1713.                 $result = $GLOBALS['dbh']->Execute($sql);
  1714.                 $row = $result->FetchRow();
  1715.                 if($result->RecordCount() !=0)
  1716.                 {
  1717.                     $job_id = $row["job_id"];
  1718.                     $show_quick = true;
  1719.                     $level1 = "job_id";
  1720.                 }
  1721.                 else
  1722.                 {
  1723.                     $false_job_code = true;
  1724.                 }
  1725.                 include('job_descriptions/show_job/show_job.inc');
  1726.             }
  1727.             else
  1728.             {
  1729.                 include('job_descriptions/show_job/show_job.inc');
  1730.             }
  1731.             break;
  1732.  
  1733.         case "add_history":
  1734.             if ($userlevel == OFFICE)
  1735.             {
  1736.                 include('history/add/add_history_controller.inc');
  1737.             }
  1738.             else
  1739.             {
  1740.                 include('misc/loguser.inc');
  1741.             }
  1742.             break;
  1743.  
  1744.         case "returning_placement":
  1745.             if ($userlevel == OFFICE)
  1746.             {
  1747.                 include('history/add/add_history_controller.inc');
  1748.             }
  1749.             else
  1750.             {
  1751.                 include('misc/loguser.inc');
  1752.             }
  1753.             break;
  1754.  
  1755.  
  1756.         case "employer_history":
  1757.             if ($userlevel == OFFICE)
  1758.             {
  1759.                 include('history/employer/employer_history_choose.inc');
  1760.             }
  1761.             else
  1762.             {
  1763.                 include('misc/loguser.inc');
  1764.             }
  1765.             break;
  1766.  
  1767.         case "email_students":
  1768.             if ($userlevel == OFFICE || $userlevel == FACULTY)
  1769.             {
  1770.                 include('student_info/mail.inc');
  1771.             }
  1772.             else
  1773.             {
  1774.                 include('misc/loguser.inc');
  1775.             }
  1776.             break;
  1777.  
  1778.         case "history_email_students":
  1779.             if ($userlevel == OFFICE)
  1780.             {
  1781.                 include('history/email.inc');
  1782.             }
  1783.             else
  1784.             {
  1785.                 include('misc/loguser.inc');
  1786.             }
  1787.         break;
  1788.         case "email_contact":
  1789.             if ($userlevel == OFFICE)
  1790.             {
  1791.                 include('contact/view/mail.inc');
  1792.             }
  1793.             else
  1794.             {
  1795.                 include('misc/loguser.inc');
  1796.             }
  1797.         break;
  1798.         case "view_student":
  1799.             if ($userlevel == OFFICE || $userlevel == FACULTY)
  1800.             {
  1801.                 include('student_info/view/view_student.inc');
  1802.             }
  1803.             else
  1804.             {
  1805.                 include('misc/loguser.inc');
  1806.             }
  1807.             break;
  1808.  
  1809.         case "edit_student":
  1810.             if ($userlevel == OFFICE || $userlevel == FACULTY)
  1811.             {
  1812.                 include('student_info/edit/editstudent.inc');
  1813.             }
  1814.             else
  1815.             {
  1816.                 include('misc/loguser.inc');
  1817.             }
  1818.             break;
  1819.  
  1820.         case "results":
  1821.             if ($userlevel==OFFICE)
  1822.             {
  1823.                 include('history/simple_search_results.inc');
  1824.             }
  1825.             else
  1826.             {
  1827.                 include('misc/loguser.inc');
  1828.             }
  1829.             break;
  1830.  
  1831.         case "edithistory":
  1832.             if ($userlevel==OFFICE)
  1833.             {
  1834.                 $continue = "Edit History";
  1835.                 include('history/history.inc');
  1836.             }
  1837.             else
  1838.             {
  1839.                 include('misc/loguser.inc');
  1840.             }
  1841.             break;
  1842.  
  1843.         case "student_history":
  1844.             if ($userlevel==OFFICE)
  1845.             {
  1846.                 include('history/choose_search.inc');
  1847.             }
  1848.             else
  1849.             {
  1850.                 include('misc/loguser.inc');
  1851.             }
  1852.             break;
  1853.         case "history_choose":
  1854.             if ($userlevel==OFFICE)
  1855.             {
  1856.                 include('history/choose_search.inc');
  1857.             }
  1858.             else
  1859.             {
  1860.                 include('misc/loguser.inc');
  1861.             }
  1862.             break;
  1863.  
  1864.         case "history_advanced_search":
  1865.             if ($userlevel==OFFICE)
  1866.             {
  1867.                 include('history/advanced_search_form.inc');
  1868.             }
  1869.             else
  1870.             {
  1871.                 include('misc/loguser.inc');
  1872.             }
  1873.             break;
  1874.  
  1875.         case "placement_by_term":
  1876.             if ($userlevel == OFFICE)
  1877.             {
  1878.                 include('placement/term/place_by_term_controller.inc');
  1879.             }
  1880.             else
  1881.             {
  1882.                 include('misc/loguser.inc');
  1883.             }
  1884.             break;
  1885.  
  1886.         case "placement_by_student":
  1887.             if ($userlevel == OFFICE)
  1888.             {
  1889.                 include('placement/student/place_by_student_controller.inc');
  1890.             }
  1891.             else
  1892.             {
  1893.                 include('misc/loguser.inc');
  1894.             }
  1895.             break;
  1896.         case "verify_history_delete":
  1897.             if ($userlevel == OFFICE)
  1898.             {
  1899.                 include('history/verify_delete.inc');
  1900.             }
  1901.             else
  1902.             {
  1903.                 include('misc/loguser.inc');
  1904.             }
  1905.             break;
  1906.  
  1907.         case "history":
  1908.             if ($userlevel == OFFICE)
  1909.             {
  1910.                 $continue = "View History";
  1911.                 include('history/history.inc');
  1912.             }
  1913.             else
  1914.             {
  1915.                 include('misc/loguser.inc');
  1916.             }
  1917.             break;
  1918.  
  1919.         case "set_history_flags":
  1920.             if ($userlevel == OFFICE)
  1921.             {
  1922.                 include('history/set/set.inc');
  1923.             }
  1924.             else
  1925.             {
  1926.                 include('misc/loguser.inc');
  1927.             }
  1928.             break;
  1929.  
  1930.         case "export_pdf_batch":
  1931.             if ($userlevel == OFFICE)
  1932.             {
  1933.                 include('history/export_batch.inc');
  1934.             }
  1935.             else
  1936.             {
  1937.                 include('misc/loguser.inc');
  1938.             }
  1939.             break;
  1940.  
  1941.         case "delete_record":
  1942.             if ($userlevel == OFFICE)
  1943.             {
  1944.                 include('history/delete_history.inc');
  1945.             }
  1946.             else
  1947.             {
  1948.                 include('misc/loguser.inc');
  1949.             }
  1950.             break;
  1951.  
  1952.         case "set_student_flags":
  1953.             if ($userlevel == OFFICE)
  1954.             {
  1955.                 include('student_info/set/set.inc');
  1956.             }
  1957.             else
  1958.             {
  1959.                 include('misc/loguser.inc');
  1960.             }
  1961.             break;
  1962.  
  1963.         case "employer_login":
  1964.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR) {
  1965.                 include ('misc/employer_login/employer_login.inc');
  1966.             }
  1967.             else {
  1968.                 include('misc/loguser.inc');
  1969.             }
  1970.             break;
  1971.  
  1972.         case "student_login":
  1973.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR) {
  1974.                 include('misc/student_login/login_screen.inc');
  1975.             }
  1976.             else {
  1977.                 include('misc/loguser.inc');
  1978.             }
  1979.             break;    
  1980.  
  1981.         case "prefer":
  1982.             if ($userlevel == OFFICE || $userlevel == TRAFFICDIRECTOR)
  1983.             {
  1984.                 include('preferences/personal/preferences.inc');
  1985.             }
  1986.             elseif ($userlevel == FACULTY)
  1987.             {
  1988.                 include('preferences/personal/preferences_faculty.inc');
  1989.             }
  1990.             else
  1991.             {
  1992.                 include('misc/loguser.inc');
  1993.             }
  1994.             break;
  1995.  
  1996.         case "prefer_dept":
  1997.             if ($userlevel == OFFICE)
  1998.             {
  1999.                 include('preferences/department/preferences.inc');
  2000.             }
  2001.             else
  2002.             {
  2003.                 include('misc/loguser.inc');
  2004.             }
  2005.             break;
  2006.         case "editemployeremailpopup":
  2007.             if ($userlevel == OFFICE){
  2008.                 include('preferences/department/editemployeremailpopup.inc');
  2009.             } else {
  2010.                 include('misc/loguser.inc');
  2011.             }
  2012.             break;
  2013.         case "defaultsemesterspopup":
  2014.             if ($userlevel == OFFICE){
  2015.                 include('preferences/department/defaultsemesterspopup.inc');
  2016.             } else {
  2017.                 include('misc/loguser.inc');
  2018.             }
  2019.             break;  
  2020.         case "prefer_staff":
  2021.             if ($userlevel == OFFICE && $_SESSION['SESSION_loginID']==ADMIN_USER_ID)
  2022.             {
  2023.                 include('preferences/staff/preferences.inc');
  2024.             }
  2025.             else
  2026.             {
  2027.                 include('misc/loguser.inc');
  2028.             }
  2029.             break;
  2030.  
  2031.         case "delete_student":
  2032.             if ($_SESSION['SESSION_loginID']==ADMIN_USER_ID) {
  2033.                 include ('student_info/delete/main.inc');
  2034.             } 
  2035.             else {
  2036.                 include ("misc/loguser.inc");
  2037.             }
  2038.             break;
  2039.         case "verify_delete_student":
  2040.             if ($_SESSION['SESSION_loginID']==ADMIN_USER_ID) {
  2041.                 include ('student_info/delete/verify.inc');
  2042.             }
  2043.             else {
  2044.                 include ("misc/loguser.inc");
  2045.             }
  2046.             break;
  2047.         case "deleted_student":
  2048.             if ($_SESSION['SESSION_loginID']==ADMIN_USER_ID) {
  2049.                 include ('student_info/delete/deleted.inc');
  2050.             }
  2051.             else {
  2052.                 include ("misc/loguser.inc");
  2053.             }
  2054.             break;
  2055.         case "feedback":
  2056.             if ($userlevel == OFFICE || $userlevel == ADMINSTUDENT || $userlevel == TRAFFICDIRECTOR 
  2057.                 || $userlevel == STUDENT || $userlevel == FACULTY)
  2058.             {
  2059.                 include ('misc/feedback.inc');
  2060.             }
  2061.             else
  2062.             {
  2063.                 include ("misc/loguser.inc");
  2064.             }
  2065.             break;
  2066.  
  2067.         default:
  2068.             // show the login screen
  2069.             if ($select == "")
  2070.             {
  2071.                 include("login.inc");
  2072.             }
  2073.             else
  2074.             {
  2075.                 $arr_returns = get_hooks('mamook.traffic_control.select', $select);
  2076.  
  2077.                 if (sizeof($arr_returns)) {
  2078.                     break;
  2079.                 }
  2080.  
  2081.                 // the $select was something meaningless
  2082.                 include("welcome.inc");
  2083.             }
  2084.             break;
  2085.  
  2086.     } // switch($select)
  2087.  
  2088.     include("footer.inc");
  2089.  
  2090.     if (DEBUG)
  2091.     {  // *** DEBUG CODE BELOW ***
  2092.         dumpToLog("*** END mamook.php at " . date("Y-m-d H:i:s") . " ***\n\n");
  2093.     }  // *** DEBUG CODE ABOVE ***
  2094. } // if(!$PDF && !$exported)
  2095. ob_end_flush();
  2096. ?>
  2097.  
i tried by changing register_global to on in php.ini file
i again tried to do that by .htaccess file but everytime i get the same error and project is not running.please help
Sep 24 '14 #1
8 2951
Dormilich
8,658 Expert Mod 8TB
what a variable is $PDF supposed to be?
Sep 25 '14 #2
kkshansid
232 100+
$PDF is supposed to be string
Sep 28 '14 #3
Dormilich
8,658 Expert Mod 8TB
then assign it a string. then the error will disappear.
Sep 29 '14 #4
same problem to me too bt i dont know php jst im learning now can help me on this
Jun 4 '16 #5
how to assign it as a string
Jun 4 '16 #6
Dormilich
8,658 Expert Mod 8TB
i tried by changing register_global to on in php.ini file
register_globals is removed as of PHP 5.4

how to assign it as a string
Expand|Select|Wrap|Line Numbers
  1. $PDF = 'some string';
Jun 4 '16 #7
sorry im unable to do that..!!

can you change the code and send me that will be more helpful
(in the given part jst i want view first )

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3.  
  4. //set_error_handler('myHandlerForMinorErrors', E_NOTICE | E_STRICT);
  5.  
  6.  
  7. ob_start('ob_gzhandler', 2048);
  8. // stupid IE workaround, PDFs don't save over SSL for stupid IE
  9. if ($PDF) {
  10.     session_cache_limiter("must-revalidate");
  11. }

remaining code as it is whats there in beginning of the page
Jun 4 '16 #8
im getting error of if statement

if ($PDF) {
Jun 4 '16 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mike | last post by:
I'm new to PHP - moving over from ASP. I have a number of include files, the first of which sets the value of a variable $loginmsg. I use that variable in a subsequent include file, but get a...
1
by: prabhunew2005 | last post by:
hi I am doing web portal design using php. I gave part of one of my screen coding. <html> <head> <script language = "javascript"> function list_all_click()
4
by: dmain1971 | last post by:
I have a class with an empty array like so: private $detail = array(); Then I have a function later on in the class: function get_array_value() { $detail_info = ' ';
3
by: printline | last post by:
Can anyone help me with why i am getting this error message: Notice: Undefined variable: SalesRepID in C:\Inetpub\wwwroot\index.php on line 158 Here is my php code: <?php session_start();...
2
by: norwichchris | last post by:
hi, I am having serious trouble with my PHP Postcard script. The error message i get is: Notice: Undefined index: Notice: Undefined variable Basically it does not send out the scripts at...
1
by: bob johnson | last post by:
Notice: Undefined variable: db_host in C:\wamp\www\cbmall\index.php on line 7 Notice: Undefined variable: db_user in C:\wamp\www\cbmall\index.php on line 7 Notice: Undefined variable: db_pass...
3
by: Yousef Altaf | last post by:
hay I have this code to upload images it works OK bu there is 2 things not working 1- when the image has the same name it doesn't display the message "A file of the same name already exists" it just...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.