function sendNotice($doc, $text) { //$doc = rawurlencode($doc); $text = rawurlencode($text); $time = rawurlencode(getTime()); $data = "notice|{$time}|{$text}\n"; return addData($doc, $data); }
function addNewAcufene() { include_once dirname(__FILE__) . '/database/handlerDb.php'; if (addData(array($_POST['id'], $_POST['email'], $_POST['indirizzo'], $_POST['contatto']))) { $return["status"] = "ok"; } else { $return["status"] = "error"; $return['errorInfo'] = $GLOBALS['errorSql']; } $return["json"] = json_encode($return); echo json_encode($return); }
while ($row = mysql_fetch_array($querry)) { $table_users = $row['username']; if ($username == $table_users) { return true; } } return false; } function addData($username, $password, $email) { if (!checkUser($username)) { if (mysql_query("INSERT INTO users (username, password, email) VALUES ('$username', '$password','$email')")) { return true; } } else { return false; } } if (getformData()) { require 'connect.php'; if (addData($username, $password, $email)) { echo "<script> alert('You're in, Welcome!'); </script>"; } else { echo "<script> alert('Something went wrong'); </script>"; } } ?> </body> </html>
function StaffReport() { global $sourcedir, $context, $txt, $smcFunc; require_once $sourcedir . '/Subs-Members.php'; // Fetch all the board names. $request = $smcFunc['db_query']('', ' SELECT id_board, name FROM {db_prefix}boards', array()); $boards = array(); while ($row = $smcFunc['db_fetch_assoc']($request)) { $boards[$row['id_board']] = $row['name']; } $smcFunc['db_free_result']($request); // Get every moderator. $request = $smcFunc['db_query']('', ' SELECT mods.id_board, mods.id_member FROM {db_prefix}moderators AS mods', array()); $moderators = array(); $local_mods = array(); while ($row = $smcFunc['db_fetch_assoc']($request)) { $moderators[$row['id_member']][] = $row['id_board']; $local_mods[$row['id_member']] = $row['id_member']; } $smcFunc['db_free_result']($request); // Get a list of global moderators (i.e. members with moderation powers). $global_mods = array_intersect(membersAllowedTo('moderate_board', 0), membersAllowedTo('approve_posts', 0), membersAllowedTo('remove_any', 0), membersAllowedTo('modify_any', 0)); // How about anyone else who is special? $allStaff = array_merge(membersAllowedTo('admin_forum'), membersAllowedTo('manage_membergroups'), membersAllowedTo('manage_permissions'), $local_mods, $global_mods); // Make sure everyone is there once - no admin less important than any other! $allStaff = array_unique($allStaff); // This is a bit of a cop out - but we're protecting their forum, really! if (count($allStaff) > 300) { fatal_lang_error('report_error_too_many_staff'); } // Get all the possible membergroups! $request = $smcFunc['db_query']('', ' SELECT id_group, group_name, online_color FROM {db_prefix}membergroups', array()); $groups = array(0 => $txt['full_member']); while ($row = $smcFunc['db_fetch_assoc']($request)) { $groups[$row['id_group']] = empty($row['online_color']) ? $row['group_name'] : '<span style="color: ' . $row['online_color'] . '">' . $row['group_name'] . '</span>'; } $smcFunc['db_free_result']($request); // All the fields we'll show. $staffSettings = array('position' => $txt['report_staff_position'], 'moderates' => $txt['report_staff_moderates'], 'posts' => $txt['report_staff_posts'], 'last_login' => $txt['report_staff_last_login']); // Do it in columns, it's just easier. setKeys('cols'); // Get each member! $request = $smcFunc['db_query']('', ' SELECT id_member, real_name, id_group, posts, last_login FROM {db_prefix}members WHERE id_member IN ({array_int:staff_list}) ORDER BY real_name', array('staff_list' => $allStaff)); while ($row = $smcFunc['db_fetch_assoc']($request)) { // Each member gets their own table!. newTable($row['real_name'], '', 'left', 'auto', 'left', 200, 'center'); // First off, add in the side key. addData($staffSettings); // Create the main data array. $staffData = array('position' => isset($groups[$row['id_group']]) ? $groups[$row['id_group']] : $groups[0], 'posts' => $row['posts'], 'last_login' => timeformat($row['last_login']), 'moderates' => array()); // What do they moderate? if (in_array($row['id_member'], $global_mods)) { $staffData['moderates'] = '<em>' . $txt['report_staff_all_boards'] . '</em>'; } elseif (isset($moderators[$row['id_member']])) { // Get the names foreach ($moderators[$row['id_member']] as $board) { if (isset($boards[$board])) { $staffData['moderates'][] = $boards[$board]; } } $staffData['moderates'] = implode(', ', $staffData['moderates']); } else { $staffData['moderates'] = '<em>' . $txt['report_staff_no_boards'] . '</em>'; } // Next add the main data. addData($staffData); } $smcFunc['db_free_result']($request); }
General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. The GNU General Public License is contained in the file COPYING. */ session_start(); include "../include/projectlib.inc.php"; includeHeaders(); $Connect = processInputData(); $flag = ""; if (isset($_GET['add'])) { $flag = addData(); echo $flag; } else { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <?php includeJs(); includeCss(); ?> <script type="text/javascript"> <!-- var isSubmit = true; function validateGMOForm() {
$text = str_replace("---", " - - ", $text); $text = str_replace("listado-log-log", "listado log log", $text); $name = str_replace("---", " - - ", $name); //the message is cut of after 500 letters if (strlen($text) > 500) { $text = substr($text, 0, 500); } //to allow for linebreaks a space is inserted every 50 letters $text = preg_replace("/([^\\s]{50})/", "\$1 ", $text); //the name is shortened to 30 letters if (strlen($name) > 30) { $name = substr($name, 0, 30); } //only if a name and a message have been provides the information is added to the db if ($name != '' && $text != '') { addData($name, $text); //adds new data to the database //getID(50); //some database maintenance } //adds new data to the database function addData($name, $text) { global $db; logea($text, 'CHAT', $_SESSION["usuario"]); $result = $db->get_results("select * from log where log_tipo = 'CHAT' order by log_fecha desc limit 60,10"); $row = 0; while (isset($result[$row]->log_id)) { $res = $db->get_var("delete from log where log_id= '" . $result[$row]->log_id . "'"); $row++; } }
function addCommentData($tbl, $data = NULL) { $count = count($data['comment_text']); for ($i = 0; $i < $count; $i++) { $row = array(); $row['comment_text'] = $data['comment_text'][$i]; $row['posted_user_url'] = $data['posted_user_url'][$i]; $row['posted_user_name'] = $data['posted_user_name'][$i]; $row['posted_date'] = $data['posted_date'][$i]; $row['video_info_id'] = $data['video_info_id']; addData($tbl, $row); } }
} function uploadFile() { global $location, $name, $size, $time, $date; if (checkfileType() && $size < 4194304) { $location = "../uploads/" . $_FILES['file']['name']; $name = $_FILES['file']['tmp_name']; if (is_uploaded_file($name)) { move_uploaded_file($name, $location); addtoServer($time, $date, $location); return true; } } return false; } function addtoServer($time, $date, $location) { $status = isPublic(); $user = $_SESSION['user']; mysql_query("INSERT INTO list(time_posted, date_posted, file_location, user, status) VALUES ('{$time}', '{$date}', '{$location}', '{$user}', '{$status}')") or die("Could not insert image into data base" . mysql_error()); } if (isset($_POST["text-post"])) { $data = getData(getformName()); $user = $_SESSION['user']; addData(getTable(), $data, $time, $date, $user); } else { if ($_POST["file"]) { uploadFile(); } } header("location: home.php");
<?php /** Error reporting */ error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); define('EOL', PHP_SAPI == 'cli' ? PHP_EOL : '<br />'); date_default_timezone_set('Europe/London'); /** PHPExcel_IOFactory */ global $objPHPExcel; require_once '../../ppt/Classes/PHPExcel/IOFactory.php'; $objReader = PHPExcel_IOFactory::createReader('Excel2007'); $objPHPExcel = $objReader->load("templates/product_kbi_export_template.xlsx"); //############################ FUNCTION INTERFACE #################################################### $dataArr = (array) json_decode($_REQUEST['dataArr']); addData($dataArr); saveAndDownload(); //**************************************************************************************************** function addData($data) { global $objPHPExcel; $baseRow = 5; foreach ($data as $r => $dataRow) { $row = $baseRow + (int) $r; $objPHPExcel->getActiveSheet()->setCellValue('A' . $row, $dataRow->TPNB)->setCellValue('B' . $row, $dataRow->SKU)->setCellValue('C' . $row, $dataRow->VOL_TP)->setCellValue('D' . $row, $dataRow->VOL_PP_VAR)->setCellValue('E' . $row, $dataRow->VOL_PP_VAR_PCT)->setCellValue('F' . $row, $dataRow->VOL_LY_VAR)->setCellValue('G' . $row, $dataRow->VOL_LY_VAR_PCT)->setCellValue('H' . $row, $dataRow->VOL_TP_SHARE)->setCellValue('I' . $row, $dataRow->VOL_PP_SHARE)->setCellValue('J' . $row, $dataRow->VOL_LY_SHARE)->setCellValue('K' . $row, $dataRow->VAL_TP)->setCellValue('L' . $row, $dataRow->VAL_PP_VAR)->setCellValue('M' . $row, $dataRow->VAL_PP_VAR_PCT)->setCellValue('N' . $row, $dataRow->VAL_LY_VAR)->setCellValue('O' . $row, $dataRow->VAL_LY_VAR_PCT)->setCellValue('P' . $row, $dataRow->VAL_TP_SHARE)->setCellValue('Q' . $row, $dataRow->VAL_PP_SHARE)->setCellValue('R' . $row, $dataRow->VAL_LY_SHARE)->setCellValue('S' . $row, $dataRow->PRICE_TP)->setCellValue('T' . $row, $dataRow->PRICE_PP)->setCellValue('U' . $row, $dataRow->PRICE_LY)->setCellValue('V' . $row, $dataRow->DIST_TP)->setCellValue('W' . $row, $dataRow->DIST_PP)->setCellValue('X' . $row, $dataRow->DIST_LY); //DIST_LY } $objPHPExcel->getActiveSheet()->removeRow($baseRow - 1, 1); } //---------------------------------------- SAVES AND DOWNLOADS EXCEL FILE -------------------------------------- function saveAndDownload()
} if ($http_allowed == 'yes') { addData($basedir . $session . "/http_allowed.txt", $proxy); $out['http_allowed']++; } if ($https_allowed == 'no') { echo "\t [HTTPS]"; addData($basedir . $session . "/https_forbidden.txt", $proxy); $out['https_forbidden']++; $bad = true; } else { $out['https_allowed']++; } if (!$bad) { echo " [GOOD]"; addData($basedir . $session . "/good.txt", $proxy); } echo "\n"; } else { echo " \r"; $out['down']++; } } echo "\n============ STATS ==============\n"; echo "Proxies tested:\t" . $out['tested'] . "\n"; echo "Online:\t" . $out['up'] . "\n"; echo "Offline:\t" . $out['down'] . "\n"; echo "HTTP only\t" . $out['https_forbidden'] . "\n"; echo "Altered JS\t" . $out['altered_js'] . "\n"; echo "Altered HTML\t" . $out['altered_html'] . "\n"; echo "IP not hidden\t" . $out['nonaltered_ip'] . "\n";
<?php require 'include/overall/header.php'; error_reporting(0); require 'core/database/connect.php'; require 'core/function/users.php'; if (empty($_POST) === false) { $name = $_POST['name']; $contact = $_POST['contact']; $email = $_POST['email']; $place = $_POST['place']; $comment = $_POST['comment']; $category = $_POST['category']; $order = $_POST['order']; addData($name, $order, 'Negotiate', 'None', $contact, $email, $place, $comment, $category, $order); } ?> <div class="collapse navbar-collapse" id="my-navbar"> <ul class="nav navbar-nav"> <li><a href="./">Home</a></li><li > <a href="cakes.php">Cakes</a></li><li> <a href="service.php">Services</a></li><li class="active"> <a href="contact.php">Contact Us</a></li><li> <a href="about.php">About</a></li><li> </ul> </div> </div> <img src="images/tarp.png" alt="Responsive image"style="position:fixed; margin-top: 0px"> </div>
$tell = filter_input(INPUT_POST, 'telephone'); $street = filter_input(INPUT_POST, 'street'); $town = filter_input(INPUT_POST, 'town'); $state = filter_input(INPUT_POST, 'state'); $zipcode = filter_input(INPUT_POST, 'zip'); $website = filter_input(INPUT_POST, 'website'); $birthday = filter_input(INPUT_POST, 'birthday'); $message = checkData($address_id, $firstName, $lastName, $birthday, $email, $street, $town, $state, $tell, $zipcode); try { $image = uploadImage('upfile'); } catch (RuntimeException $ex) { $image = ''; } $address = $street . "|" . $town . "|" . $state . "|" . $zipcode; if (!empty($tell) && !empty($email) && !empty($fullName) && !empty($address_id) && !empty($address) && !empty($birthday) && empty($message)) { addData($address_id, $fullName, $email, $tell, $address, $website, $birthday, $image); header("Location: index.php"); } } else { $address_id = NULL; $fullName = NULL; $email = NULL; $tell = NULL; $street = NULL; $town = NULL; $state = NULL; $zipcode = NULL; $website = NULL; $birthday = NULL; $image = NULL; }
<?php session_start(); require '../include/config.php'; require '../functions/functions_checkuser.php'; header("Content-type:text/html;charset=UTF-8"); $select = isset($_GET['select']) ? $_GET['select'] : ''; switch ($select) { case 'add': addData(); break; case 'edit': editData(); break; case 'del': deleteData(); break; case 'delimg': deleteImg(); break; default: header('Location: ../index.php'); break; } /* Add a user */ function addData() { require '../include/config.php'; $user_name = $_POST['txtusername'];
/** * Report for showing all the forum staff members - quite a feat! * functions ending with "Report" are responsible for generating data * for reporting. * they are all called from action_index. * never access the context directly, but use the data handling * functions to do so. */ public function action_staff() { global $txt; require_once SUBSDIR . '/Members.subs.php'; require_once SUBSDIR . '/Boards.subs.php'; require_once SUBSDIR . '/Membergroups.subs.php'; // Fetch all the board names. $boards = fetchBoardsInfo('all'); $moderators = allBoardModerators(true); $boards_moderated = array(); foreach ($moderators as $id_member => $rows) { foreach ($rows as $row) { $boards_moderated[$id_member][] = $row['id_board']; } } // Get a list of global moderators (i.e. members with moderation powers). $global_mods = array_intersect(membersAllowedTo('moderate_board', 0), membersAllowedTo('approve_posts', 0), membersAllowedTo('remove_any', 0), membersAllowedTo('modify_any', 0)); // How about anyone else who is special? $allStaff = array_merge(membersAllowedTo('admin_forum'), membersAllowedTo('manage_membergroups'), membersAllowedTo('manage_permissions'), array_keys($moderators), $global_mods); // Make sure everyone is there once - no admin less important than any other! $allStaff = array_unique($allStaff); // This is a bit of a cop out - but we're protecting their forum, really! if (count($allStaff) > 300) { fatal_lang_error('report_error_too_many_staff'); } // Get all the possible membergroups! $all_groups = getBasicMembergroupData(array('all'), array(), null, false); $groups = array(0 => $txt['full_member']); foreach ($all_groups as $row) { $groups[$row['id']] = empty($row['online_color']) ? $row['name'] : '<span style="color: ' . $row['online_color'] . '">' . $row['name'] . '</span>'; } // All the fields we'll show. $staffSettings = array('position' => $txt['report_staff_position'], 'moderates' => $txt['report_staff_moderates'], 'posts' => $txt['report_staff_posts'], 'last_login' => $txt['report_staff_last_login']); // Do it in columns, it's just easier. setKeys('cols'); // Get the latest activated member's display name. $result = getBasicMemberData($allStaff, array('moderation' => true, 'sort' => 'real_name')); foreach ($result as $row) { // Each member gets their own table!. newTable($row['real_name'], '', 'left', 'auto', 'left', 200, 'center'); // First off, add in the side key. addData($staffSettings); // Create the main data array. $staffData = array('position' => isset($groups[$row['id_group']]) ? $groups[$row['id_group']] : $groups[0], 'posts' => $row['posts'], 'last_login' => standardTime($row['last_login']), 'moderates' => array()); // What do they moderate? if (in_array($row['id_member'], $global_mods)) { $staffData['moderates'] = '<em>' . $txt['report_staff_all_boards'] . '</em>'; } elseif (isset($boards_moderated[$row['id_member']])) { // Get the names foreach ($boards_moderated[$row['id_member']] as $board) { if (isset($boards[$board])) { $staffData['moderates'][] = $boards[$board]['name']; } } $staffData['moderates'] = implode(', ', $staffData['moderates']); } else { $staffData['moderates'] = '<em>' . $txt['report_staff_no_boards'] . '</em>'; } // Next add the main data. addData($staffData); } }
require 'database/connect.php'; require 'core/database/connect.php'; require 'core/function/users.php'; error_reporting(0); if (empty($_GET['name']) === false) { $name = $_GET['name']; $items = $_GET['items']; $price = $_GET['price']; $quantity = $_GET['quantity']; $contact = $_GET['contact']; $email = $_GET['email']; $place = $_GET['place']; $comment = $_GET['comment']; $category = $_GET['category']; $order = $_GET['order_type']; addData($name, $items, $price, $quantity, $contact, $email, $place, $comment, $category, $order); } ?> <div class="collapse navbar-collapse" id="my-navbar"> <ul class="nav navbar-nav"> <li><a href="./">Home</a></li><li > <a href="cakes.php">Cakes</a></li><li> <a href="service.php">Services</a></li><li> <a href="contact.php">Contact Us</a></li><li> <a href="about.php">About</a></li><li> </ul> </div> </div> <img src="images/tarp.png" alt="Responsive image"style="position:fixed; margin-top: 0px"> </div>
# the message is cut of after 500 letters if (strlen($text) > 500) { $text = substr($text, 0, 500); } # to allow for linebreaks a space is inserted every 50 letters //$text = preg_replace("/([^\s]{50})/","$1 ",$text); /* # the name is shortened to 30 letters if (strlen($name) > 30) { $name = substr($name, 0,30); } */ require_once "conn.php"; # only if a name and a message have been provided the information is added to the db if ($name != '' && $text != '' && $uid != '' && $toid != '') { addData($name, $text, $uid, $toid, $pchat); # adds new data to the database getID(50); # some database maintenance } # adds new data to the database function addData($name, $text, $uid, $toid, $pchat) { include "../include/settings.php"; # getting table prefix $now = time(); $prv = "yes"; $sql = "INSERT INTO {$TABLE_PREFIX}chat (time,name,text,uid,fromid,toid,private,pchat) VALUES ('" . $now . "','" . $name . "','" . $text . "','" . $uid . "','" . $uid . "','" . $toid . "','" . $prv . "'," . $pchat . ")"; $conn = getDBConnection(); if ($GLOBALS['charset'] == "UTF-8" && function_exists('mysql_set_charset')) { mysql_set_charset('utf8', $conn);
The GNU General Public License is contained in the file COPYING. */ session_start(); include "../include/projectlib.inc.php"; includeHeaders(); $Connect = processInputData(); isLoggedin(); $authorise = isAuthorize(); $flag = ""; if (isset($_POST['Submit'])) { if (isset($_POST['Id'])) { $id = $_POST['Id']; $poId = $_POST['poId']; $newPoId = $_POST['newPoId']; } $flag = addData($_SESSION['userName'], $id, $poId, $newPoId); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <?php includeJs(); includeCss(); ?> <script type="text/javascript"> <!-- var addPoWindow = null; function validatePOForm() { divout = true;
# the message is cut of after 500 letters if (strlen($text) > 500) { $text = substr($text, 0, 500); } # to allow for linebreaks a space is inserted every 50 letters $text = preg_replace("/([^\\s]{50})/", "\$1 ", $text); /* # the name is shortened to 30 letters if (strlen($name) > 30) { $name = substr($name, 0,30); } */ require_once "conn.php"; # only if a name and a message have been provided the information is added to the db if ($name != '' && $text != '' && $uid != '') { addData($name, $text, $uid); # adds new data to the database getID(50); # some database maintenance } # adds new data to the database function addData($name, $text, $uid) { include "../include/settings.php"; # getting table prefix $now = time(); $sql = "INSERT INTO {$TABLE_PREFIX}chat (time,name,text,uid) VALUES ('" . $now . "','" . $name . "','" . $text . "','" . $uid . "')"; $conn = getDBConnection(); $results = mysql_query($sql, $conn); if (!$results || empty($results)) { # echo 'There was an error creating the entry';
$command = $_POST["command"]; $parts = explode("/", $command); // update/game/day switch ($parts[0]) { case "update": // update/game/day if (isset($_POST['data']) && $auth == $authServer) { updateData(array_slice($parts, 1), json_decode($data)); } else { die("1Error: no data provided."); } break; case "create": // create/season if (isset($_POST['data']) && $auth == $authServer) { addData(array_slice($parts, 1), $data); } else { die("2 Error: no data provided."); } break; case "get": // get/all $result = getData(array_slice($parts, 1), $data); header('Content-Type: application/json'); echo json_encode($result); break; default: die("Error: no command provided."); } } else { die("3 Error: no data provided.");
$tbl = "CSCCORE_DOWN_CENTRAL_GROUP"; $recId = $recNm = $recPrnt = ""; $valHdnFrm = '<input type="hidden" name="ask" value="' . base64_encode('ad') . '">'; if (isset($_REQUEST['ask'])) { $ask = base64_decode(trim($_REQUEST['ask'])); $psId = isset($_POST['txtId']) ? trim($_POST['txtId']) : ""; $psNm = isset($_POST['txtNm']) ? trim($_POST['txtNm']) : ""; if (isset($_POST['rdType']) && $_POST['rdType'] == '0') { $psPrnt = isset($psId) ? trim($psId) : ""; } else { $psPrnt = isset($_POST['cmbPrnt']) ? trim($_POST['cmbPrnt']) : ""; } switch ($ask) { case 'ad': $value = 'CSC_DC_ID="' . $psId . '", CSC_DC_NAME="' . $psNm . '", CSC_DC_PARENT="' . $psPrnt . '"'; $bOk = addData($DBLink, $tbl, $value); if ($bOk) { echo '<script>' . 'alert("Berhasil menambah data ' . $psId . ' - ' . $psNm . '.");' . 'location.href="index.php";' . '</script>'; } else { echo '<script>' . 'alert("GAGAL menambahkan data ' . $psId . ' - ' . $psNm . '.");' . 'location.href="index.php";' . '</script>'; } break; case 'ed': $valHdnFrm = '<input type="hidden" name="act" value="' . base64_encode('1') . '">'; $reqId = isset($_REQUEST['id']) ? base64_decode(trim($_REQUEST['id'])) : ""; $aDtId = getData($DBLink, $tbl, "*", "CSC_DC_ID='" . $reqId . "'", $ord = ""); if (isset($aDtId) && !empty($aDtId)) { foreach ($aDtId as $dtId) { $recId = $dtId['CSC_DC_ID']; $recNm = $dtId['CSC_DC_NAME']; $recPrnt = $dtId['CSC_DC_PARENT'];
checkC(); } </script> <?php if (empty($_GET['names']) === false) { $names = $_GET['names']; $itemss = $_GET['itemss']; $prices = $_GET['prices']; $quantitys = $_GET['quantitys']; $contacts = $_GET['contacts']; $emails = $_GET['emails']; $places = $_GET['places']; $comments = $_GET['comments']; $categorys = $_GET['categorys']; $orders = $_GET['order_types']; addData($names, $itemss, $prices, $quantitys, $contacts, $emails, $places, $comments, $categorys, $orders); } ?> <div class="modal fade order-modal-cake" tabindex="-1" role="dialog"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h2 class="modal-title" id="gridSystemModalLabel">Cake</h2> </div> <div class="container"> <div class="row" style="margin: 10px;"> <div class="col-md-4"> <form method="get"> <b><a data-toggle="collapse" data-target="#collapseOrder" aria-expanded="false" class="btn btn-default">Category <span class="caret" style="margin-bottom:3px; "></span></a></b> <button data-toggle="collapse" data-target="#col-fields" type="button" id="order-btn" class="fade btn btn-default" onclick="show();" style="margin-left: 180px; margin-bottom: 3px;">Order</button>
<?php include "admin_login.php"; include "dbinfo.php"; $product = "MakeupBrush"; if (isset($_POST['submit'])) { if (!session_id()) { session_start(); } $id = $_SESSION['s_id']; $type = $_SESSION['s_type']; addData($type, $id); } else { printForm(); } function checkPicture() { if (isset($_FILES['picture'])) { $file_name = $_FILES['picture']["name"]; $temp_name = $_FILES['picture']['tmp_name']; $target_path = "images/MakeupBrush/more/" . $file_name; $allowed = array('image/pjpeg', 'image/jpeg', 'image/JPG', 'image/X-PNG', 'image/PNG', 'image/png', 'image/x-png', 'image/gif'); if (in_array($_FILES['picture']['type'], $allowed)) { print "uploading files..."; if (move_uploaded_file($temp_name, $target_path)) { echo "<p><em>THe file has been uploaded </em?</p><br/> "; $picture = $_FILES['picture']['name']; print "{$picture}"; } } else { echo "<p class='error'>Please upload a JPEG, GIF or PNG image.</p>";
<?php if ($_POST['submit'] == "Submit") { $email = cleanData($_POST['email']); $first = cleanData($_POST['first']); $last = cleanData($_POST['last']); $mobile = cleanData($_POST['mobile']); $image = cleanData($_POST['image']); //print "Data cleaned"; addData($email, $first, $last, $mobile, $image); } else { printForm(); } function claenData($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); $data = strip_tags($data); return $data; } function addData($email, $first, $last, $mobile, $image) { //print "ready to add data"; include "mili.php"; } function printForm() { //displays the html form $pageTitle = "Add a Contact"; include "header.php";
<?php header('Content-Type: text/html; charset=utf-8'); $n = $_POST["name"]; $d = $_POST["detail"]; $p = $_POST["price"]; $q = $_POST["qty"]; addData($n, $d, $p, $q); function connectDB($host, $user, $pass, $db_name) { $conn = mysqli_connect($host, $user, $pass); if (!$conn) { return false; } $result = mysqli_select_db($conn, $db_name); if (!$result) { return false; } return $conn; } function sendResponse($status, $message) { echo $status . "|" . $message; } function addData($name, $detail, $price, $qty) { $conn = connectDB("localhost", "root", "root", "dbData"); if (!$conn) { sendResponse("error", "เกิดปัญหาในการติดต่อฐานข้อมูล"); return; }
require "admin_login.php"; $product = "NailAccessories"; $typenum = '7'; //need to change h2 at line 116 //change num at 89 //change path in 33 //change path at 101 //change num at 102 if (isset($_POST['submit'])) { $name = cleanData($_POST['name']); $code = cleanData($_POST['code']); $price = cleanData($_POST['price']); $description = cleanData($_POST['description']); //print "Data cleaned"; addData($name, $code, $price, $description); } else { printform(); } function cleanData($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); $data = strip_tags($data); return $data; } function checkPicture() { if (isset($_FILES['picture'])) { $file_name = $_FILES['picture']["name"];
} if (empty($_POST["phone_number"])) { $phone_number_error = "See väli on kohustuslik"; } else { $phone_number = cleanInput($_POST["phone_number"]); } if (empty($_POST["register_code"])) { $register_code_error = "See väli on kohustuslik"; } else { $register_code = cleanInput($_POST["register_code"]); } // mõlemad on kohustuslikud if ($address_error == "" && $name_error == "" && $phone_number_error == "" && $register_code_error == "") { //salvestate ab'i fn kaudu addNote //message funktioonist $msg = addData($name, $address, $phone_number, $register_code); if ($msg != "") { //õnnestus, teeme inputi väljad tühjaks $name = ""; $address = ""; $phone_number = ""; $register_code = ""; echo $msg; } } } function cleanInput($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data);
// Host: about.com // http://192.168.0.40/homewatch/index.php?channel=1&temp=165&humidity=80&datetime=010120131234 if ($DEBUG) { print "<pre>"; print_r($_GET); print "</pre>"; } openDB(); if (isset($_GET['channel']) && isset($_GET['temp']) && isset($_GET['humidity'])) { if ($DEBUG) { echo "<p>addData()"; } $c = $_GET['channel']; $t = $_GET['temp']; $h = $_GET['humidity']; addData($c, $t, $h); if ($DEBUG) { echo "<p>all done"; } //listData(); echo "<p>OK updated data for channel:" . $c . "</p>"; } else { if ($DEBUG) { echo "listData()"; } //listData(); //echo "<p>missing arg"; } echo "<p><a href='linechart_hour.php'>Stunden-Übersicht</a></p>"; echo "<p><a href='barchart_days.php'>Tages-Übersicht</a></p>"; echo "<p><a href='http://www.unwetterzentrale.de/uwz/getwarning_de.php?plz=41363&uwz=UWZ-DE&lang=de'>Unwetterwarnungen Jüchen</a></p>";
function updateStats(&$dbw, &$dbr, $startDate = null, $endDate = null) { global $table; $stats = array(); if ($endDate == null) { $start = time(); $now = wfTimestamp(TS_MW, $start - 60 * 60 * 24 * 7); // 7 days } else { $now = $endDate; } //get edits $sql = "SELECT rev_user from revision, page WHERE page_id = rev_page AND page_namespace = 0"; if ($startDate != null) { $sql = $sql . " AND rev_timestamp > '{$startDate}'"; } if ($endDate != null) { $sql = $sql . " AND rev_timestamp <= '{$endDate}'"; } $lastTime = microtime(true); echo "Running query at " . $lastTime . "\n"; echo $sql . "\n"; $res = $dbr->query($sql, __METHOD__); $newTime = microtime(true); echo "Query done at " . $newTime . " for a total time of " . ($newTime - $lastTime) . "\n"; while ($row = $dbr->fetchObject($res)) { addData($stats, $row->rev_user, 'edits'); } echo "Done parsing revision data. There are " . count($stats) . " number of rows to update.\n"; //get articles created $sql = "SELECT fe_user from firstedit WHERE "; if ($startDate != null) { $sql = $sql . " fe_timestamp > '{$startDate}'"; } if ($startDate != null && $endDate != null) { $sql = $sql . " AND "; } if ($endDate != null) { $sql = $sql . " fe_timestamp <= '{$endDate}'"; } $lastTime = microtime(true); echo "Running query at " . $lastTime . "\n"; echo $sql . "\n"; $res = $dbr->query($sql, __METHOD__); $newTime = microtime(true); echo "Query done at " . $newTime . " for a total time of " . ($newTime - $lastTime) . "\n"; while ($row = $dbr->fetchObject($res)) { addData($stats, $row->fe_user, 'created'); } echo "Done getting first edit data. Total number of rows to update: " . count($stats) . "\n"; //get NAB $sql = "SELECT log_user from logging WHERE log_type='nap' "; if ($startDate != null) { $sql = $sql . " AND log_timestamp > '{$startDate}'"; } if ($endDate != null) { $sql = $sql . " AND log_timestamp <= '{$endDate}'"; } $lastTime = microtime(true); echo "Running query at " . $lastTime . "\n"; echo $sql . "\n"; $res = $dbr->query($sql, __METHOD__); $newTime = microtime(true); echo "Query done at " . $newTime . " for a total time of " . ($newTime - $lastTime) . "\n"; while ($row = $dbr->fetchObject($res)) { addData($stats, $row->log_user, 'nab'); } echo "Done getting nab data. Total number of rows to update: " . count($stats) . "\n"; //get Patrol $sql = "SELECT log_user from logging WHERE log_type='patrol' "; if ($startDate != null) { $sql = $sql . " AND log_timestamp > '{$startDate}'"; } if ($endDate != null) { $sql = $sql . " AND log_timestamp <= '{$endDate}'"; } $lastTime = microtime(true); echo "Running query at " . $lastTime . "\n"; echo $sql . "\n"; $res = $dbr->query($sql, __METHOD__); $newTime = microtime(true); echo "Query done at " . $newTime . " for a total time of " . ($newTime - $lastTime) . "\n"; while ($row = $dbr->fetchObject($res)) { addData($stats, $row->log_user, 'patrol'); } echo "Done getting patrol data. Total number of rows to update: " . count($stats) . "\n"; //now put all that data back into the editor_stats table $lastTime = microtime(true); echo "Starting update table at " . $lastTime . "\n"; foreach ($stats as $userid => $data) { $sql = "INSERT INTO {$table} (es_user, es_edits, es_created, es_nab, es_patrol, es_timestamp) VALUES (" . $userid . ", {$data['edits']}, {$data['created']}, {$data['nab']}, {$data['patrol']}, '{$now}') ON DUPLICATE KEY UPDATE es_edits = es_edits + {$data['edits']}, es_created = es_created + {$data['created']}, es_nab = es_nab + {$data['nab']}, es_patrol = es_patrol + {$data['patrol']}, es_timestamp = '{$now}'"; $dbw->query($sql, __METHOD__); } $newTime = microtime(true); echo "Finished updateStats at " . microtime(true) . " with update taking " . ($newTime - $lastTime) . "\n"; }
02111-1307, USA. The GNU General Public License is contained in the file COPYING. */ session_start(); include "../include/projectlib.inc.php"; includeHeaders(); $Connect = processInputData(); isLoggedin(); $authorise = isAuthorize(); $flag = ""; if (isset($_POST['Submit'])) { if (isset($_POST['Id'])) { $id = $_POST['Id']; } $flag = addData($_SESSION['userName'], $id); } if (isset($_GET['distId'])) { $distid = $_GET['distId']; $displayContent = selectPostOffice($distid); echo $displayContent; } else { if (isset($_GET['neardistId1'])) { $distid1 = $_GET['neardistId1']; $displayContent = selectNearPostOffice($distid1); echo $displayContent; } else { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head>
<?php if ($_POST['submit'] == "Submit") { $name = cleanData($_POST['name']); $image = cleanData($_POST['image']); print "data cleaned" . $name . " + " . $image; addData($name, $image); } function cleanData($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); $data = strip_tags($data); return $data; } function addData($name, $image) { // include("db.php"); $image = checkUpload(); print $image; // $sql = "INSERT INTO images VALUES('$name', '$image')"; // $result = mysql_query($sql) or die (mysql_error()); print "Ready to add data"; echo "<img src='http://images.jeffreyeverhart.com/images/" . $image . "'/>"; } function printForm() { print <<<HERE \t<h2>Image Form</h2> \t<form id="myForm" method="POST" enctype="multipart/form-data">