if ($debug) { print '<br>' . $page . '.php::$id is empty' . "\n"; } do_title($title); print '<p>Please provide a valid Ticket number'; } else { // Debuggin if ($debug) { print '<br> ' . $page . '.php:: id **not** empty::switch()'; } do_title($title . " #" . $id); // Set page title // Show entry print "<!-- Showing the selected Element -->"; require_once 'functions03.inc'; $i = show_simple_data($id, $start_id); $SQL_option = " AND `{$linking_field}` = {$id} "; mysql_open("{$mysql_db}", "{$mysql_user}", "{$mysql_passwd}"); //edit_option("", "add", "action",$option_element,$id); mysql_open_next("{$mysql_db_next}", "{$mysql_user_next}", "{$mysql_passwd_next}"); do_title($option_element . 's\' belonging to this ' . $GLOBALS['ELEMENT']); //list_option($SQL="",$current=0,$search=0) //list_option($SQL_option); list_simple_option($SQL_option); } print '<hr>'; //simple_search_by_element_num($GLOBALS['ELEMENT']); powered(); // Print "Powered by" and end the HTML page session_destroy(); die;
// Close Element case "closeupdat": if ($_SESSION['ticket_user_is_admin'] > 0) { print "<!-- Closing the selected Element -->"; close_element($id, $action, $GLOBALS['MAIN_TABLE']); //,$page); } else { do_title(ucfirst($action) . "ing " . $GLOBALS['ELEMENT'] . " "); // . $temp_trailing); print '<p class="severity_high">You are not allowed to Add nor Modify existing information'; } break; case '': // Show entry print "<!-- Showing the selected Element -->"; require_once 'functions03.inc'; $i = show_data($id, $GLOBALS['MAIN_TABLE'], $title, $page, $start_id); // List Option from current Element $SQL_option = " AND `{$linking_field}` = {$id} "; mysql_open("{$mysql_db}", "{$mysql_user}", "{$mysql_passwd}"); edit_option("", "add", $id); mysql_open_next("{$mysql_db_next}", "{$mysql_user_next}", "{$mysql_passwd_next}"); do_title($GLOBALS['OPTION'] . "s belonging to this " . $GLOBALS['ELEMENT'] . ". Click on date to edit action", 0); // Do not generate HTML headers (the "0") list_option($SQL_option); break; } } powered(); // Print "Powered by" and end the HTML page die;
/************************************** *** File: help.php **************** *** Project: phpticket **************** *************************************** *** Authors: Daniel Netz <*****@*****.**> and *** *** Sinner from the Prairy <*****@*****.**> *** *** email: sinnerbofh@gmail.com ***** *** Comment: From phptcket to HIPAA Tracker back to phpticket* **************************************/ require_once 'conf.inc'; require_once 'functions01.inc'; print '<HTML> <HEAD> <LINK REL=StyleSheet HREF="default.css" TYPE="text/css"> </HEAD><BODY>'; do_title("Help"); print ' <LI> <A HREF="help.php?q=Tickets">Tickets and Actions</A> <LI> <A HREF="help.php?q=configuration">Configuration</A> <!-- <LI> <A HREF="help.php?q=notify">Notifies</A>--> <LI> <A HREF="help.php?q=settings">Settings</A></h3> <LI> <A HREF="help.php?q=contact">Getting Help</A></h3> <!-- <LI> <A HREF="help.php?q=install">Install</A>--> <!-- <LI> <A HREF="help.php?q=readme">ReadMe</A>>--> <LI> <A HREF="help.php?q=develop">Development</A> <!-- <LI> <A HREF="help.php?q=changelog">ChangeLog</A>--> <!-- <LI> <A HREF="help.php?q=todo">ToDo</A>--> <LI> <A HREF="help.php?q=licensing">Licensing</A> <LI> <A HREF="help.php?q=credits">Credits</A> <BR><BR>' . "\n"; switch ($_GET['q']) {
case 0: // No tickets found print '<H3>No matching tickets found.</H3>'; //do_title('No matching tickets found with query: "'.$_POST[frm_query].'"'); break; case 1: // display ticket in whole if just one returned $row = mysql_fetch_array($result); //show_ticket($row[id]); show_data($row[id], $GLOBALS['MAIN_TABLE'], $GLOBALS['ELEMENT'], $page, $start_id = 0); //add_footer($row[id]); powered(); exit; break; default: do_title('Search results for "' . $_POST[frm_query] . '"'); $result_fields = array("Ticket", "Date", "Severity", "Description", "Affected", "Owner", "Closed?"); $ticket_found = 1; print '<TABLE BORDER="0"><TR>'; for ($i = 0; $i < sizeof($result_fields); $i++) { print '<TD CLASS="td_header">' . $result_field[$i] . '</TD>'; } print "</TR> \n "; while ($row = mysql_fetch_array($result)) { print '<TR><TD><A HREF="' . $GLOBALS['MAIN_PAGE'] . '.php?id=' . $row[id] . '">#' . $row[id] . ' </A></TD>' . " \n "; print "<TD>" . $row[t_date] . " </TD>\n"; print "<TD>" . get_single_option("severity", $row[severity]) . " </TD>\n"; if (get_variable('abbreviate_description')) { $wrap_var = " NOWRAP "; if (strlen($row[description]) > get_variable('abbreviate_description')) { $row[description] = substr($row[description], 0, get_variable('abbreviate_description')) . '...';
//if ($action == "updat") { header("Refresh: 3; main.php?id=".$element_id); } // Update information for Element //if ($action == "updat") { header("Refresh: 3; main.php?id=".$element_id); } case "edit": // Edit Element // Edit Element case "delet": // Delete the Element // Delete the Element case "add": // Add new Element if ($_SESSION['ticket_user_is_admin'] > 0) { print "<!-- " . $action . "ing the selected Element -->"; // edit_option($id,$action,$page,$GLOBALS['OPTION'], $element_id="") edit_option($id, $action, $page, $element_id); } else { do_title(ucfirst($action) . "ing " . $title . " " . $temp_trailing); print '<p class="severity_high">You are not allowed to Add nor Modify existing information'; } break; case '': // Show entry print "<!-- Showing the selected Element -->"; // function show_action_data($id,$table,$start_id=0) $i = show_action_data($id, $GLOBALS['OPTION_TABLE'], $title, $start_id, $GLOBALS['MAIN_PAGE']); break; } } powered(); // Print "Powered by" and end the HTML page die;
break; case 'abbreviate_affected': return 'abbreviates \'affected\' string at this number when listing elements, 0 to turn off'; break; // case 'allow_custom_tags': return 'enable/disable use of custom tags for rowbreak, italics etc.'; break; // case 'allow_custom_tags': return 'enable/disable use of custom tags for rowbreak, italics etc.'; break; case 'allow_anonymous_login': return 'enable/disable anonymous login'; break; default: return "No help for '{$setting}'"; break; } } //set_htmlheader("Settings"); do_title("Settings"); global $debug; $debug = get_variable("debug_value"); switch ($_GET['mode']) { case "profile": //update profile if ($_GET['go'] == 'true') { //check passwords if ($_POST['frm_passwd'] != '') { if ($_POST['frm_passwd'] != $_POST['frm_passwd_confirm']) { print 'Passwords doesn\'t match. Please try again.'; print ' <BR><BR><TABLE BORDER="0">'; print '<FORM METHOD="POST" ACTION="config.php?mode=profile&go=true">'; print '<TR><TD CLASS="td_label">New Password:</TD> <TD colspan="2"><INPUT MAXLENGTH="30" SIZE="40" TYPE="password" NAME="frm_passwd" tabindex="1"></TD></TR>'; print '<TR><TD CLASS="td_label">Confirm Password:</TD>