function GetFriendID($pszAuthID) { $iServer = "0"; $iAuthID = "0"; $szAuthID = $pszAuthID; $szTmp = strtok($szAuthID, ":"); while (($szTmp = strtok(":")) !== false) { $szTmp2 = strtok(":"); if ($szTmp2 !== false) { $iServer = $szTmp; $iAuthID = $szTmp2; } } if ($iAuthID == "0") { return false; } if (extension_loaded('bcmath') == 1) { // calc communityid with bcmath $i64friendID = bcmul($iAuthID, "2"); $i64friendID = bcadd($i64friendID, bcadd("76561197960265728", $iServer, 0), 0); return $i64friendID; } else { if (extension_loaded('gmp') == 1) { // calc communityid with gmp $i64friendID = gmp_mul($iAuthID, "2"); $i64friendID = gmp_add($i64friendID, gmp_add("76561197960265728", $iServer)); return gmp_strval($i64friendID); } else { $i64friendID = Mul(strval($iAuthID), "2"); $i64friendID = Add(strval($i64friendID), Add("76561197960265728", strval($iServer))); return $i64friendID; } } return false; }
brokenlink($lid); break; case "modifylinkrequest": modifylinkrequest($lid); break; case "modifylinkrequestS": modifylinkrequestS($lid, $cat, $title, $url, $description, $modifysubmitter); break; case "brokenlinkS": brokenlinkS($lid, $cid, $title, $url, $description, $modifysubmitter); break; case "visit": visit($lid); break; case "Add": Add($title, $url, $auth_name, $cat, $description, $email); break; case "search": search($query, $min, $orderby, $show); break; case "rateinfo": rateinfo($lid, $user, $title); break; case "ratelink": ratelink($lid, $user, $ttitle); break; case "addrating": addrating($ratinglid, $ratinguser, $rating, $ratinghost_name, $ratingcomments, $user); break; case "viewlinkcomments": viewlinkcomments($lid, $ttitle);
Add($row['city2']); Add($row['state2']); Add($row['zip2']); Add(""); Add(InsType($row['instype2'])); Add($row['fname2'] . " " . $row['lname2']); Add(ucfirst($row['relationship2'])); Add($row['group2']); Add($row['policy2']); // Primary Care Physician Section. // Add($prow['id']); Add($prow['lname']); Add($prow['fname']); Add(substr($prow['mname'], 0, 1)); Add(""); // UPIN not available // All done. $out .= "\rEND"; // In case this is the very first time. if (!file_exists($EXPORT_PATH)) { mkdir($EXPORT_PATH); @touch("{$EXPORT_PATH}/unlocked"); } // Serialize the following code; collisions would be very bad. if (!rename("{$EXPORT_PATH}/unlocked", "{$EXPORT_PATH}/locked")) { die("Export seems to be in use by someone else; please try again."); } // Figure out what to use for the target filename. $dh = opendir($EXPORT_PATH); if (!$dh) {
$row[] = $aRow[$i]; if ($i == $count - 1) { $row[] = '<div class="callapp_checkbox"> <input type="checkbox" id="callapp_checkbox_detail_' . $aRow[$hidden] . '" name="check_' . $aRow[$hidden] . '" value="' . $aRow[$hidden] . '" class="check" /> <label for="callapp_checkbox_detail_' . $aRow[$hidden] . '"></label> </div>'; } } $data['aaData'][] = $row; } break; case 'save': if ($name != '') { if (!CheckExist($name)) { if ($new_str == 1) { Add($id, $name); } else { Save($id, $name); } } else { $error = '"' . $name . '" უკვე არის სიაში!'; } } break; case 'save_detail': if ($value != '') { if (!CheckDetailExist($value)) { if ($id_detail == '') { AddDetail($id_original, $value); } else { SaveDetail($id_detail, $value);
<?php //$results['description'] //$results['admin'] = true; require $setting["SCRIPT_PATH"] . $setting["CLASS_PATH"] . "/Pages.php"; $pages = isset($_GET['pages']) ? $_GET['pages'] : ""; switch ($pages) { case 'add': Add(); break; case 'edit': edit(); break; case 'dell': delete(); break; case 'view': view(); break; case 'sitemap': sitemap(); break; case 'admin': admin(); break; default: homepage(); } function sitemap() { $results['articles'] = Pages::getList();
return $datetime; } settype($op, 'string'); switch ($op) { case 'menu': menu($mainlink); break; case 'AddLink': include_once "modules/{$ModPath}/links-1.php"; AddLink(); break; case 'Add': include_once "modules/{$ModPath}/links-1.php"; settype($asb_question, 'string'); settype($asb_reponse, 'string'); Add($title, $url, $name, $cat, $xtext, $email, $topicL, $asb_question, $asb_reponse); break; case 'NewLinks': include_once "modules/{$ModPath}/links-2.php"; if (!isset($newlinkshowdays)) { $newlinkshowdays = 7; } NewLinks($newlinkshowdays); break; case 'NewLinksDate': include_once "modules/{$ModPath}/links-2.php"; NewLinksDate($selectdate); break; case 'viewlink': if (!isset($min)) { $min = 0;
function HClassDefinition($n, $hvars = FALSE) { $this->name = $n; $this->property = array(); if ($hvars !== FALSE) { foreach ($hvars as $hvar) { Add($hvar); } } }
function Trims($row) { if (is_Array($row)) { foreach ($row as $key => $value) { if (is_Array($row[$key])) { $row[$key] = Trims($row[$key]); } else { $row[$key] = Add(Trim($value)); } } } else { Add(Trim($row)); } return $row; }
<?php include "third.htm"; include "vocfunc.php"; if (isset($add)) { Addform(); } if (isset($plus)) { Add($plus); } if (isset($hide)) { if (isset($aword)) { if (isset($trans)) { AddFunc($hide, $aword, $trans); } else { echo "<h3 style='color:#778899'>Введите значение слова!</h3>"; } } else { echo "<h3 style='color:#778899'>Введите слово!</h3>"; } } if (isset($del)) { Delform(); } if (isset($word)) { Del($word); } if (isset($transmis)) { AddMean($aword, $trans, $lang); } if (isset($otransmis)) {
function addInsurance($row, $seq) { if ($row["name{$seq}"]) { OpenTag("insurance"); Add("priority", $seq); Add("group", $row["group{$seq}"]); Add("policy", $row["policy{$seq}"]); Add("provider", $row["provider{$seq}"]); Add("name", $row["name{$seq}"]); Add("street1", $row["street1{$seq}"]); Add("street2", $row["street2{$seq}"]); Add("city", $row["city{$seq}"]); Add("state", $row["state{$seq}"]); Add("zip", $row["zip{$seq}"]); Add("country", $row["country{$seq}"]); Add("type", $row["instype{$seq}"]); Add("copay", $row["copay{$seq}"]); OpenTag("subscriber"); Add("relationship", $row["relationship{$seq}"]); Add("lname", $row["lname{$seq}"]); Add("fname", $row["fname{$seq}"]); Add("mname", $row["mname{$seq}"]); Add("street", $row["sstreet{$seq}"]); Add("city", $row["scity{$seq}"]); Add("state", $row["sstate{$seq}"]); Add("zip", $row["szip{$seq}"]); Add("country", $row["scountry{$seq}"]); Add("dob", $row["sdob{$seq}"]); Add("ss", $row["sss{$seq}"]); Add("phone", $row["sphone{$seq}"]); Add("employer", $row["semployer{$seq}"]); Add("sex", $row["ssex{$seq}"]); Add("employer_street", $row["semployer_street{$seq}"]); Add("employer_city", $row["semployer_city{$seq}"]); Add("employer_state", $row["semployer_state{$seq}"]); Add("employer_zip", $row["semployer_zip{$seq}"]); Add("employer_country", $row["semployer_country{$seq}"]); CloseTag("subscriber"); CloseTag("insurance"); } }
// default project ID, for now if ($projectid == "") { $projectid = 0; } /* check the action */ if ($action == "addform") { DisplayForm("", "", "", $username, $calendarid, $projectid, $details, $title, $startdatetime, $enddatetime, $isalldayevent, $istimerequest, $currentcal, $repeats, $repeattype, $repeatsun, $repeatmon, $repeattue, $repeatwed, $repeatthu, $repeatfri, $repeatsat, $repeatenddate); } if ($action == "add") { Add("add", "", "", $username, $calendarid, $projectid, $details, $title, $startdatetime, $enddatetime, $isalldayevent, $istimerequest, $currentcal, $repeats, $repeattype, $repeatsun, $repeatmon, $repeattue, $repeatwed, $repeatthu, $repeatfri, $repeatsat, $repeatenddate, 0); } elseif ($action == "editform") { DisplayForm($id, "", "", "", "", "", "", "", "", "", "", "", $currentcal, $repeats, $repeattype, $repeatsun, $repeatmon, $repeattue, $repeatwed, $repeatthu, $repeatfri, $repeatsat, $repeatenddate); } elseif ($action == "edit") { Add("update", $id, $groupid, $username, $calendarid, $projectid, $details, $title, $startdatetime, $enddatetime, $isalldayevent, $istimerequest, $currentcal, $repeats, $repeattype, $repeatsun, $repeatmon, $repeattue, $repeatwed, $repeatthu, $repeatfri, $repeatsat, $repeatenddate, 0); } elseif ($action == "editall") { Add("update", $id, $groupid, $username, $calendarid, $projectid, $details, $title, $startdatetime, $enddatetime, $isalldayevent, $istimerequest, $currentcal, $repeats, $repeattype, $repeatsun, $repeatmon, $repeattue, $repeatwed, $repeatthu, $repeatfri, $repeatsat, $repeatenddate, 1); } elseif ($action == "delete") { Delete($id, $currentcal, 0); } elseif ($action == "deleteall") { Delete($groupid, $currentcal, 1); } elseif ($action == "cancel") { Cancel($id, $currentcal, $cancelreason, $notifyusers, 0); } elseif ($action == "cancelall") { Cancel($groupid, $currentcal, $cancelreason, $notifyusers, 1); } elseif ($action == "" || $action == "list") { //DisplayList(); echo "Nothing to do"; } /* ----------------------------------------------- */ /* --------- Add --------------------------------- */ /* ----------------------------------------------- */
if ($_POST["calendar_id"] == "") { $calendar_id = $_GET["calendar_id"]; } else { $calendar_id = $_POST["calendar_id"]; } if ($_POST["project_id"] == "") { $project_id = $_GET["project_id"]; } else { $project_id = $_POST["project_id"]; } /* check the action */ if ($action == "addform") { AddForm("", $amount, $timeperiod, $calendar_id, $project_id); } if ($action == "add") { Add($amount, $timeperiod, $calendar_id, $project_id); } elseif ($action == "editform") { EditForm("", $id); } elseif ($action == "edit") { Edit($id, $amount, $timeperiod, $calendar_id, $project_id); } elseif ($action == "delete") { Delete($id); } elseif ($action == "" || $action == "list") { DisplayList(); } /* ----------------------------------------------- */ /* --------- DisplayList ------------------------- */ /* ----------------------------------------------- */ function DisplayList() { ?>
<?php include 'inc/config.php'; Header("Cache-Control: no-cache, must-revalidate"); Header("Pragma: no-cache"); Header("Content-Type: text/javascript; charset=utf-8"); if (isset($_SESSION['user_id'])) { if (isset($_POST['act'])) { switch ($_POST['act']) { case "add": Add($_SESSION['user_id'], $_SERVER['REMOTE_ADDR'], $privat9, $srch, $rpls, $user_p_mod); break; case "del": Del($_SESSION['user_id'], $_SERVER['REMOTE_ADDR'], $privat8, $user_p_mod); break; case "load": Load($_SESSION['user_year'], $privat8, $c_lmt); break; case "loadhelp": LoadHelp($_SESSION['user_year'], $privat8, $privat9, $srch, $rpls); break; default: echo time(); } } } else { echo "Помилка авторизації, поверніться до головної сторінки."; } function Del($user_id, $user_ip, $privat8, $user_p_mod) { if (preg_match("/^[1-9][0-9]*\$/", $_POST['del_id'])) {
if ($_POST["admin"] == "") { $admin = $_GET["admin"]; } else { $admin = $_POST["admin"]; } if ($_POST["description"] == "") { $description = $_GET["description"]; } else { $description = $_POST["description"]; } /* check the action */ if ($action == "addform") { AddForm("", $name, $description, $admin); } if ($action == "add") { Add($name, $description, $admin); } elseif ($action == "editform") { EditForm("", $id); } elseif ($action == "edit") { Edit($id, $name, $description, $admin); } elseif ($action == "delete") { Delete($id); } elseif ($action == "" || $action == "list") { DisplayList(); } /* ----------------------------------------------- */ /* --------- DisplayList ------------------------- */ /* ----------------------------------------------- */ function DisplayList() { ?>
fwrite($myfile, $info[$i]->name); fwrite($myfile, " "); fwrite($myfile, $info[$i]->age); fwrite($myfile, " "); fwrite($myfile, $info[$i]->school); fwrite($myfile, " "); fwrite($myfile, "@"); } } function Exit1() { return exit; } switch ($i) { case "Add": Add($name, $age, $school); break; case "Delete by name": Delete1($info); break; case "Show all": ShowAll($info); break; case "Sort by name": Sort1($info); break; case "Exit": Exit1(); break; default: echo "Reclick the button!";
if ($_POST["description"] == "") { $description = $_GET["description"]; } else { $description = $_POST["description"]; } if ($_POST["location"] == "") { $location = $_GET["location"]; } else { $location = $_POST["location"]; } /* check the action */ if ($action == "addform") { AddForm("", $name, $description, $location); } if ($action == "add") { Add($name, $description, $location); } elseif ($action == "editform") { EditForm("", $id); } elseif ($action == "edit") { Edit($id, $name, $description, $location); } elseif ($action == "delete") { Delete($id); } elseif ($action == "" || $action == "list") { DisplayList(); } /* ----------------------------------------------- */ /* --------- DisplayList ------------------------- */ /* ----------------------------------------------- */ function DisplayList() { ?>
brokendownload($lid); break; case "modifydownloadrequest": modifydownloadrequest($lid); break; case "modifydownloadrequestS": modifydownloadrequestS($lid, $cat, $title, $url, $description, $modifysubmitter, $auth_name, $email, $filesize, $version, $homepage); break; case "brokendownloadS": brokendownloadS($lid, $modifysubmitter); break; case "getit": getit($lid); break; case "Add": Add($title, $url, $auth_name, $cat, $description, $email, $filesize, $version, $homepage); break; case "search": search($query, $min, $orderby, $show); break; case "rateinfo": rateinfo($lid); break; case "ratedownload": ratedownload($lid, $user); break; case "addrating": addrating($ratinglid, $ratinguser, $rating, $ratinghost_name, $ratingcomments, $user); break; case "viewdownloadcomments": viewdownloadcomments($lid);
<?php $accion = filter_input(INPUT_POST, 'accion'); require_once '../DTO/ClsMotriz.php'; $objDto = new ClsMotriz(); switch ($accion) { case 'insertarMotriz': Add($objDto); break; default: echo "<h1>Default de sw</h1>"; } function Add($objDto) { $objDto->setDeclaracionJuramentada(filter_input(INPUT_POST, 'declaracion')); $objDto->setAntecedente(filter_input(INPUT_POST, 'antecedentes')); $objDto->setActitud(filter_input(INPUT_POST, 'actitud')); $objDto->setAutocontrol(filter_input(INPUT_POST, 'autocontrol')); $objDto->setInteligenciaPractica(filter_input(INPUT_POST, 'inteligencia')); $objDto->setCoordinacionPsicomotora(filter_input(INPUT_POST, 'coordinacion')); $objDto->setResumen(filter_input(INPUT_POST, 'resumen')); $objDto->setResultado(strtoupper(filter_input(INPUT_POST, 'resultado'))); $objDto->setCedula(filter_input(INPUT_POST, 'cedula')); if ($objDto->getResultado() === 'APROBADO') { require_once '../DTO/ClsAprobado.php'; $ap = new ClsAprobado(); $objDto->setResultado($ap->obtenerEstado()); } else { if ($objDto->getResultado() === 'NO APROBADO') { require_once '../DTO/ClsNoAprobado.php'; $ap = new ClsNoAprobado();
$name = $data['Name']; $phone = $data['phone']; $email = $data['email']; memberList($No, $id, $name, $phone, $email, $last); } $amount = count_member($pdo); if ($amount == "1") { Add("1", "n", $pdo); } else { if ($amount == "2") { Add("1", "n", $pdo); Add("2", "y", $pdo); } else { Add("1", "n", $pdo); Add("2", "n", $pdo); Add("3", "y", $pdo); } } ?> <?php function memberList($no, $id, $name, $phone, $email, $last) { ?> <hr> <div class="row" style="padding-bottom: 15px;"> <br> <div class="col-lg-1" align="center"> <label>ลำดับที่</label> <div> <?php echo $no;
function endFacility() { global $beg_year, $beg_month; OpenTag('IMS_eMRUpload_Version'); Add('XMLversionNumber', '1'); Add('Period', sprintf('%04u-%02u-01T00:00:00', $beg_year, $beg_month)); CloseTag('IMS_eMRUpload_Version'); CloseTag('IMS_eMRUpload_Point'); }