本文整理汇总了PHP中getusername函数的典型用法代码示例。如果您正苦于以下问题:PHP getusername函数的具体用法?PHP getusername怎么用?PHP getusername使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getusername函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pregtest
function pregtest()
{
//function นัด pregtest
$village = $_GET[village];
if ($village == "00000000") {
$wvill = "";
} else {
$wvill = " AND house.villcode='{$village}' ";
}
if ($village == "00000000") {
$mu = "ทุกหมู่บ้าน";
} else {
$mu = getvillagename($village);
}
$str = retdaterangstr($_GET[str]);
$sto = retdaterangsto($_GET[str]);
$strx = retDatets($str);
$stox = retDatets($sto);
$sql = "SELECT\nperson.pcucodeperson,\nperson.pid,\nperson.idcard,\nperson.fname,\nconcat(ctitle.titlename, person.fname , ' ' , person.lname) AS pname,\nperson.birth,\nROUND(DATEDIFF(now(),person.birth)/365.25) AS age,\nhouse.villcode,\nhouse.hno,\nhouse.hcode,\nhouse.xgis,\nhouse.ygis,\nvisit.visitdate,\nvisitfp.pregtest,\nvisitfp.pregtestresult,\nvisit.username\nFROM\nhouse\nINNER JOIN person ON house.pcucode = person.pcucodeperson AND house.hcode = person.hcode\nLEFT JOIN ctitle on ctitle.titlecode = person.prename\nINNER JOIN visit ON person.pcucodeperson = visit.pcucodeperson AND person.pid = visit.pid\nINNER JOIN visitfp ON visit.pcucodeperson = visitfp.pcucodeperson AND visit.pid = visitfp.pid AND visit.visitdate = visitfp.datefp\nwhere visitfp.pregtest = '17' and visit.visitdate between '{$str}' and '{$sto}' {$wvill}\norder by visit.visitdate,person.fname";
$result = mysql_query($sql);
$xml = '<markers>';
while ($row = mysql_fetch_array($result)) {
$moo = substr($row[villcode], 6, 2);
$vill = getMooVillage($row[villcode]);
$userv = getusername($row[username]);
if ($row[pregtestresult] == "0") {
$pregtestname = "ไม่ตั้งครรภ์";
} elseif ($row[pregtestresult] == "1") {
$pregtestname = "ตั้งครรภ์";
} elseif ($row[pregtestresult] == "3") {
$pregtestname = "แปลผลไม่ได้";
} else {
$pregtestname = "";
}
if ($row[visitdate] == "") {
$appsick = "";
} else {
$appsick = retDatets($row[visitdate]);
}
$xml .= '<marker ';
$xml .= 'pid="' . $row[pid] . '" ';
$xml .= 'pname="' . $row[pname] . '" ';
$xml .= 'age="' . $row[age] . '" ';
$xml .= 'hno="' . $row[hno] . '" ';
$xml .= 'moo="' . $moo . '" ';
$xml .= 'sick="' . $appsick . '" ';
$xml .= 'labresult="' . $pregtestname . '" ';
$xml .= 'userv="' . $userv . '" ';
$xml .= 'lat="' . $row[ygis] . '" ';
$xml .= 'lng="' . $row[xgis] . '" ';
$xml .= '/>';
}
$xml .= '</markers>';
echo $xml;
}
示例2: pregtest
function pregtest()
{
//function นัด pregtest
$sql = "SELECT\n concat('สถานบริการ(สถานีอนามัย/PCU): ',chospital.`hosname`,' หมู่ที่:',ifnull(chospital.`mu`,'...'),' ต.',\n\tifnull(csubdistrict.`subdistname`,' ...'),' อ.',ifnull(cdistrict.`distname`,' ...'),' จ.',\n\tifnull(cprovince.`provname`,'...')) AS chospital_hosname\nFROM\n `chospital` chospital \n INNER JOIN `office` office ON chospital.`hoscode` = office.`offid`\n left outer join `csubdistrict` csubdistrict ON chospital.`provcode` = csubdistrict.`provcode`\n AND chospital.`distcode` = csubdistrict.`distcode`\n AND chospital.`subdistcode` = csubdistrict.`subdistcode`\n left outer JOIN `cdistrict` cdistrict ON chospital.`provcode` = cdistrict.`provcode`\n AND chospital.`distcode` = cdistrict.`distcode`\n INNER JOIN `cprovince` cprovince ON chospital.`provcode` = cprovince.`provcode`";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$hosp = $row[chospital_hosname];
$village = $_GET[village];
if ($village == "00000000") {
$wvill = "";
} else {
$wvill = " AND house.villcode='{$village}' ";
}
if ($village == "00000000") {
$mu = "ทุกหมู่บ้าน";
} else {
$mu = getvillagename($village);
}
$str = retdaterangstr($_GET[str]);
$sto = retdaterangsto($_GET[str]);
$strx = retDatets($str);
$stox = retDatets($sto);
$sql = "SELECT\nperson.pcucodeperson,\nperson.pid,\nperson.idcard,\nperson.fname,\nconcat(ctitle.titlename, person.fname , ' ' , person.lname) AS pname,\nperson.birth,\nROUND(DATEDIFF(now(),person.birth)/365.25) AS age,\nhouse.villcode,\nhouse.hno,\nhouse.hcode,\nhouse.xgis,\nhouse.ygis,\nvisit.visitdate,\nvisitfp.pregtest,\nvisitfp.pregtestresult,\nvisit.username\nFROM\nhouse\nINNER JOIN person ON house.pcucode = person.pcucodeperson AND house.hcode = person.hcode\nLEFT JOIN ctitle on ctitle.titlecode = person.prename\nINNER JOIN visit ON person.pcucodeperson = visit.pcucodeperson AND person.pid = visit.pid\nINNER JOIN visitfp ON visit.pcucodeperson = visitfp.pcucodeperson AND visit.pid = visitfp.pid AND visit.visitdate = visitfp.datefp\nwhere visitfp.pregtest = '17' and visit.visitdate between '{$str}' and '{$sto}' {$wvill}\norder by visit.visitdate,person.fname";
$result = mysql_query($sql);
$txt = '<p align=\'center\'><b>รายงานการตรวจทดสอบการตั้งครรภ์<br>';
$txt .= "ข้อมูลวันที่ {$strx} ถึง {$stox} {$mu}</b></p><b>{$hosp}</b><table width='99%' border='0' cellspacing='1' cellpadding='1' class='table table-striped table-hover table-bordered'>\n <tr>\n <th width='4%' scope='col'><div align='center'>ลำดับ</th>\n\t<th width='5%' scope='col'><div align='center'>HN</th>\n <th width='10%' scope='col'><div align='center'>ชื่อ - สกุล</th>\n\t<th width='5%' scope='col'><div align='center'>อายุ</th>\n <th width='6%' scope='col'><div align='center'>บ้านเลขที่</th>\n\t<th width='4%' scope='col'><div align='center'>หมู่ที่</th>\n <th width='4%' scope='col'><div align='center'>วันที่ตรวจ</th>\n\t<th width='9%' scope='col'><div align='center'>ผลการตรวจ</th>\n\t<th width='9%' scope='col'><div align='center'>ผู้ตรวจ</th>\n </tr>";
while ($row = mysql_fetch_array($result)) {
$moo = substr($row[villcode], 6, 2);
$vill = getMooVillage($row[villcode]);
$userv = getusername($row[username]);
if ($row[pregtestresult] == "0") {
$pregtestname = "ไม่ตั้งครรภ์";
} elseif ($row[pregtestresult] == "1") {
$pregtestname = "ตั้งครรภ์";
} elseif ($row[pregtestresult] == "3") {
$pregtestname = "แปลผลไม่ได้";
} else {
$pregtestname = "";
}
if ($row[visitdate] == "") {
$appsick = "";
} else {
$appsick = retDatets($row[visitdate]);
}
++$i;
if ($i % 2 == 1) {
$cr = " class='altrow'";
} else {
$cr = "";
}
$txt .= " <tr {$cr}>\n <td><div align='center'>{$i}</div></td>\n\t<td><div align='center'>{$row['pid']}</div></td>\n <td>{$row['pname']}</td>\n\t<td><div align='center'>{$row['age']}</div></td>\n <td><div align='center'>{$row['hno']}</div></td>\n <td><div align='center'>{$moo}</div></td>\n\t<td><div align='center'>{$appsick}</div></td>\n\t<td><div align='center'>{$pregtestname}</div></td>\n\t<td><div align='left'>{$userv}</div></td>\n </tr>";
}
$txt .= "</table><br>";
echo $txt;
}
示例3: getusername
function getusername($tmp_username)
{
global $db, $db_prefix;
$sql = "select * from {$db_prefix}users where username='{$tmp_username}' ";
$result = $db->get_one($sql);
if (!empty($result)) {
$name = getrand();
getusername($name);
} else {
return $tmp_username;
}
}
示例4: showComments
function showComments(PluginIdeaboxIdeabox $ideabox)
{
global $DB, $CFG_GLPI;
$instID = $ideabox->fields['id'];
if (!$ideabox->can($instID, "r")) {
return false;
}
$rand = mt_rand();
$canedit = $ideabox->can($instID, 'w');
$query = "SELECT `glpi_plugin_ideabox_comments`.`name` AS name,\n `glpi_plugin_ideabox_comments`.`id`,\n `glpi_plugin_ideabox_comments`.`plugin_ideabox_ideaboxes_id`,\n `glpi_plugin_ideabox_comments`.`date_comment`,\n `glpi_plugin_ideabox_comments`.`comment`,\n `glpi_plugin_ideabox_comments`.`users_id` AS users_id\n FROM `glpi_plugin_ideabox_comments` ";
$query .= " LEFT JOIN `glpi_plugin_ideabox_ideaboxes`\n ON (`glpi_plugin_ideabox_ideaboxes`.`id` = `glpi_plugin_ideabox_comments`.`plugin_ideabox_ideaboxes_id`)";
$query .= " WHERE `glpi_plugin_ideabox_comments`.`plugin_ideabox_ideaboxes_id` = '{$instID}'\n ORDER BY `glpi_plugin_ideabox_comments`.`name`";
$result = $DB->query($query);
$number = $DB->numrows($result);
echo "<div class='spaced'>";
if ($canedit && $number) {
Html::openMassiveActionsForm('mass' . __CLASS__ . $rand);
$massiveactionparams = array();
Html::showMassiveActions(__CLASS__, $massiveactionparams);
}
if ($number != 0) {
echo "<table class='tab_cadre_fixe'>";
echo "<tr>";
if ($canedit && $number) {
echo "<th width='10'>" . Html::getCheckAllAsCheckbox('mass' . __CLASS__ . $rand) . "</th>";
}
echo "<th>" . __('Name') . "</th>";
echo "<th>" . __('Author') . "</th>";
echo "<th>" . __('Date') . "</th>";
echo "<th>" . __('Content') . "</th>";
echo "</tr>";
Session::initNavigateListItems($this->getType(), PluginIdeaboxIdeabox::getTypeName(2) . " = " . $ideabox->fields["name"]);
$i = 0;
$row_num = 1;
while ($data = $DB->fetch_array($result)) {
Session::addToNavigateListItems($this->getType(), $data['id']);
$i++;
$row_num++;
echo "<tr class='tab_bg_1 center'>";
echo "<td width='10'>";
if ($canedit) {
Html::showMassiveActionCheckBox(__CLASS__, $data["id"]);
}
echo "</td>";
echo "<td class='center'>";
echo "<a href='" . $CFG_GLPI["root_doc"] . "/plugins/ideabox/front/comment.form.php?id=" . $data["id"] . "&plugin_ideabox_ideaboxes_id=" . $data["plugin_ideabox_ideaboxes_id"] . "'>";
echo $data["name"];
if ($_SESSION["glpiis_ids_visible"] || empty($data["name"])) {
echo " (" . $data["id"] . ")";
}
echo "</a></td>";
echo "<td class='center'>" . getusername($data["users_id"]) . "</td>";
echo "<td class='center'>" . Html::convdatetime($data["date_comment"]) . "</td>";
echo "<td class='left'>" . nl2br($data["comment"]) . "</td>";
echo "</tr>";
}
echo "</table>";
}
if ($canedit && $number) {
$paramsma['ontop'] = false;
Html::showMassiveActions(__CLASS__, $paramsma);
Html::closeForm();
}
echo "</div>";
}
示例5: mysql_fetch_array
$row = mysql_fetch_array($result);
$hosp = $row[chospital_hosname];
$str = retdaterangstr($_GET[str]);
$sto = retdaterangsto($_GET[str]);
$strx = retDatets($str);
$stox = retDatets($sto);
$sql = "SELECT person.idcard\n,CONVERT(concat(ifnull(titlename,ifnull(prename,'ไม่ระบุ') ),fname,' ',lname) USING utf8) as pname \n,v.pid\n ,CONVERT(case when person.subdistcodemoi is null then 'นอกเขต' \n when person.hnomoi is null then concat(' หมู่ที่ ', person.`mumoi` ,' ต.', csd.`subdistname` )\n when person.mumoi is null then concat(person.`hnomoi` ,' ต.', csd.`subdistname` )\n else concat(person.`hnomoi` ,' หมู่ที่ ', person.`mumoi` ,' ต.', csd.`subdistname` ) end USING utf8) AS address\n ,v.rightcode,rightname,v.visitno,v.pcucode,v.visitdate,chospital.hosname,\n\t GROUP_CONCAT(concat(cdrug.drugname,'<br>')) as drugname,\n\t GROUP_CONCAT(visitdrug.unit) as unit,\n\t GROUP_CONCAT(visitdrug.dateupdate) as dateupdate,\n\t v.username,\nhouse.hno,\nhouse.villcode,\nhouse.xgis,\nhouse.ygis\nfrom visit v left join person on v.pid = person.pid and v.pcucodeperson = person.pcucodeperson\n\tleft join ctitle on person.prename = ctitle.titlecode\n left join cright on v.rightcode = cright.rightcode\n left join house on person.hcode = house.hcode and person.pcucodeperson = house.pcucode\n left join village on house.villcode = village.villcode and house.pcucode = village.pcucode\n left join csubdistrict csd on csd.provcode = left(village.villcode,2) and csd.distcode = substring(village.villcode,3,2) and csd.subdistcode = substring(village.villcode,5,2)\n\tleft join chospital on v.pcucode = chospital.hoscode\n left join visitdrug on v.visitno = visitdrug.visitno and v.pcucode = visitdrug.pcucode\n left join cdrug on visitdrug.drugcode = cdrug.drugcode\nWHERE cdrug.drugtype='10' \n \tand visitdate between '{$str}' and '{$sto}' and (v.flagservice <'04' OR v.flagservice is null OR length(trim(v.flagservice))=0 )\ngroup by v.visitno,v.pcucode\norder by visitdate,village.villcode";
$result = mysql_query($sql);
$txt = '<p align=\'center\'><b>รายงานผู้รับบริการที่ได้รับยาสมุนไพร<br>';
$txt .= "<p div align='center' class='text-danger'>ข้อมูลระหว่างวันที่ {$strx} ถึง {$stox} </p></div></p><br>{$hosp}</b><br><table width='99%' border='0' cellspacing='1' cellpadding='1' class='table table-striped table-hover table-bordered'>\n <tr>\n <th width='5%' scope='col'>ลำดับ</th>\n\t<th width='11%' scope='col'>เลขบัตรประชาชน</th>\n <th width='11%' scope='col'>ชื่อ - สกุล</th>\n\t<th width='7%' scope='col'>ที่อยู่</th>\n\t<th width='7%' scope='col'>วันที่ใช้บริการ</th>\n\t<th width='20%' scope='col'>วินิจฉัย</th>\n\t<th width='14%' scope='col'>ยาสมุนไพร</th>\n <th width='10%' scope='col'>ผู้ให้บริการ</th>\n\t<th width='6%' scope='col'>จำนวน</th>\n <th width='8%' scope='col'>วันที่บันทึกข้อมูล</th>\n </tr>";
while ($row = mysql_fetch_array($result)) {
$moo = substr($row[villcode], 6, 2);
$vill = getMooVillage($row[villcode]);
$sick = retDatets($row[visitdate]);
$dupdate = retDatets($row[dateupdate]);
$uname = getusername($row[username]);
$sqlv = "SELECT\nvisitdiag.visitno,\nGROUP_CONCAT(concat('<br>',cdisease.diseasecode,' ',cdisease.diseasenamethai)) as diagcoded\nFROM\nvisitdiag\nINNER JOIN cdisease ON visitdiag.diagcode = cdisease.diseasecode\nwhere visitdiag.visitno = {$row['visitno']}\n\t\t\t\t\tORDER BY visitdiag.diagcode";
$resultv = mysql_query($sqlv);
$rowv = mysql_fetch_array($resultv);
$diagcodex = $rowv[diagcoded];
++$x;
if ($x % 2 == 1) {
$cr = " class='altrow'";
} else {
$cr = "";
}
$txt .= " <tr {$cr}>\n <td><div align='center'>{$x}</div></td>\n\t<td>{$row['idcard']}</td>\n <td>{$row['pname']}</td>\n\t<td>{$row['hno']} หมู่ที่ {$moo}</td>\n <td>{$sick}</td>\n\t<td>{$diagcodex}</td>\n <td>{$row['drugname']}</td>\n\t<td>{$uname}</td>\n\t<td><div align='center'>{$row['unit']} {$row['unitsellname']}</td>\n <td>{$dupdate}</td>\n </tr>";
}
$txt .= "</table><br>";
echo $txt;
} else {
示例6: redirect
* Version 3 der Lizenz oder (nach Ihrer Wahl) jeder spaeteren
* veroeffentlichten Version, weiterverbreiten und/oder modifizieren.
*
* Easy-WI wird in der Hoffnung, dass es nuetzlich sein wird, aber
* OHNE JEDE GEWAEHELEISTUNG, bereitgestellt; sogar ohne die implizite
* Gewaehrleistung der MARKTFAEHIGKEIT oder EIGNUNG FUER EINEN BESTIMMTEN ZWECK.
* Siehe die GNU General Public License fuer weitere Details.
*
* Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
if (!isset($admin_id) or !isset($reseller_id) or $main != 1 or isset($admin_id) and !$pa['settings'] or $reseller_id != 0) {
redirect('admin.php');
}
$loguserid = $admin_id;
$logusername = getusername($admin_id);
$logusertype = 'admin';
$logreseller = 0;
$logsubuser = 0;
$sprache = getlanguagefile('columns', $user_language, $reseller_id);
if ($ui->w('action', 4, 'post') and !token(true)) {
$template_file = $spracheResponse->token;
} else {
if (in_array($ui->st('d', 'get'), array('ad', 'md'))) {
$id = $ui->id('id', 10, 'get');
if (in_array($ui->st('action', 'post'), array('ad', 'md'))) {
$error = array();
if (!$ui->active('active', 'post')) {
$error[] = 'Active';
}
if (!$ui->id('length', 10, 'post')) {
示例7: mysql_query
<?php
$user = $_SESSION[user_id];
$sql = "SELECT * FROM `user` where `user`.username = '" . $user . "'";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($result);
$mtitle = $row['prename'];
$mpassword = $row['password'];
$mtitlename = getTitle($row['prename']);
$mfname = $row['fname'];
$mlname = $row['lname'];
$mname = $row['username'];
$mavatar = getavatar($row['username']);
$musername = getusername($row['username']);
$midcard = $row['idcard'];
$hospname = gethospname($row['pcucode']);
$mposition = getuserposition($row['username']);
?>
<section class="content-header">
<h1>
ข้อมูลส่วนตัว
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">profile</li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<!-- Primary box -->
示例8: VALUES
} else {
if ($ip == $row['ip'] and $port == $row['port']) {
$errors['ip'] = $sprache->ip;
$errors['port'] = $sprache->port;
}
}
}
}
if (count($errors) == 0) {
if ($ui->st('action', 'post') == 'ad' and isset($rootServer)) {
$query = $sql->prepare("INSERT INTO `voice_dns` (`active`,`dns`,`ip`,`port`,`tsdnsID`,`userID`,`externalID`,`resellerID`) VALUES (?,?,?,?,?,?,?,?)");
$query->execute(array($active, $dns, $ip, $port, $rootID, $userID, $externalID, $resellerLockupID));
$rowCount = $query->rowCount();
$id = $sql->lastInsertId();
if ($dns == $rootServer['defaultdns']) {
$dns = strtolower($id . '-' . getusername($userID) . '.' . $rootServer['defaultdns']);
$query = $sql->prepare("UPDATE `voice_dns` SET `dns`=? WHERE `dnsID`=? LIMIT 1");
$query->execute(array($dns, $id));
$rowCount += $query->rowCount();
}
$loguseraction = '%add% %tsdns% ' . $ip . ':' . $port . ' ' . $dns;
} else {
if ($ui->st('action', 'post') == 'md' and $id and isset($rootServer)) {
$query = $sql->prepare("UPDATE `voice_dns` SET `active`=?,`dns`=?,`ip`=?,`port`=?,`externalID`=? WHERE `dnsID`=? AND `resellerID`=? LIMIT 1");
$query->execute(array($active, $dns, $ip, $port, $externalID, $id, $resellerLockupID));
$rowCount = $query->rowCount();
$loguseraction = '%mod% %tsdns% ' . $ip . ':' . $port . ' ' . $dns;
}
}
if (isset($rowCount) and $rowCount > 0) {
if (isset($rootServer)) {
示例9: showForm
function showForm($ID, $options = array())
{
global $CFG_GLPI;
if (!$this->canView()) {
return false;
}
if ($ID > 0) {
$this->check($ID, 'r');
} else {
// Create item
$this->check(-1, 'w');
$this->getEmpty();
}
$this->showTabs($options);
$options['colspan'] = 1;
$this->showFormHeader($options);
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Name') . "</td>";
echo "<td>";
Html::autocompletionTextField($this, "name");
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Associable to a ticket') . "</td><td>";
Dropdown::showYesNo('is_helpdesk_visible', $this->fields['is_helpdesk_visible']);
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Author') . "</td><td>";
if ($ID > 0) {
echo getusername($this->fields["users_id"]);
} else {
echo getusername(Session::getLoginUserID());
}
if (!empty($this->fields["date_idea"]) && !empty($ID)) {
echo " - " . __('Date of submission', 'ideabox') . ": " . Html::convDateTime($this->fields["date_idea"]);
}
echo "<input type='hidden' name='users_id' value='" . Session::getLoginUserID() . "'>";
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td colspan = '2'>";
echo "<table cellpadding='2' cellspacing='2' border='0'><tr><td>";
echo __('Description') . "</td></tr>";
echo "<tr><td class='center'>";
echo "<textarea cols='125' rows='14' name='comment'>" . $this->fields["comment"] . "</textarea>";
echo "</td></tr></table>";
echo "</td>";
echo "</tr>";
if (empty($this->fields["date_idea"])) {
echo "<input type='hidden' name='date_idea' value=\"" . $_SESSION["glpi_currenttime"] . "\">";
}
$this->showFormButtons($options);
$this->addDivForTabs();
return true;
}
示例10: elseif
} elseif ($data['action'] == "admin_adminrights_removed") {
echo $locale['132'] . " " . getusername($data['subject']);
} elseif ($data['action'] == "admin_adminrights_changed") {
echo $locale['133'] . " " . getusername($data['subject']);
} elseif ($data['action'] == "admin_groupadminrights_changed") {
echo "Groupadminrights changed: " . getgroupname($data['subject']);
} elseif ($data['action'] == "admin_blacklist_added") {
echo $locale['134'];
} elseif ($data['action'] == "admin_blacklist_removed") {
echo $locale['135'];
} elseif ($data['action'] == "admin_blacklist_changed") {
echo $locale['136'];
} elseif ($data['action'] == "admin_moderator_added") {
echo "Moderator added:" . " " . getusername($data['subject']);
} elseif ($data['action'] == "admin_moderator_removed") {
echo "Moderator removed:" . " " . getusername($data['subject']);
} elseif ($data['action'] == "admin_forumrank_added") {
echo $locale['137'];
} elseif ($data['action'] == "admin_forumrank_removed") {
echo $locale['138'];
} elseif ($data['action'] == "admin_forumrank_changed") {
echo $locale['139'];
} elseif ($data['action'] == "admin_adssystem_in_save") {
echo "Advertising in Forum Index changed";
} elseif ($data['action'] == "admin_adssystem_vf_save") {
echo "Advertising in Forum Threads changed";
} elseif ($data['action'] == "admin_banners_save") {
echo $locale['140'];
} elseif ($data['action'] == "admin_banners_preview") {
echo $locale['141'];
} elseif ($data['action'] == "admin_bbcode_enable") {
示例11: _
<div class="row">
<div class="col-xs-11 col-sm-11 col-md-11 col-lg-11">
<ul class="list-inline">
<li><a href="<?php
echo $systemrules;
?>
"><span class="glyphicon glyphicon-question-sign"></span> <?php
echo _('Help');
?>
</a></li>
<?php
if (isloggedin() and getprivileges($_COOKIE["loguserid"]) > 0) {
echo '<li><a href="admin.php"><span class="glyphicon glyphicon-cog"></span> ', _('Admin'), '</a></li>';
}
if (isloggedin()) {
echo '<li><span class="glyphicon glyphicon-user"></span> <small>', getusername($_COOKIE["loguserid"]), '</small>';
if (iscreditenabled()) {
echo ' (<span id="usercredit" title="', _('Remaining credit'), '">', getusercredit($_COOKIE["loguserid"]), '</span> ', getcreditcurrency(), ' <button type="button" class="btn btn-success btn-xs" id="opencredit" title="', _('Add credit'), '"><span class="glyphicon glyphicon-plus"></span></button>)<span id="couponblock"><br /><span class="form-inline"><input type="text" class="form-control input-sm" id="coupon" placeholder="XXXXXX" /><button type="button" class="btn btn-primary btn-sm" id="validatecoupon" title="', _('Confirm coupon'), '"><span class="glyphicon glyphicon-plus"></span></button></span></span></li>';
}
echo '<li><a href="command.php?action=logout" id="logout"><span class="glyphicon glyphicon-log-out"></span> ', _('Log out'), '</a></li>';
}
?>
</ul>
</div>
<div class="col-xs-1 col-sm-1 col-md-1 col-lg-1">
</div>
</div>
<div class="row">
<div class="col-xs-11 col-sm-11 col-md-11 col-lg-11">
<h1 class="pull-left"><?php
echo $systemname;
示例12: getlastupdate
function getlastupdate($m)
{
global $xmlrpcerruser;
$err = "";
// get the param values (should add integrity checking here)
$ul = $m->getParam(0);
if ($ul->kindOf() == 'struct' || $ul->kindOf() == 'array') {
$arr = xmlrpc_decode($ul);
foreach ($arr as $i => $username) {
if (is_int($username)) {
$arr[$i] = getusername($username);
}
}
$lastupdate_a = plan_get_last_update($arr);
foreach ($lastupdate_a as $i => $update) {
$returnarray[$arr[$i]] = $update;
}
$return_a = xmlrpc_encode($returnarray);
$returnval = new xmlrpcresp($return_a);
// mail("joshuawdavidson@gmail.com","update time request",$_SERVER['REMOTE_ADDR']."\n\n".print_r($ul,TRUE)."\n\n".print_r($returnarray,TRUE),"From: system@planwatch.org");
}
if ($ul->kindOf() == 'scalar') {
if ($ul->scalartyp() == 'int') {
$username = getusername($ul->scalarval());
} else {
$username = $ul->scalarval();
}
list($username, $archives) = explode("___", $username);
$lastact_val = plan_get_last_update($username);
$returnval = new xmlrpcresp(new xmlrpcval($lastact_val, 'int'));
}
// if we generated an error, create an error return response
if ($err) {
return new xmlrpcresp(0, $xmlrpcerruser, $err);
} else {
// otherwise, we create the right response
// with the state name
return $returnval;
}
}
示例13: sec_session_start
include_once "ctrl.attendance.php";
//error_reporting(E_ALL);
//ini_set( 'display_errors','1');
sec_session_start();
$yr['0'] = $_SESSION['year'];
$yr['1'] = $_SESSION['month'];
//echo $yr['1'];
$out_limit = $_SESSION['sess_user_outtime'];
$in_limit = $_SESSION['sess_user_intime'];
$to = $_SESSION['sess_user_id'];
$rsesult = getmail($to, $db);
foreach ($rsesult as $row) {
$tosend = $row['email'];
//echo $tosend;
}
$getname = getusername($_SESSION['sess_user_id'], $db);
foreach ($getname as $result) {
$fname = $result['user_name'];
$eid = $result['user_eid'];
//echo $eid;
}
$getCurrentMonth = getCurrentMonth($yr, $_SESSION['sess_user_id'], $db);
$to_mail = implode(", ", MailList(getHeaders(1, $db), 'to', $db));
$to_cc = implode(", ", MailList(getHeaders(1, $db), 'cc', $db));
$to_bcc = implode(", ", MailList(getHeaders(1, $db), 'bcc', $db));
$body = '<html>
<head><title></title>
<style>
td{text-align:center; border-bottom: 1px dotted #514F4F;}
table{width:900px;}
span{color:red;}
示例14: elseif
} elseif ($chk_ultra == "4") {
$chksto = "and tmp.vitalcheck is null";
} else {
$chksto = "";
}
$str = retDate($_GET[str]);
$sto = retDate($_GET[sto]);
$ovyear = substr($sto, 0, 4);
$sql = "SELECT\nperson.pcucodeperson,\nperson.pid,\nperson.idcard,\nCONVERT(concat(ifnull(ctitle.titlename,ifnull(person.prename,'ไม่ระบุ') ),person.fname,' ' ,person.lname) using utf8) as pname,\nctitle.titlename,\nperson.fname,\nperson.lname,\nperson.birth,\ngetageyearnum(person.birth,'{$str}') AS age,\nhouse.hno,\nhouse.villcode,\nhouse.xgis,\nhouse.ygis,\nhouse.usernamedoc,\nvisitepi.vaccinecode,\nvisitepi.dateepi\nFROM\nvillage\nINNER JOIN house ON village.pcucode = house.pcucode AND village.villcode = house.villcode\nINNER JOIN person ON house.pcucode = person.pcucodeperson AND house.hcode = person.hcode\nINNER JOIN visitepi ON person.pcucodeperson = visitepi.pcucodeperson AND person.pid = visitepi.pid\nINNER JOIN ctitle ON person.prename = ctitle.titlecode\nWHERE visitepi.vaccinecode in ('dT1','dTs1') and visitepi.dateepi between '{$str}' and '{$sto}' {$wvill}\nORDER BY house.villcode asc ,house.hno*1 asc,getageyearnum(person.birth,'{$str}') desc\n";
$result = mysql_query($sql);
$txt = '<p align=\'center\'><b>รายชื่อผู้รับบริการฉีดวัคซีน dT1 และ dTs1 ';
$txt .= "<br>ข้อมูลระหว่างวันที่ {$_GET['str']} ถึง {$_GET['sto']} {$mu} </b></p><b>{$hosp}</b><table width='99%' border='0' cellspacing='1' cellpadding='1' class='tbhl'>\n <tr>\n <th width='4%' scope='col'>ลำดับ</th>\n\t<th width='5%' scope='col'>HN</th>\n\t<th width='10%' scope='col'>เลขบัตรประชาชน</th>\n <th width='10%' scope='col'>ชื่อ - สกุล</th>\n\t<th width='5%' scope='col'>อายุ</th>\n <th width='6%' scope='col'>บ้านเลขที่</th>\n <th width='4%' scope='col'>หมู่ที่</th>\n <th width='8%' scope='col'>วันที่ฉีดวัคซีน</th>\n\t<th width='13%' scope='col'>ชนิดวัคซีน</th>\n\t<th width='12%' scope='col'>นสค.</th>\n </tr>";
while ($row = mysql_fetch_array($result)) {
$moo = substr($row[villcode], 6, 2);
$vill = getMooVillage($row[villcode]);
$nsk = getusername($row[usernamedoc]);
if ($row[dateepi] == "") {
$sick = "";
} else {
$sick = retDatets($row[dateepi]);
}
++$i;
if ($i % 2 == 1) {
$cr = " class='altrow'";
} else {
$cr = "";
}
$txt .= " <tr {$cr}>\n <td><div align='center'>{$i}</div></td>\n\t<td><div align='center'>{$row['pid']}</div></td>\n\t<td><div align='center'>{$row['idcard']}</div></td>\n <td>{$row['pname']}</td>\n\t<td><div align='center'>{$row['age']}</div></td>\n <td><div align='center'>{$row['hno']}</div></td>\n <td><div align='center'>{$moo}</div></td>\n <td><div align='center'>{$sick}</div></td>\n\t<td><div align='center'>{$row['vaccinecode']}</div></td>\n\t<td>{$nsk}</td>\n </tr>";
}
$txt .= "</table><br>";
echo $txt;
示例15: exit
//判断用户今天是否参与过摇奖
if (dgmdate($_G['timestamp'], 'Ymd', $_G['setting']['timeoffset']) <= dgmdate($zzza_lasttime_dateline, 'Ymd', $_G['setting']['timeoffset'])) {
exit('Access Denied');
}
//是否初始化获得积分
$initialization_mark = DB::result_first("SELECT value FROM " . DB::table('yinxingfei_zzza_mark') . " WHERE uid = '" . $_G['uid'] . "'");
$initialization_mark = empty($initialization_mark) ? 0 : $initialization_mark;
//0:未初始化
//1:已经初始化
if ($initialization_mark == 0) {
$range1percentage = DB::result_first("SELECT percentage FROM " . DB::table('yinxingfei_zzza_range') . " WHERE id = '1'");
$range2percentage = DB::result_first("SELECT percentage FROM " . DB::table('yinxingfei_zzza_range') . " WHERE id = '2'");
$range3percentage = DB::result_first("SELECT percentage FROM " . DB::table('yinxingfei_zzza_range') . " WHERE id = '3'");
$rangeid = get_rand(array($range1percentage, $range2percentage, $range3percentage));
$rangeid = $rangeid + 1;
$rangeab = DB::fetch_first("SELECT min,max FROM " . DB::table('yinxingfei_zzza_range') . " WHERE id = '" . $rangeid . "'");
$initialization_extcredit = mt_rand($rangeab['min'], $rangeab['max']);
$today_extcredit = $initialization_extcredit;
$zzzadata['uid'] = $_G['uid'];
$zzzadata['username'] = getusername($_G['uid']);
$zzzadata['today_extcredit'] = $initialization_extcredit;
DB::insert('yinxingfei_zzza_rank', $zzzadata, false, true);
//更新插入数据
//防止用户通过多浏览器不断刷新刷积分代码,我们就通过初始化记录为准,不管刷新多少次都是调用初始化
$newmark = array('uid' => $_G['uid'], 'value' => 1);
DB::insert('yinxingfei_zzza_mark', $newmark, false, true);
} else {
$today_extcredit = $zzzadata['today_extcredit'];
}
$today_extcredit = sprintf("%03d", $today_extcredit);
exit($today_extcredit);