本文整理匯總了PHP中Add函數的典型用法代碼示例。如果您正苦於以下問題:PHP Add函數的具體用法?PHP Add怎麽用?PHP Add使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Add函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: GetFriendID
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;
}
示例2: brokenlink
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);
示例3: Add
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) {
示例4: Add
$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);
示例5: isset
<?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();
示例6: settype
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;
示例7: HClassDefinition
function HClassDefinition($n, $hvars = FALSE)
{
$this->name = $n;
$this->property = array();
if ($hvars !== FALSE) {
foreach ($hvars as $hvar) {
Add($hvar);
}
}
}
示例8: Trims
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;
}
示例9: Addform
<?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)) {
示例10: addInsurance
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");
}
}
示例11: DisplayForm
// 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 --------------------------------- */
/* ----------------------------------------------- */
示例12: AddForm
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()
{
?>
示例13: Header
<?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'])) {
示例14: AddForm
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()
{
?>
示例15: fwrite
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!";