本文整理汇总了PHP中CleanUp函数的典型用法代码示例。如果您正苦于以下问题:PHP CleanUp函数的具体用法?PHP CleanUp怎么用?PHP CleanUp使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CleanUp函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
<?php
print "<p class=\"heading_side\">Settings</p>";
if ($_GET[listtype] == "list") {
$showlist = "list";
} elseif ($_GET[listtype] == "address") {
$showlist = "address";
} elseif ($_COOKIE[listtype] == "list") {
$showlist = "list";
} elseif ($_COOKIE[listtype] == "address") {
$showlist = "address";
} else {
$showlist = "address";
}
$currentpage = "http://" . $_SERVER[HTTP_HOST] . $_SERVER[REQUEST_URI];
$currentpage = CleanUp($currentpage);
if ($showlist == "list") {
print "<p>Contacts per page</p>";
print "<form action=\"{$currentpage}\" method=\"post\">";
print "<select class=\"inputbox\" name=\"listmax\">";
print "<option value=\"5\"";
if ($listmax == 5) {
print " selected";
}
print ">5</option>";
print "<option value=\"10\"";
if ($listmax == 10) {
print " selected";
}
print ">10</option>";
print "<option value=\"20\"";
示例2: CleanUp
$drawing_number_4 = CleanUp($_POST[drawing_number_4]);
}
$drawing_project = CleanUp($_POST[drawing_project]);
$drawing_author = $_POST[drawing_author];
$drawing_scale = CleanNumber($_POST[drawing_scale]);
$drawing_paper = $_POST[drawing_paper];
$drawing_orientation = CleanUp($_POST[drawing_orientation]);
$drawing_title = CleanUp($_POST[drawing_title]);
$drawing_date_day = CleanNumber($_POST[drawing_date_day]);
$drawing_date_month = CleanNumber($_POST[drawing_date_month]);
$drawing_date_year = CleanNumber($_POST[drawing_date_year]);
$drawing_checked = CleanUp($_POST[drawing_checked]);
$drawing_package_list = $_POST[drawing_package_list];
$drawing_total_packages = $_POST[drawing_total_packages];
$drawing_targetdate = $_POST[drawing_targetdate];
$drawing_comment = CleanUp($_POST[drawing_comment]);
$counter = 0;
while ($counter < $drawing_total_packages) {
if ($drawing_package_list[$counter] != NULL) {
$drawing_packages = $drawing_package_list[$counter] . "," . $drawing_packages;
}
$counter++;
}
if ($drawing_number == NULL) {
$drawing_number = $drawing_number_1 . "-" . $drawing_number_2;
if ($drawing_number_3 != NULL) {
$drawing_number = $drawing_number . "-" . $drawing_number_3;
}
$drawing_number = $drawing_number . "-" . $drawing_number_4;
}
// Check the date input
示例3: CleanUp
<?php
// Begin to clean up the $_POST submissions
$ts_expense_id = $_POST[ts_expense_id];
$ts_expense_project = $_POST[ts_expense_project];
$ts_expense_desc = CleanUp($_POST[ts_expense_desc]);
$ts_expense_date = $_POST[ts_expense_date];
$ts_expense_day = $_POST[ts_expense_day];
$ts_expense_month = $_POST[ts_expense_month];
$ts_expense_year = $_POST[ts_expense_year];
$ts_expense_vat = $ts_expense_value;
$ts_expense_user = $_COOKIE[user];
$ts_expense_verified = 0;
$ts_expense_invoiced = $_POST[ts_expense_invoiced];
$ts_expense_receipt = NULL;
// Check the date input
if (checkdate($ts_expense_month, $ts_expense_day, $ts_expense_year) != TRUE) {
$alertmessage = "The date entered is invalid.";
$page_redirect = "timesheet_expense_mileage_edit";
} elseif ($_POST[ts_expense_desc] == "") {
$alertmessage = "The description was left empty.";
$page_redirect = "timesheet_expense_edit";
} elseif ($_POST[ts_expense_value] == "") {
$alertmessage = "The expenses value was left empty.";
$page_redirect = "timesheet_expense_edit";
} else {
// Convert the date to a time
$ts_expense_date = mktime(12, 0, 0, $ts_expense_month, $ts_expense_day, $ts_expense_year);
// Construct the MySQL instruction to add these entries to the database
if ($ts_expense_id > 0) {
$sql_edit = "UPDATE intranet_timesheet_expense SET\n\t\tts_expense_project = '{$ts_expense_project}',\n\t\tts_expense_value = '{$ts_expense_value}',\n\t\tts_expense_date = '{$ts_expense_date}',\n\t\tts_expense_desc = '{$ts_expense_desc}',\n\t\tts_expense_user = '{$ts_expense_user}',\n\t\tts_expense_vat = '{$ts_expense_vat}',\n\t\tts_expense_receipt = '{$ts_expense_receipt}',\n\t\tts_expense_invoiced = '{$ts_expense_invoiced}'\n\t\tWHERE ts_expense_id = '{$ts_expense_id}' LIMIT 1";
示例4: CleanUp
}
// And now echo some debugging information if the option is selected within the global options page
if ($settings_showtech > 0 and $user_usertype_current > 3) {
if ($sql_add != "") {
echo "<p>Database entry:<br /><strong>{$sql_add}</strong></p>";
}
echo "<h1>Technical Information</h1>";
echo "<p>Included file:<br /><strong> " . CleanUp($inc_file) . "</strong></p>";
echo "<p>Last Updated:<br /><strong> " . date("r", filectime($inc_file)) . "</strong></p>";
echo "<p>Server IP Address:<br /><strong> " . CleanUp($_SERVER["SERVER_ADDR"]) . "</strong></p>";
echo "<p>Server Name:<br /><strong> " . CleanUp($_SERVER["SERVER_NAME"]) . "</strong></p>";
echo "<p>Client IP Address:<br /><strong> " . CleanUp($_SERVER["REMOTE_ADDR"]) . "</strong></p>";
echo "<p>Script Name:<br /><strong> " . CleanUp($_SERVER["SCRIPT_NAME"]) . "</strong></p>";
echo "<p>Query String:<br /><strong> " . CleanUp($_SERVER["QUERY_STRING"]) . "</strong></p>";
echo "<p>PHP Version:<br /><strong> " . phpversion() . "</strong></p>";
echo "<p>Server Software:<br /><strong> " . CleanUp($_SERVER["SERVER_SOFTWARE"]) . "</strong></p>";
if ($techmessage != NULL) {
echo "<p>{$techmessage}</p>";
}
}
echo "</div>";
echo "</div>";
echo $alertscript;
// Finish with the standard footer
FooterBar();
echo "</body>";
echo "</html>";
?>
示例5: CleanNumber
<?php
// Begin to clean up the $_POST submissions
$message_id = CleanNumber($_POST[message_id]);
$message_from_id = CleanNumber($_POST[message_from_id]);
$message_from_name = CleanUpNames($_POST[message_from_name]);
$message_from_company = CleanUpNames($_POST[message_from_company]);
$message_from_number = CleanUp($_POST[message_from_number]);
$message_for_user = CleanNumber($_POST[message_for_user]);
$message_text = CleanUp($_POST[message_text]);
$message_viewed = CleanNumber($_POST[message_viewed]);
$message_date = time();
$message_project = CleanNumber($_POST[message_project]);
$message_taken = CleanNumber($_POST[message_taken]);
// Check that the required values have been entered, and alter the page to show if these values are invalid
if ($_POST[message_from_id] == "" and $_POST[message_from_name] == "") {
$alertmessage = "You have not entered the name of the caller.";
$page_redirect = "phonemessage_edit";
} elseif ($_POST[message_text] == "") {
$alertmessage = "The message was left empty.";
$page_redirect = "timesheet_expense_edit";
} else {
// Construct the MySQL instruction to add these entries to the database
if ($message_id > 0) {
$sql_edit = "UPDATE intranet_phonemessage SET\n\t\tmessage_from_id = '{$message_from_id}',\n\t\tmessage_from_name = '{$message_from_name}',\n\t\tmessage_from_company = '{$message_from_company}',\n\t\tmessage_from_number = '{$message_from_number}',\n\t\tmessage_for_user = '{$message_for_user}',\n\t\tmessage_text = '{$message_text}',\n\t\tmessage_viewed = '{$message_viewed}',\n\t\tmessage_date = '{$message_date}',\n\t\tmessage_project = '{$message_project}',\n\t\tmessage_taken = '{$message_taken}'\n\t\tWHERE message_id = '{$message_id}'\n\t\tLIMIT 1";
$result = mysql_query($sql_edit, $conn) or die(mysql_error());
$actionmessage = "Telephone message updated successfully.";
$techmessage = $sql_edit;
} else {
$sql_add = "INSERT INTO intranet_phonemessage (\n\t\tmessage_id,\n\t\tmessage_from_id,\n\t\tmessage_from_name,\n\t\tmessage_from_company,\n\t\tmessage_from_number,\n\t\tmessage_for_user,\n\t\tmessage_text,\n\t\tmessage_viewed,\n\t\tmessage_date,\n\t\tmessage_project,\n\t\tmessage_taken\n\t\t) values (\n\t\t'NULL',\n\t\t'{$message_from_id}',\n\t\t'{$message_from_name}',\n\t\t'{$message_from_company}',\n\t\t'{$message_from_number}',\n\t\t'{$message_for_user}',\n\t\t'{$message_text}',\n\t\t'{$message_viewed}',\n\t\t'{$message_date}',\n\t\t'{$message_project}',\n\t\t'{$message_taken}'\n\t\t)";
$result = mysql_query($sql_add, $conn) or die(mysql_error());
示例6: CleanUpNames
$contact_prefix = $_POST[contact_prefix];
$contact_namefirst = CleanUpNames($_POST[contact_namefirst]);
$contact_namesecond = CleanUpNames($_POST[contact_namesecond]);
$contact_title = $_POST[contact_title];
$contact_company = CleanUpNames($_POST[contact_company]);
$contact_telephone = CleanUpPhone($_POST[contact_telephone]);
$contact_telephone_home = CleanUpPhone($_POST[contact_telephone_home]);
$contact_fax = CleanUpPhone($_POST[contact_fax]);
$contact_mobile = CleanUpPhone($_POST[contact_mobile]);
$contact_email = CleanUpEmail($_POST[contact_email]);
$contact_sector = $_POST[contact_sector];
$contact_reference = CleanUp($_POST[contact_reference]);
$contact_department = CleanUp($_POST[contact_department]);
$contact_added = time();
$contact_relation = $_POST[contact_relation];
$contact_discipline = $_POST[contact_discipline];
$contact_include = $_POST[contact_include];
$contact_address = CleanUpAddress($_POST[contact_address]);
$contact_city = CleanUp($_POST[contact_city]);
$contact_county = CleanUp($_POST[contact_county]);
$contact_postcode = CleanUpPostcode($_POST[contact_postcode]);
$contact_country = $_POST[contact_country];
$contact_added_by = $_COOKIE[user];
// Construct the MySQL instruction to add these entries to the database
$sql_add = "INSERT INTO contacts_contactlist (\ncontact_id,\ncontact_prefix,\ncontact_namefirst,\ncontact_namesecond,\ncontact_title,\ncontact_company,\ncontact_telephone,\ncontact_telephone_home,\ncontact_fax,\ncontact_mobile,\ncontact_email,\ncontact_sector,\ncontact_reference,\ncontact_department,\ncontact_added,\ncontact_relation,\ncontact_discipline,\ncontact_include,\ncontact_address,\ncontact_city,\ncontact_county,\ncontact_postcode,\ncontact_country,\ncontact_added_by\n) values (\n'NULL',\n'{$contact_prefix}',\n'{$contact_namefirst}',\n'{$contact_namesecond}',\n'{$contact_title}',\n'{$contact_company}',\n'{$contact_telephone}',\n'{$contact_telephone_home}',\n'{$contact_fax}',\n'{$contact_mobile}',\n'{$contact_email}',\n'{$contact_sector}',\n'{$contact_reference}',\n'{$contact_department}',\n'{$contact_added}',\n'{$contact_relation}',\n'{$contact_discipline}',\n'{$contact_include}',\n'{$contact_address}',\n'{$contact_city}',\n'{$contact_county}',\n'{$contact_postcode}',\n'{$contact_country}',\n'{$contact_added_by}'\n)";
$result = mysql_query($sql_add, $conn) or die(mysql_error());
$contact_id = mysql_insert_id();
$actionmessage = "The entry for contact <b>{$contact_namefirst} {$contact_namesecond}</b> was added successfully.";
$techmessage = $sql_add;
// $company_id = mysql_affected_rows($result);
}
示例7: CleanNumber
// echo "<p class=\"menu_bar\">Menu goes here</p>";
echo "<input type=\"hidden\" name=\"ts_fee_id\" value=\"{$ts_fee_id}\" />";
} else {
$ts_fee_stage = CleanNumber($_POST[ts_fee_stage]);
$ts_fee_text = CleanUp($_POST[ts_fee_text]);
$ts_fee_value = CleanUp($_POST[ts_fee_value]);
if ($_POST[ts_fee_project]) {
$ts_fee_project = CleanUp($_POST[ts_fee_project]);
} elseif ($_GET[proj_id]) {
$ts_fee_project = CleanUp($_GET[proj_id]);
}
$ts_fee_percentage = CleanNumber($_POST[ts_fee_percentage]);
$ts_fee_prospect = CleanNumber($_POST[ts_fee_prospect]);
$ts_fee_target = CleanNumber($_POST[ts_fee_target]);
$ts_fee_comment = CleanUp($_POST[ts_fee_comment]);
$ts_fee_commence = CleanUp($_POST[ts_fee_commence]);
if ($_GET[proj_id] != NULL) {
$proj_id_page = $_GET[proj_id];
}
echo "<h1>Add Fee Stage</h1>";
}
echo "<form action=\"index2.php?page=project_fees\" method=\"post\">";
// Begin the invoice entry system
$nowtime = time();
if ($ts_fee_time_begin_day > 0) {
$nowtime_day = $ts_fee_time_begin_day;
$thentime_day = $ts_fee_time_end_day;
} else {
$nowtime_day = date("d", $nowtime);
$thentime_day = date("d", $nowtime);
}
示例8: fpdi
require 'fpdf/fpdi.php';
$pdf = new fpdi();
$pagecount = $pdf->setSourceFile("pdf/template.pdf");
$tplidx = $pdf->ImportPage(1);
$pdf->addPage();
$pdf->useTemplate($tplidx, 0, 0, 210, 297);
$format_font = "century";
$format_font_2 = "Century.php";
$pdf->AddFont($format_font, '', $format_font_2);
$format_bg_r = "220";
$format_bg_g = "220";
$format_bg_b = "220";
$format_ln_r = "220";
$format_ln_g = "220";
$format_ln_b = "220";
$blog_id = CleanUp($_GET[blog_id]);
// Begin creating the page
//Page Title
$sql_project = "SELECT * FROM intranet_projects_blog, intranet_user_details, intranet_projects WHERE blog_id = {$blog_id} AND blog_proj = proj_id AND blog_user = user_id LIMIT 1";
$result_project = mysql_query($sql_project, $conn) or die(mysql_error());
$array_project = mysql_fetch_array($result_project);
$proj_num = $array_project['proj_num'];
$proj_name = $array_project['proj_name'];
$blog_title = $array_project['blog_title'];
$blog_date = $array_project['blog_date'];
$blog_type = $array_project['blog_type'];
$blog_text = strip_tags(nl2br(RemoveShit($array_project['blog_text'])));
$blog_text = str_replace(" ", " ", $blog_text);
$user_name_first = $array_project['user_name_first'];
$user_name_second = $array_project['user_name_second'];
$blog_text = str_replace("\n", "\n\n", $blog_text);
示例9: array
$row_text = $row_text . "<br />cost_remaining_all = {$cost_remaining_all}";
$row_text = $row_text . "<br />ts_fee_value = {$ts_fee_value}";
$row_text = $row_text . "<br />user_percent = {$user_percent}";
$row_text = $row_text . "<br />user_cost = {$user_cost}";
$row_text = $row_text . "<br />hours_remaining_user = {$hours_remaining_user}";
$row_text = $row_text . "<br />proj_id = {$proj_id}";
$row_text = $row_text . "<br />ts_fee_id = {$ts_fee_id}";
$row_text = $row_text . "<br />ts_hours_total = {$ts_hours_total}";
}
}
return array($row_text, $row_color);
}
if ($_GET[listorder] != NULL) {
$listorder = $_GET[listorder];
}
$active = CleanUp($_GET[active]);
if ($active == "0") {
$project_active = " AND proj_active = 0";
} elseif ($active == "all") {
unset($project_active);
} else {
$project_active = " AND proj_active = 1 ";
}
// Create an array which shows the recent projects worked on by the user
$timesheet_period = 16;
// weeks
$timesheet_period = $timesheet_period * 604800;
$timesheet_period = time() - $timesheet_period;
$sql_timesheet_projects = "SELECT ts_project FROM intranet_timesheet WHERE ts_user = {$_COOKIE['user']} AND ts_datestamp > {$timesheet_period} GROUP BY ts_project";
$result_timesheet_projects = mysql_query($sql_timesheet_projects, $conn) or die(mysql_error());
$array_projects_recent = array();
示例10: CleanUp
<?php
// Get the list of projects from the database
$search = CleanUp($_GET[tender_keyword]);
$sql = "SELECT * FROM intranet_tender_answers, intranet_tender WHERE tender_id = answer_tender_id AND answer_question LIKE '%{$search}%' ORDER BY tender_date DESC, answer_ref";
$result = mysql_query($sql, $conn) or die(mysql_error());
$counter = 0;
while ($array = mysql_fetch_array($result)) {
$answer_id = $array['answer_id'];
$answer_ref = $array['answer_ref'];
$answer_question = $array['answer_question'];
$answer_response = nl2br($array['answer_response']);
$answer_words = $array['answer_words'];
$answer_weighting = $array['answer_weighting'];
$answer_rating = $array['answer_rating'];
$tender_id = $array['tender_id'];
$tender_name = $array['tender_name'];
$tender_date = $array['tender_date'];
$tender_type = $array['tender_type'];
if ($tender_date > time() and $_GET[edit_question] != $answer_id) {
$answer_ref = $answer_ref . " <a href=\"index2.php?page=tender_view&tender_id={$tender_id}&edit_question={$answer_id}#{$answer_id}\"><img src=\"images/button_edit.png\" alt=\"Edit\" /></a>";
}
if ($counter == 0) {
echo "<h1>Searching: <i>{$search}</i></h1>";
print "<table summary=\"Lists of questions and responses\">";
if ($_GET[question] == "add") {
EditForm('', '', '', '', '', $tender_id);
echo "</th></tr>";
}
}
if ($answer_response == NULL) {
示例11: CleanUpNames
<?php
// Check that the required values have been entered, and alter the page to show if these values are invalid
if ($_POST[company_name] == "") {
$alertmessage = "The company name was left empty.";
$page = "company_edit";
$action = "add";
} else {
// This determines the page to show once the form submission has been successful
$page = "company_view";
// Begin to clean up the $_POST submissions
$company_id = $_POST[company_id];
$company_name = CleanUpNames($_POST[company_name]);
$company_phone = CleanUpPhone($_POST[company_phone]);
$company_fax = CleanUpPhone($_POST[company_fax]);
$company_address = CleanUpAddress($_POST[company_address]);
$company_city = CleanUp($_POST[company_city]);
$company_county = CleanUp($_POST[company_county]);
$company_postcode = CleanUpPostcode($_POST[company_postcode]);
$company_country = $_POST[company_country];
$company_web = str_replace("http://", "", $_POST[company_web]);
$company_notes = $_POST[company_notes];
// Construct the MySQL instruction to add these entries to the database
$sql_add = "UPDATE contacts_companylist SET\ncompany_name = '{$company_name}',\ncompany_phone = '{$company_phone}',\ncompany_fax = '{$company_fax}',\ncompany_address = '{$company_address}',\ncompany_city = '{$company_city}',\ncompany_county = '{$company_county}',\ncompany_postcode = '{$company_postcode}',\ncompany_country = '{$company_country}',\ncompany_web = '{$company_web}',\ncompany_notes = '{$company_notes}'\nWHERE company_id = '{$company_id}' LIMIT 1\n";
$result = mysql_query($sql_add, $conn) or die(mysql_error());
$actionmessage = "The entry for company <b>{$company_name}</b> was updated successfully.";
$techmessage = $sql_add;
$company_id = mysql_affected_rows($result);
}
示例12: elseif
$tasklist_percentage_graph = "tasklist_percent_050.gif";
} elseif ($tasklist_percentage == 60) {
$tasklist_percentage_graph = "tasklist_percent_060.gif";
} elseif ($tasklist_percentage == 70) {
$tasklist_percentage_graph = "tasklist_percent_070.gif";
} elseif ($tasklist_percentage == 80) {
$tasklist_percentage_graph = "tasklist_percent_080.gif";
} elseif ($tasklist_percentage == 90) {
$tasklist_percentage_graph = "tasklist_percent_090.gif";
} elseif ($tasklist_percentage == 100) {
$tasklist_percentage_graph = "tasklist_percent_100.gif";
}
// echo the bar chart and make it clickable if it belongs to the current user
if ($user_id == $_COOKIE[user]) {
if ($_GET[subcat] != NULL) {
$task_subcat = CleanUp($_GET[subcat]);
} else {
$task_subcat = "user";
}
echo "\n\t\t\t\t\t\t\t<img src=\"images/{$tasklist_percentage_graph}\" width=\"225\" height=\"17\" border=\"0\" alt=\"\" usemap=\"#task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t<map name=\"task_{$tasklist_id}\">\n\t\t\t\t\t\t\t<area shape=\"rect\" alt=\"\" coords=\"201,1,219,9\" href=\"index2.php?page=tasklist_view&action=tasklist_change_percent&tasklist_id={$tasklist_id}&tasklist_percent=100&subcat={$task_subcat}#view_task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t<area shape=\"rect\" alt=\"\" coords=\"181,1,199,9\" href=\"index2.php?page=tasklist_view&action=tasklist_change_percent&tasklist_id={$tasklist_id}&tasklist_percent=90&subcat={$task_subcat}#view_task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t<area shape=\"rect\" alt=\"\" coords=\"161,1,179,9\" href=\"index2.php?page=tasklist_view&action=tasklist_change_percent&tasklist_id={$tasklist_id}&tasklist_percent=80&subcat={$task_subcat}#view_task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t<area shape=\"rect\" alt=\"\" coords=\"141,1,159,9\" href=\"index2.php?page=tasklist_view&action=tasklist_change_percent&tasklist_id={$tasklist_id}&tasklist_percent=70&subcat={$task_subcat}#view_task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t<area shape=\"rect\" alt=\"\" coords=\"121,1,139,9\" href=\"index2.php?page=tasklist_view&action=tasklist_change_percent&tasklist_id={$tasklist_id}&tasklist_percent=60&subcat={$task_subcat}#view_task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t<area shape=\"rect\" alt=\"\" coords=\"101,1,119,9\" href=\"index2.php?page=tasklist_view&action=tasklist_change_percent&tasklist_id={$tasklist_id}&tasklist_percent=50&subcat={$task_subcat}#view_task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t<area shape=\"rect\" alt=\"\" coords=\"81,1,99,9\" href=\"index2.php?page=tasklist_view&action=tasklist_change_percent&tasklist_id={$tasklist_id}&tasklist_percent=40&subcat={$task_subcat}#view_task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t<area shape=\"rect\" alt=\"\" coords=\"61,1,79,9\" href=\"index2.php?page=tasklist_view&action=tasklist_change_percent&tasklist_id={$tasklist_id}&tasklist_percent=30&subcat={$task_subcat}#view_task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t<area shape=\"rect\" alt=\"\" coords=\"41,1,59,9\" href=\"index2.php?page=tasklist_view&action=tasklist_change_percent&tasklist_id={$tasklist_id}&tasklist_percent=20&subcat={$task_subcat}#view_task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t<area shape=\"rect\" alt=\"\" coords=\"21,1,39,9\" href=\"index2.php?page=tasklist_view&action=tasklist_change_percent&tasklist_id={$tasklist_id}&tasklist_percent=10&subcat={$task_subcat}#view_task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t<area shape=\"rect\" alt=\"\" coords=\"1,1,19,9\" href=\"index2.php?page=tasklist_view&action=tasklist_change_percent&tasklist_id={$tasklist_id}&tasklist_percent=0&subcat={$task_subcat}#view_task_{$tasklist_id}\" />\n\t\t\t\t\t\t\t</map>\n\t\t\t\t\t\t\t";
} else {
echo "<br />\n\t\t\t\t\t\t\t<img src=\"images/{$tasklist_percentage_graph}\" width=\"225\" height=\"17\" border=\"0\" alt=\"\" />";
}
echo "</td></tr>";
if ($proj_id != $proj_id_repeat) {
$counter = 1;
unset($proj_id_repeat);
} else {
$counter++;
}
}
示例13: CleanUp
<?php
// Check that the required values have been entered, and alter the page to show if these values are invalid
if ($_POST[tasklist_notes] == "") {
$alertmessage = "The task description was left empty.";
$status = "tasklist_edit";
$action = "add";
} else {
// Begin to clean up the $_POST submissions
$tasklist_project = $_POST[tasklist_project];
$tasklist_status = $_POST[tasklist_status];
$tasklist_fee = $_POST[tasklist_fee];
$tasklist_notes = CleanUp($_POST[tasklist_notes]);
$tasklist_comment = CleanUp($_POST[tasklist_comment]);
$tasklist_updated = time();
$tasklist_added = time();
$tasklist_completed = "";
$tasklist_person = $_POST[tasklist_person];
$tasklist_due = $_POST[tasklist_due];
$tasklist_percentage = $_POST[tasklist_percentage];
if ($_POST[tasklist_id] != NULL) {
$sql_edit = "UPDATE intranet_tasklist SET\n\t\ttasklist_project = '{$tasklist_project}',\n\t\ttasklist_contact = '{$tasklist_contact}',\n\t\ttasklist_fee = '{$tasklist_fee}',\n\t\ttasklist_notes = '{$tasklist_notes}',\n\t\ttasklist_updated = '{$tasklist_updated}',\n\t\ttasklist_person = '{$tasklist_person}',\n\t\ttasklist_comment = '{$tasklist_comment}',\n\t\ttasklist_percentage = '{$tasklist_percentage}',\n\t\ttasklist_due = '{$tasklist_due}'\n\t\tWHERE tasklist_id = '{$_POST['tasklist_id']}' LIMIT 1\n\t\t";
$result = mysql_query($sql_edit, $conn) or die(mysql_error());
$actionmessage = "Task updated successfully.";
$techmessage = $sql_edit;
} else {
// Construct the MySQL instruction to add these entries to the database
$sql_add = "INSERT INTO intranet_tasklist (\n\t\ttasklist_id,\n\t\ttasklist_project,\n\t\ttasklist_contact,\n\t\ttasklist_fee,\n\t\ttasklist_notes,\n\t\ttasklist_updated,\n\t\ttasklist_added,\n\t\ttasklist_completed,\n\t\ttasklist_person,\n\t\ttasklist_due,\n\t\ttasklist_comment,\n\t\ttasklist_percentage\n\t\t) values (\n\t\t'NULL',\n\t\t'{$tasklist_project}',\n\t\t'{$tasklist_contact}',\n\t\t'{$tasklist_fee}',\n\t\t'{$tasklist_notes}',\n\t\t'',\n\t\t'{$tasklist_added}',\n\t\t'{$tasklist_completed}',\n\t\t'{$tasklist_person}',\n\t\t'{$tasklist_due}',\n\t\t'{$tasklist_comment}',\n\t\t'{$tasklist_percentage}'\n\t\t)";
$result = mysql_query($sql_add, $conn) or die(mysql_error());
$actionmessage = "Task added successfully.";
$techmessage = $sql_add;
示例14: CleanUp
$alertmessage = "You have entered an invalid number of hours. Please review your submission and try again.";
$timesheet_add_date = CleanUp($_POST[timesheet_add_date]);
$ts_entry = $timesheet_add_date;
$timesheet_add_hours = (double) $_POST[timesheet_add_hours];
$ts_hours = $timesheet_add_hours;
$timesheet_add_desc = CleanUp($_POST[timesheet_add_desc]);
$ts_desc = $timesheet_add_desc;
$timesheet_add_project = CleanUp($_POST[ts_project]);
$ts_project = $timesheet_add_project;
} else {
$nowtime = time();
// Process the incoming data
$timesheet_add_project = CleanUp($_POST[ts_project]);
$timesheet_add_hours = (double) $_POST[timesheet_add_hours];
$timesheet_add_desc = CleanUp($_POST[timesheet_add_desc]);
$timesheet_add_date = CleanUp($_POST[timesheet_add_date]);
$timesheet_add_day = date("j", $timesheet_add_date);
$timesheet_add_month = date("n", $timesheet_add_date);
$timesheet_add_year = date("Y", $timesheet_add_date);
// Establish the current overhead rate for the form submission
$sql1 = "SELECT * FROM intranet_timesheet_overhead order by overhead_date DESC LIMIT 1";
$result1 = mysql_query($sql1, $conn) or die(mysql_error());
$array1 = mysql_fetch_array($result1);
$overhead_rate_latest = $array1['overhead_rate'];
// Establish the current hourly rate for the form submission
$sql2 = "SELECT user_user_rate FROM intranet_user_details WHERE user_id = '{$viewuser}' LIMIT 1";
$result2 = mysql_query($sql2, $conn) or die(mysql_error());
$array2 = mysql_fetch_array($result2);
$rate_value_user = $array2['user_user_rate'];
// Calculate the total hourly rate
$rate_value = $rate_value_user;
示例15: load_array_dump
DUS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DUS. If not, see <http://www.gnu.org/licenses/>.
*/
// DUS is Dynamic UUID System for Prims
// W. Hager founder and project leader
include "dus-lib.php";
if (file_exists($DbName)) {
$DusArr = load_array_dump($DbName);
} else {
$DusArr = array();
}
if ($Methode == "UPD") {
CleanUp();
// remove old records TTL time out
if (array_key_exists($objectkey, $DusArr)) {
write_log("dus.log", "{$objectkey} Update");
} else {
write_log("dus.log", "{$objectkey} Create");
}
UpdateRecord($objectkey, $PrimUrl, $PrimTtl);
save_array_dump($DbName, $DusArr);
}
if ($UUID != "") {
write_log("dus.log", "{$UUID} Get url");
echo GetUrl($UUID);
}