function getOrders() { //создаем первый/основной пустой массив $allorders = array(); //создаем и заполняем массив данными из файла $info_from_file = file(ORDERS_LOG); //создаем второй массив 2го уровня вложености в первый $orderinfo = array(); //перебираем массив с данными из файла и этими данными заполняем массив 2го уровня вложености foreach ($info_from_file as $item) { //каждую строку разделяем на переменные list($n, $e, $t, $a, $c, $dt) = explode('|', $item); //и каждую переменную вкладываем в отдельную ячейку 2го массива $orderinfo['name'] = $n; $orderinfo['mail'] = $e; $orderinfo['tel'] = $t; $orderinfo['addr'] = $a; $orderinfo['cust'] = $c; $orderinfo['datetime'] = $dt; $sql = "SELECT * FROM orders WHERE datetime = '{$orderinfo['datetime']}' AND customer = '{$orderinfo['cust']}'"; $res = mysql_query($sql) or die(mysql_error()); $orderinfo['tovari_v_zakaze'] = convertData($res); //после заполнения массива orderinfo данными покупателя из файла - //вкладываем масиив $orderinfo в ячейку $allorders[] и идем перебирать следующую строку из файла $allorders[] = $orderinfo; } return $allorders; }
function grabData($filename) { $rowNumber = 0; if (($handle = fopen($filename, "r")) !== FALSE) { while (($data = fgetcsv($handle, 0, ",")) !== FALSE) { //pp($rowNumber); // //-----------------------------------------------------------------------convert to usable array $convertedData = convertData($data, $rowNumber); // //-----------------------------------------------------------------------create new file location makePath($convertedData); // //-----------------------------------------------------------------------if tiff convert to pdf and move to new location convertAndCreate($convertedData); // //-----------------------------------------------------------------------crates xml file createXMLFile($convertedData); //Needs file create first //ppr($convertedData); $rowNumber++; } // add 1 to row number and reepeat on next line of data } //Close file fclose($handle); }
function getOrders() { if (!file_exists(ORDERS_LOG)) { return false; } else { $allorders = array(); $orders = file(ORDERS_LOG); foreach ($orders as $order) { list($name, $mail, $tel, $address, $customer, $tm) = explode('|', $order); $orderinfo = array(); $orderinfo['name'] = $name; $orderinfo['tel'] = $tel; $orderinfo['addr'] = $address; $orderinfo['cust'] = $customer; $orderinfo['tm'] = $tm; $sql = "SELECT * FROM orders WHERE customer = '{$customer}'\n\t\t\t\tAND datetime = '{$orderinfo['tm']}'"; $res = mysql_query($sql) or die(mysql_error()); $orderinfo['goods'] = convertData($res); $allorders[] = $orderinfo; } } return $allorders; }
$links = $newsDetail->news_links[0]; $rss = $newsDetail->news_rss[0]; } } else { // case of adding news if ($action == "add") { //test if name blank if ($title == "") { $error = $strings["blank_newsdesk_title"]; } else { //replace quotes by html code in name and address $title = convertData($title); if (get_magic_quotes_gpc() != 1) { $content = addslashes($content); } $author = convertData($author); //insert into organizations and redirect to new client organization detail (last id) $tmpquery1 = "INSERT INTO " . $tableCollab["newsdeskposts"] . "(title,author,related,content,links,rss,pdate) VALUES ('{$title}', '{$author}', '{$related}', '" . addslashes($content) . "', '{$links}', '{$rss}', NOW())"; connectSql("{$tmpquery1}"); $tmpquery = $tableCollab["newsdeskposts"]; last_id($tmpquery); $num = $lastId[0]; unset($lastId); headerFunction("../newsdesk/viewnews.php?id={$num}&msg=add&" . session_name() . "=" . session_id()); } } } // htmlArea 3.0 initialization $headBonus = "\t\n\t\t\t<script type='text/javascript'> \n\t\t\t _editor_url = '../includes/htmlarea/'; \n\t\t\t</script> \n\n\t\t\t<script type='text/javascript' src='../includes/htmlarea/htmlarea.js'></script>\n\t\t\t<script type='text/javascript' src='../includes/htmlarea/lang/{$lang}.js'></script>\n\t\t\t<script type='text/javascript' src='../includes/htmlarea/dialog.js'></script>\n\t\t\t<script type='text/javascript' src='../includes/htmlarea/popupdiv.js'></script>\n\t\t\t<script type='text/javascript' src='../includes/htmlarea/popupwin.js'></script> \n\t\t\t\n\t\t\t<style type='text/css'>@import url(../includes/htmlarea/htmlarea.css)</style>\n\n\n\t\t\t \n\t\t\t \n\t\t\t<script type='text/javascript'>\n\n\t\t\t\tHTMLArea.loadPlugin('TableOperations'); \n\t\t\t\t\n\t\t\t\tvar editor = null;\n\t\t\t\t\n\t\t\t\tfunction initEditor() {\n\t\t\t\t editor = new HTMLArea('content');\n \t\t\t editor.registerPlugin('TableOperations');\n\t\t\t\t editor.generate();\n\t\t\t\t}\n\n\t\t\t</script>\n\t\t\t"; $bodyCommand = "onload='initEditor();'"; // end
headerFunction("../newsdesk/viewnews.php?id={$postid}&msg=removeComment&" . session_name() . "=" . session_id()); } else { //set value in form $name = $commentDetail->newscom_name[0]; $comment = $commentDetail->newscom_comment[0]; } } else { // case of adding new post if ($action == "add") { //test if name blank if ($comment == "") { $error = $strings["blank_newsdesk_comment"]; } else { //replace quotes by html code in name and address $name = convertData($name); $comment = convertData($comment); //insert into organizations and redirect to new client organization detail (last id) $tmpquery1 = "INSERT INTO " . $tableCollab["newsdeskcomments"] . "(name,post_id,comment) VALUES ('{$name}','{$postid}' , '" . addslashes($comment) . "')"; connectSql("{$tmpquery1}"); $tmpquery = $tableCollab["newsdeskcomments"]; last_id($tmpquery); $num = $lastId[0]; unset($lastId); headerFunction("../newsdesk/viewnews.php?id={$postid}&msg=add&" . session_name() . "=" . session_id()); } } } include '../themes/' . THEME . '/header.php'; $tmpquery2 = "WHERE news.id = '{$postid}'"; $newsDetail = new request(); $newsDetail->openNewsDesk($tmpquery2);
* This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ $checkSession = true; require_once "../includes/library.php"; $tmpquery = "WHERE sr.id = '{$id}'"; $requestDetail = new request(); $requestDetail->openSupportRequests($tmpquery); if ($requestDetail->sr_project[0] != $_SESSION['projectSession'] || $requestDetail->sr_user[0] != $_SESSION['idSession']) { header("Location: index.php"); exit; } if ($action == "add") { $mes = convertData($mes); $tmpquery1 = "INSERT INTO " . $tableCollab["support_posts"] . "(request_id,message,date,owner,project) VALUES('{$id}','{$mes}','{$dateheure}','" . $_SESSION['idSession'] . "','" . $requestDetail->sr_project[0] . "')"; connectSql("{$tmpquery1}"); $tmpquery = $tableCollab["support_posts"]; last_id($tmpquery); $num = $lastId[0]; unset($lastId); if ($notifications == "true") { if ($mes != "") { require_once "../support/noti_newpost.php"; } } header("Location: suprequestdetail.php?id={$id}"); exit; } $bouton[6] = "over";
*/ $checkSession = true; require_once "../includes/library.php"; if ($action == "update") { if ($logout_time < "30" && $logout_time != "0" || !is_numeric($logout_time)) { $logout_time = "30"; } $fn = convertData($fn); $tit = convertData($tit); $em = convertData($em); $wp = convertData($wp); $hp = convertData($hp); $mp = convertData($mp); $fax = convertData($fax); $logout_time = convertData($logout_time); $start_page = convertData($start_page); $tmpquery = "UPDATE " . $tableCollab["members"] . " SET name='{$fn}',title='{$tit}',email_work='{$em}',phone_work='{$wp}',phone_home='{$hp}',mobile='{$mp}',fax='{$fax}',logout_time='{$logout_time}',timezone='{$tz}',last_page='{$start_page}' WHERE id = '" . $_SESSION['idSession'] . "'"; connectSql($tmpquery); // save to the session $_SESSION['logouttimeSession'] = $logout_time; $_SESSION['timezoneSession'] = $tz; $_SESSION['dateunixSession'] = date("U"); $_SESSION['nameSession'] = $fn; // if mantis bug tracker enabled if ($enableMantis == "true") { // Call mantis function for user profile changes..!!! require_once "../mantis/user_profile.php"; } header("Location: ../preferences/updateuser.php?msg=update"); exit; }
// $Revision: 1.3 $ /* vim: set expandtab ts=4 sw=4 sts=4: */ /** * $Id: docitemapproval.php,v 1.3 2004/12/22 22:16:31 madbear Exp $ * * Copyright (c) 2003 by the NetOffice developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ $checkSession = true; require_once "../includes/library.php"; if ($action == "update") { $commentField = convertData($commentField); $tmpquery1 = "UPDATE " . $tableCollab["files"] . " SET comments_approval='{$commentField}',date_approval='{$dateheure}',approver='" . $_SESSION['idSession'] . "',status='{$statusField}' WHERE id = '{$id}'"; connectSql("{$tmpquery1}"); $msg = "updateFile"; header("Location: doclists.php"); exit; } $tmpquery = "WHERE fil.id = '{$id}'"; $fileDetail = new request(); $fileDetail->openFiles($tmpquery); if ($fileDetail->fil_published[0] == "1" || $fileDetail->fil_project[0] != $_SESSION['projectSession']) { header("Location: index.php"); exit; } $bouton[4] = "over"; $titlePage = $strings["approval_tracking"];
$dsn = 'mysql:host=localhost;dbname=opmigrate'; $user = '******'; $password = '******'; try { $conn = new PDO($dsn, $user, $password); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { echo $e->getMessage(); } //$sqlComm = "SELECT * FROM OP WHERE numop='$op'"; $sqlComm = "select prod.codigo,prod.pacote,prod.ean,prod.validade,OP.* from OP LEFT JOIN produtos prod ON prod.produto = OP.produto where OP.numop = '{$op}'"; foreach ($conn->query($sqlComm) as $row) { $cliente = $row['cliente']; $codcli = $row['codcli']; $pedido = $row['pedido']; $emissao = convertData($row['dataemissao']); $desc = $row['produto']; $pedcli = $row['pedcli']; $unidade = $row['unidade']; $cod = $row['codigo']; $pacote = $row['pacote']; $ean = $row['ean']; $numdias = $row['validade']; switch ($unidade) { case "1": $grandeza = "pcs"; break; case "2": $grandeza = "cen"; break; case "3":
** ============================================================================= */ $checkSession = "true"; include_once '../includes/library.php'; if ($action == "update") { if ($logout_time < "30" && $logout_time != "0" || !is_numeric($logout_time)) { $logout_time = "30"; } $fn = convertData($fn); $tit = convertData($tit); $em = convertData($em); $wp = convertData($wp); $hp = convertData($hp); $mp = convertData($mp); $fax = convertData($fax); $logout_time = convertData($logout_time); $tmpquery = "UPDATE " . $tableCollab["members"] . " SET name='{$fn}',title='{$tit}',email_work='{$em}',phone_work='{$wp}',phone_home='{$hp}',mobile='{$mp}',fax='{$fax}',logout_time='{$logout_time}',timezone='{$tz}' WHERE id = '{$idSession}'"; connectSql("{$tmpquery}"); $timezoneSession = $tz; $logouttimeSession = $logout_time; $dateunixSession = date("U"); $nameSession = $fn; $_SESSION['logouttimeSession'] = $logouttimeSession; $_SESSION['timezoneSession'] = $timezoneSession; $_SESSION['dateunixSession'] = $dateunixSession; $_SESSION['nameSession'] = $nameSession; //if mantis bug tracker enabled if ($enableMantis == "true") { // Call mantis function for user profile changes..!!! include "../mantis/user_profile.php"; }
if ($storedDate != "") { $extractHour = substr("{$storedDate}", 11, 2); $extractMinute = substr("{$storedDate}", 14, 2); $extractYear = substr("{$storedDate}", 0, 4); $extractMonth = substr("{$storedDate}", 5, 2); $extractDay = substr("{$storedDate}", 8, 2); return date("Y-m-d H:i", mktime($extractHour + $gmtUser, $extractMinute, 0, $extractMonth, $extractDay, $extractYear)); } } else { return $storedDate; } } //update sorting table if query sort column if (!empty($sor_cible) && $sor_cible != "" && $sor_champs != "none") { $sor_champs = convertData($sor_champs); $sor_cible = convertData($sor_cible); $tmpquery = "UPDATE " . $tableCollab["sorting"] . " SET {$sor_cible}='{$sor_champs} {$sor_ordre}' WHERE member = '{$idSession}'"; connectSql("{$tmpquery}"); } //set all sorting values for logged user $tmpquery = "WHERE sor.member = '" . fixInt($idSession) . "'"; $sortingUser = new request(); $sortingUser->openSorting($tmpquery); /** * Convert insert data value in form * @param string $data Data to convert * @access public **/ function convertData($data) { global $databaseType;
/* vim: set expandtab ts=4 sw=4 sts=4: */ /** * $Id: createthread.php,v 1.3 2004/12/22 22:16:31 madbear Exp $ * * Copyright (c) 2003 by the NetOffice developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ $checkSession = true; require_once "../includes/library.php"; if ($action == "add") { $topicField = convertData($topicField); $messageField = convertData($messageField); $tmpquery1 = "INSERT INTO " . $tableCollab["topics"] . "(project,owner,subject,status,last_post,posts,published) VALUES('" . $_SESSION['projectSession'] . "','" . $_SESSION['idSession'] . "','{$topicField}','1','{$dateheure}','1','0')"; connectSql("{$tmpquery1}"); $tmpquery = $tableCollab["topics"]; last_id($tmpquery); $num = $lastId[0]; unset($lastId); autoLinks($messageField); $tmpquery2 = "INSERT INTO " . $tableCollab["posts"] . "(topic,member,created,message) VALUES('{$num}','" . $_SESSION['idSession'] . "','{$dateheure}','{$newText}')"; connectSql("{$tmpquery2}"); if ($notifications == "true") { $tmpquery = "WHERE pro.id = '" . $_SESSION['projectSession'] . "'"; $projectDetail = new request(); $projectDetail->openProjects($tmpquery); require_once "../topics/noti_newtopic.php"; }
$category = $num; } else { $category = $listCategories->boocat_id[0]; } } if ($shared == "" || $users != "") { $shared = "0"; } if ($home == "") { $home = "0"; } if ($comments == "") { $comments = "0"; } $name = convertData($name); $description = convertData($description); $tmpquery1 = "INSERT INTO " . $tableCollab["bookmarks"] . "(owner,category,name,url,description,shared,home,comments,users,created) VALUES('{$idSession}','{$category}','{$name}','{$url}','{$description}','{$shared}','{$home}','{$comments}','{$users}','{$dateheure}')"; connectSql("{$tmpquery1}"); headerFunction("../bookmarks/listbookmarks.php?view=my&msg=add&" . session_name() . "=" . session_id()); } } $bodyCommand = "onLoad=\"document.booForm.name.focus();\""; include '../themes/' . THEME . '/header.php'; $blockPage = new block(); $blockPage->openBreadcrumbs(); $blockPage->itemBreadcrumbs($blockPage->buildLink("../bookmarks/listbookmarks.php?view=my", $strings["bookmarks"], in)); if ($id == "") { $blockPage->itemBreadcrumbs($strings["add_bookmark"]); } if ($id != "") { $blockPage->itemBreadcrumbs($blockPage->buildLink("../bookmarks/viewbookmark.php?id=" . $bookmarkDetail->boo_id[0], $bookmarkDetail->boo_name[0], in));
function convertInputData($_to, $_from) { $_POST = convertData($_POST, $_to, $_from); $_GET = convertData($_GET, $_to, $_from); $_COOKIE = convertData($_COOKIE, $_to, $_from); $_FILES = convertData($_FILES, $_to, $_from); }
** 08/03/2005 - sql fix for MSSQL http://www.php-collab.org/community/viewtopic.php?p=6723 ** 24/01/2005 - sql fix for object in query, removed paletteIcon if report is not saved ** 29/06/2004 - sql fix http://www.php-collab.org/community/viewtopic.php?t=1183 ** 23/03/2004 - added new document info ** 23/03/2004 - new export to pdf by Angel ** 23/03/2004 - xhtml code ** ----------------------------------------------------------------------------- ** TO-DO: ** ** ** ============================================================================= */ $checkSession = "true"; include_once '../includes/library.php'; if ($action == "add") { $S_SAVENAME = convertData($S_SAVENAME); $tmpquery1 = "INSERT INTO " . $tableCollab["reports"] . "(owner,name,projects,clients,members,priorities,status,date_due_start,date_due_end,date_complete_start,date_complete_end,created) VALUES('{$idSession}','{$S_SAVENAME}','{$S_PRJSEL}','{$S_ORGSEL}','{$S_ATSEL}','{$S_PRIOSEL}','{$S_STATSEL}','{$S_SDATE}','{$S_EDATE}','{$S_SDATE2}','{$S_EDATE2}','{$dateheure}')"; connectSql("{$tmpquery1}"); headerFunction("../general/home.php?msg=addReport&" . session_name() . "=" . session_id()); } $setTitle .= " : Report Results"; include '../themes/' . THEME . '/header.php'; if ($id == "" && $tri != "true") { $compt1 = count($S_PRJSEL); $S_pro = ""; for ($i = 0; $i < $compt1; $i++) { if ($S_PRJSEL[$i] == "ALL") { $S_pro = "ALL"; break; } if ($i != $compt1 - 1) {
$stm = $meetingDetail->mee_start_time[0]; $etm = $meetingDetail->mee_end_time[0]; $pub = $meetingDetail->mee_published[0]; if ($pub == "0") { $checkedPub = "checked"; } } // case add meeting if ($id == "") { // case add meeting if ($action == "add") { // concat values from date selector and replace quotes by html code in name $mn = convertData($mn); $ma = convertData($ma); $ml = convertData($ml); $mm = convertData($mm); $mc = $S_CSEL[0]; $mr = "0"; if ($pub == "") { $pub = "1"; } $tmpquery1 = "INSERT INTO " . $tableCollab["meetings"] . "(project,name,agenda,location,minutes,chairman,recorder,status,priority,date,start_time,end_time,reminder,reminder_time1,reminder_time2,created,published) VALUES('{$project}','{$mn}','{$ma}','{$ml}','{$mm}','{$mc}','{$mr}','{$st}','{$pr}','{$md}','{$stm}','{$etm}','0','0','0','{$dateheure}','{$pub}')"; connectSql("{$tmpquery1}"); $tmpquery = $tableCollab["meetings"]; last_id($tmpquery); $num = $lastId[0]; unset($lastId); $att_mem_id_list = ""; if ($S_ATSEL[0] == "ALL") { $tmpquery2 = "WHERE tea.project = '{$project}' AND mem.profil != '3'"; $listTeam1 = new request();
$data = array(); // Propagate all HTTP headers into the JSON data object. if ($_GET['full_headers']) { $data['headers'] = array(); foreach ($header_text as $header) { preg_match('/^(.+?):\\s+(.*)$/', $header, $matches); if ($matches) { $data['headers'][$matches[1]] = $matches[2]; } } } // Propagate all cURL request / response info to the JSON data object. if ($_GET['full_status']) { $data['status'] = $status; } else { $data['status'] = array(); $data['status']['http_code'] = $status['http_code']; } // Set the JSON data object contents, decoding it from JSON if possible. $decoded_json = json_decode($contents, true); $data['contents'] = $decoded_json ? $decoded_json : $contents; $data['contents'] = convertData($data['contents']); // Generate appropriate content-type header. $is_xhr = strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'; header('Content-type: application/' . ($is_xhr ? 'json' : 'x-javascript')); // Get JSONP callback. $jsonp_callback = $enable_jsonp && isset($_GET['callback']) ? $_GET['callback'] : null; // Generate JSON/JSONP string $json = json_encode($data); print $jsonp_callback ? "{$jsonp_callback}({$json})" : $json; }
} if ($action == "add") { if ($shortname == "") { $error = $strings["blank_fields"]; } else { if ($recurring == "") { $recurring = "0"; } else { $dateStart_A = substr("{$dateStart}", 0, 4); $dateStart_M = substr("{$dateStart}", 5, 2); $dateStart_J = substr("{$dateStart}", 8, 2); $dayRecurr = _dayOfWeek(mktime(12, 12, 12, $dateStart_M, $dateStart_J, $dateStart_A)); } $subject = convertData($subject); $description = convertData($description); $shortname = convertData($shortname); if ($viewCalend == 0) { $tmpquery = "INSERT INTO " . $tableCollab["calendar"] . "(owner,subject,description,shortname,date_start,date_end,time_start,time_end,reminder,recurring,recur_day) VALUES('" . $_SESSION['idSession'] . "','{$subject}','{$description}','{$shortname}','{$dateStart}','{$dateEnd}','{$time_start}','{$time_end}','{$reminder}','{$recurring}','{$dayRecurr}')"; } else { $tmpquery = "INSERT INTO " . $tableCollab["calendar"] . "(project,subject,description,shortname,date_start,date_end,time_start,time_end,reminder,recurring,recur_day) VALUES('{$viewCalend}','{$subject}','{$description}','{$shortname}','{$dateStart}','{$dateEnd}','{$time_start}','{$time_end}','{$reminder}','{$recurring}','{$dayRecurr}')"; } connectSql("{$tmpquery}"); $tmpquery = $tableCollab["calendar"]; last_id($tmpquery); $num = $lastId[0]; unset($lastId); header("Location: ../calendar/viewcalendar.php?viewCalend={$viewCalend}&dateEnreg={$num}&dateCalend={$dateCalend}&type=calendDetail&msg=add&"); exit; } } }
<?php #Application name: PhpCollab #Status page: 0 #Path by root: ../tasks/assignmentcomment.php $checkSession = "true"; include_once '../includes/library.php'; if ($action == "update") { $acomm = convertData($acomm); $tmpquery6 = "UPDATE " . $tableCollab["assignments"] . " SET comments='{$acomm}' WHERE id = '{$id}'"; connectSql("{$tmpquery6}"); headerFunction("../tasks/viewtask.php?id={$task}&msg=update&" . session_name() . "=" . session_id()); exit; } $bodyCommand = "onLoad=\"document.assignment_commentForm.acomm.focus();\""; include '../themes/' . THEME . '/header.php'; $tmpquery = "WHERE tas.id = '{$task}'"; $taskDetail = new request(); $taskDetail->openTasks($tmpquery); $tmpquery = "WHERE pro.id = '" . $taskDetail->tas_project[0] . "'"; $projectDetail = new request(); $projectDetail->openProjects($tmpquery); $blockPage = new block(); $blockPage->openBreadcrumbs(); $blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/listprojects.php?", $strings["projects"], in)); $blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], in)); $blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/listtasks.php?project=" . $projectDetail->pro_id[0], $strings["tasks"], in)); $blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/viewtask.php?id=" . $taskDetail->tas_id[0], $taskDetail->tas_name[0], in)); $blockPage->itemBreadcrumbs($strings["assignment_comment"]); $blockPage->closeBreadcrumbs(); $block1 = new block();
// $Revision: 1.7 $ /* vim: set expandtab ts=4 sw=4 sts=4: */ /** * $Id: resultssearch.php,v 1.7 2004/12/15 19:43:37 madbear Exp $ * * Copyright (c) 2003 by the NetOffice developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ $checkSession = true; require_once "../includes/library.php"; $searchFor = urldecode($searchFor); $searchfor = convertData($searchfor); $searchfor = strtolower($searchfor); $mots = split(" ", $searchfor); $nombre_mots = count($mots); if ($heading == "ALL") { $validNotes = "true"; $validOrganizations = "true"; $validProjects = "true"; $validTasks = "true"; $validTopics = "true"; $validMembers = "true"; $selectedAll = "selected"; } if ($heading == "notes") { $validNotes = "true"; $selectedNotes = "selected";
$tmpquery = "WHERE mem.login = '******' AND mem.login != '{$unOld}'"; $existsUser = new request(); $existsUser->openMembers($tmpquery); $comptExistsUser = count($existsUser->mem_id); if ($comptExistsUser != "0") { $error = $strings["user_already_exists"]; } else { // replace quotes by html code LINK_INSIDE name $fn = convertData($fn); $tit = convertData($tit); $c = convertData($c); $em = convertData($em); $wp = convertData($wp); $hp = convertData($hp); $mp = convertData($mp); $fax = convertData($fax); $tmpquery = "UPDATE " . $tableCollab["members"] . " SET login='******',name='{$fn}',title='{$tit}',organization='{$clod}',email_work='{$em}',phone_work='{$wp}',phone_home='{$hp}',mobile='{$mp}',fax='{$fax}',comments='{$c}' WHERE id = '{$id}'"; connectSql("{$tmpquery}"); // test if new password set if ($pw != "") { // test if 2 passwords match if ($pw != $pwa || $pwa == "") { $error = $strings["new_password_error"]; } else { $pw = get_password($pw); $tmpquery = "UPDATE " . $tableCollab["members"] . " SET password='******' WHERE id = '{$id}'"; connectSql("{$tmpquery}"); header("Location: ../clients/viewclient.php?msg=update&id={$clod}"); exit; } } else {
exit; } // set organization if add project action done from clientdetail if ($organization != '') { $projectDetail->pro_org_id[0] = $organization; } // set default values $projectDetail->pro_mem_id[0] = $_SESSION['idSession']; $projectDetail->pro_priority[0] = 3; $projectDetail->pro_status[0] = 2; $projectDetail->pro_upload_max[0] = $maxFileSize; // case add project if ($action == 'add') { // replace quotes by html code in name and description $pn = convertData($pn); $d = convertData($d); // insert into projects and teams (with last id project) $tmpquery1 = 'INSERT INTO ' . $tableCollab['projects'] . "(name,priority,description,owner,organization,status,created,published,upload_max,url_dev,url_prod,phase_set,type) VALUES('{$pn}','{$pr}','{$d}','{$pown}','{$clod}','{$st}','{$dateheure}','1','{$up}','{$url_dev}','{$url_prod}','{$thisPhase}','{$pt}')"; connectSql($tmpquery1); $tmpquery = $tableCollab['projects']; last_id($tmpquery); $num = $lastId[0]; unset($lastId); $tmpquery2 = 'INSERT INTO ' . $tableCollab['teams'] . "(project,member,published,authorized) VALUES('{$num}','{$pown}','1','0')"; connectSql($tmpquery2); // if CVS repository enabled if ($enable_cvs == 'true') { $user_query = "WHERE mem.id = '{$pown}'"; $cvsUser = new request(); $cvsUser->openMembers($user_query); cvs_add_repository($cvsUser->mem_login[0], $cvsUser->mem_password[0], $num);
* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ $checkSession = true; require_once "../includes/library.php"; $tmpquery = "WHERE topic.id = '{$id}'"; $detailTopic = new request(); $detailTopic->openTopics($tmpquery); $tmpquery = "WHERE pro.id = '" . $detailTopic->top_project[0] . "'"; $projectDetail = new request(); $projectDetail->openProjects($tmpquery); if ($action == "add") { $tpm = convertData($tpm); autoLinks($tpm); $detailTopic->top_posts[0] = $detailTopic->top_posts[0] + 1; $tmpquery1 = "INSERT INTO " . $tableCollab["posts"] . "(topic,member,created,message) VALUES('{$id}','" . $_SESSION['idSession'] . "','{$dateheure}','{$newText}')"; connectSql("{$tmpquery1}"); $tmpquery2 = "UPDATE " . $tableCollab["topics"] . " SET last_post='{$dateheure}',posts='" . $detailTopic->top_posts[0] . "' WHERE id = '{$id}'"; connectSql("{$tmpquery2}"); if ($notifications == "true") { require_once "../topics/noti_newpost.php"; } header("Location: ../topics/viewtopic.php?id={$id}&msg=add"); exit; } $idStatus = $detailTopic->top_status[0]; $idPublish = $detailTopic->top_published[0]; $tmpquery = "WHERE pos.topic = '" . $detailTopic->top_id[0] . "' ORDER BY pos.created DESC";
// Add version and revision at the end of a file name but before the extension. $upload_name = str_replace(".", " v{$oldversion} r{$revision}.", $upload_name); $extension = strtolower(substr(strrchr($upload_name, "."), 1)); if ($allowPhp == "false") { $send = ""; if ($_FILES['upload']['name'] != "" && ($extension == "php" || $extension == "php3" || $extension == "phtml")) { $error3 .= $strings["no_php"] . "<br>"; $send = "false"; } } if ($_FILES['upload']['name'] != "" && $_FILES['upload']['size'] < $maxFileSize && $_FILES['upload']['size'] != 0 && $send != "false") { $cpy = "true"; } // Insert details into Database if ($cpy == "true") { $c = convertData($c); $tmpquery = "INSERT INTO " . $tableCollab["meetings_attachment"] . "(owner,project,meeting,comments,upload,published,status,vc_status,vc_parent) VALUES('" . $_SESSION['idSession'] . "','{$project}','{$meeting}','{$c}','{$dateheure}','{$published}','2','0','{$parent}')"; connectSql("{$tmpquery}"); $tmpquery = $tableCollab["meetings_attachment"]; last_id($tmpquery); $num = $lastId[0]; unset($lastId); } if ($cpy == "true") { uploadFile("files/{$project}/meetings/{$meeting}", $_FILES['upload']['tmp_name'], $upload_name); $size = file_info_size("../files/{$project}/meetings/{$meeting}/{$upload_name}"); // $dateFile = file_info_date("../files/$project/meetings/$meeting/$upload_name"); $chaine = strrev("../files/{$project}/meetings/{$meeting}/{$upload_name}"); $tab = explode(".", $chaine); $extension = strtolower(strrev($tab[0])); }
} $tmpquery = "WHERE serv.id = '{$id}'"; $detailService = new request(); $detailService->openServices($tmpquery); $comptDetailService = count($detailService->serv_id); //set values in form $n = $detailService->serv_name[0]; $np = $detailService->serv_name_print[0]; $hr = $detailService->serv_hourly_rate[0]; } //case add user if ($id == "") { if ($action == "add") { //replace quotes by html code in name and address $n = convertData($n); $np = convertData($np); //$tmpquery1 = "INSERT INTO ".$tableCollab["services"]." SET name='$n',name_print='$np',hourly_rate='$hr'"; $tmpquery1 = "INSERT INTO " . $tableCollab["services"] . " (name,name_print,hourly_rate) VALUES ('{$n}','{$np}','{$hr}')"; connectSql($tmpquery1); headerFunction("../services/listservices.php?msg=add&" . session_name() . "=" . session_id()); exit; } } /* Titles */ if ($id == '') { $setTitle .= " : Add Service"; } else { $setTitle .= " : Edit Service (" . $detailService->serv_name[0] . ")"; } $bodyCommand = "onLoad=\"document.serv_editForm.n.focus();\""; include '../themes/' . THEME . '/header.php';
//Add version and revision at the end of a file name but before the extension. $upload_name = str_replace(".", " v{$oldversion} r{$revision}.", $upload_name); $extension = strtolower(substr(strrchr($upload_name, "."), 1)); if ($allowPhp == "false") { $send = ""; if ($_FILES['upload']['name'] != "" && ($extension == "php" || $extension == "php3" || $extension == "phtml")) { $error3 .= $strings["no_php"] . "<br/>"; $send = "false"; } } if ($_FILES['upload']['name'] != "" && $_FILES['upload']['size'] < $maxFileSize && $_FILES['upload']['size'] != 0 && $send != "false") { $docopy = "true"; } //Insert details into Database if ($docopy == "true") { $comments = convertData($comments); $tmpquery = "INSERT INTO " . $tableCollab["files"] . "(owner,project,task,comments,upload,published,status,vc_status,vc_parent,phase) VALUES('{$idSession}','{$project}','{$task}','{$c}','{$dateheure}','0','2','0','{$parent}','0')"; connectSql("{$tmpquery}"); $tmpquery = $tableCollab["files"]; last_id($tmpquery); $num = $lastId[0]; unset($lastId); } if ($task != "0") { if ($docopy == "true") { uploadFile("files/{$project}/{$task}", $_FILES['upload']['tmp_name'], $upload_name); $size = file_info_size("../files/{$project}/{$task}/{$upload_name}"); //$dateFile = file_info_date("../files/$project/$task/$upload_name"); $chaine = strrev("../files/{$project}/{$task}/{$upload_name}"); $tab = explode(".", $chaine); $extension = strtolower(strrev($tab[0]));
$existsUser = new request(); $existsUser->openMembers($tmpquery); $comptExistsUser = count($existsUser->mem_id); if ($comptExistsUser != "0") { $error = $strings["user_already_exists"]; } else { //replace quotes by html code in name $fn = convertData($fn); $tit = convertData($tit); $c = convertData($c); $em = convertData($em); $wp = convertData($wp); $hp = convertData($hp); $mp = convertData($mp); $fax = convertData($fax); $last_page = convertData($last_page); $tmpquery = "UPDATE " . $tableCollab["members"] . " SET login='******',name='{$fn}',title='{$tit}',organization='{$clod}',email_work='{$em}',phone_work='{$wp}',phone_home='{$hp}',mobile='{$mp}',fax='{$fax}',last_page='{$last_page}',comments='{$c}' WHERE id = '{$id}'"; connectSql("{$tmpquery}"); //test if new password set if ($pw != "") { //test if 2 passwords match if ($pw != $pwa || $pwa == "") { $error = $strings["new_password_error"]; } else { $pw = get_password($pw); $tmpquery = "UPDATE " . $tableCollab["members"] . " SET password='******' WHERE id = '{$id}'"; connectSql("{$tmpquery}"); headerFunction("../clients/viewclient.php?msg=update&id={$clod}&" . session_name() . "=" . session_id()); exit; } } else {