• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getLoggedOnMemberID函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getLoggedOnMemberID函数的典型用法代码示例。如果您正苦于以下问题:PHP getLoggedOnMemberID函数的具体用法?PHP getLoggedOnMemberID怎么用?PHP getLoggedOnMemberID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getLoggedOnMemberID函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: reject

function reject()
{
    global $message;
    $id = $_POST['pk1'];
    $messageid = $_POST['pk2'];
    $sql = "SELECT A.weeknumber, A.memberid, A.swapmemberid  " . "FROM {$_SESSION['DB_PREFIX']}oncallswap A " . "WHERE A.id = {$id}";
    $result = mysql_query($sql);
    if ($result) {
        /* Show children. */
        while ($member = mysql_fetch_assoc($result)) {
            $qry = "UPDATE {$_SESSION['DB_PREFIX']}oncallswap " . "SET agreed = 'X', metamodifieddate = NOW(), metamodifieduserid = " . getLoggedOnMemberID() . " " . "WHERE id = {$id}";
            $itemresult = mysql_query($qry);
            if (!$itemresult) {
                logError($qry . " = " . mysql_error());
            }
            $qry = "UPDATE {$_SESSION['DB_PREFIX']}messages " . "SET status = 'R', metamodifieddate = NOW(), metamodifieduserid = " . getLoggedOnMemberID() . " " . "WHERE id = {$messageid}";
            $itemresult = mysql_query($qry);
            if (!$itemresult) {
                logError($qry . " = " . mysql_error());
            }
            sendInternalUserMessage($member['memberid'], "On Call Swap Request", "Your request for on call cover for week " . $member['weeknumber'] . " has been rejected by " . GetUserName($member['swapmemberid']));
            $message = "Request has been rejected";
        }
    }
}
开发者ID:prodigyworks,项目名称:Service-Call,代码行数:25,代码来源:confirmswap.php


示例2: showColumn

function showColumn()
{
    $id = $_POST['gridid'];
    $qry = "UPDATE {$_SESSION['DB_PREFIX']}applicationtablecolumns SET hidecolumn = 0, metamodifieddate = NOW(), metamodifieduserid = " . getLoggedOnMemberID() . " WHERE id = {$id}";
    $result = mysql_query($qry);
    if (!$result) {
        logError($qry . " - " . mysql_error());
    }
}
开发者ID:prodigyworks,项目名称:Service-Call,代码行数:9,代码来源:managegrids.php


示例3: postAddScriptEvent

    public function postAddScriptEvent()
    {
        ?>
			var myDate = new Date(); 
			var prettyDate =
					padZero(myDate.getDate()) + '/' +         
				    padZero((myDate.getMonth() + 1)) + '/' + 
					myDate.getFullYear(); 
					 
			$("#memberid").val("<?php 
        echo getLoggedOnMemberID();
        ?>
").trigger("change");
			$("#requesteddate").val(prettyDate).trigger("change");
			$("#startdate").val(prettyDate).trigger("change");
			$("#enddate").val(prettyDate).trigger("change");
			$("#startdate_half").attr("checked", true).trigger("change");
			$("#enddate_half").attr("checked", true).trigger("change");
			<?php 
    }
开发者ID:prodigyworks,项目名称:Trianik,代码行数:20,代码来源:holidays.php


示例4: preCommandEvent

 public function preCommandEvent()
 {
     if (isset($_POST['rolecmd'])) {
         if (isset($_POST['roles'])) {
             $counter = count($_POST['roles']);
         } else {
             $counter = 0;
         }
         $memberid = $_POST['memberid'];
         $qry = "DELETE FROM {$_SESSION['DB_PREFIX']}userroles WHERE memberid = {$memberid}";
         $result = mysql_query($qry);
         if (!$result) {
             logError(mysql_error());
         }
         for ($i = 0; $i < $counter; $i++) {
             $roleid = $_POST['roles'][$i];
             $qry = "INSERT INTO {$_SESSION['DB_PREFIX']}userroles (memberid, roleid, metacreateddate, metacreateduserid, metamodifieddate, metamodifieduserid) VALUES ({$memberid}, '{$roleid}', NOW(), " . getLoggedOnMemberID() . ", NOW(), " . getLoggedOnMemberID() . ")";
             $result = mysql_query($qry);
         }
     }
 }
开发者ID:prodigyworks,项目名称:schokolat,代码行数:21,代码来源:users.php


示例5: logout

function logout()
{
    start_db();
    if (isAuthenticated()) {
        $qry = "UPDATE {$_SESSION['DB_PREFIX']}loginaudit SET " . "timeoff = NOW(), metamodifieddate = NOW(), metamodifieduserid = " . getLoggedOnMemberID() . " " . "WHERE id = " . $_SESSION['SESS_LOGIN_AUDIT'] . "";
        $result = mysql_query($qry);
    }
    session_unset();
    $_SESSION['ROLES'][] = 'PUBLIC';
}
开发者ID:prodigyworks,项目名称:schokolat,代码行数:10,代码来源:system-db.php


示例6: mysql_escape_string

require_once "tinymce.php";
?>

<!--  Start of content -->
<?php 
if (isset($_POST['domainurl'])) {
    $runscheduledays = mysql_escape_string($_POST['runscheduledays']);
    $domainurl = mysql_escape_string($_POST['domainurl']);
    $emailfooter = mysql_escape_string($_POST['emailfooter']);
    $address = mysql_escape_string($_POST['address']);
    $bookingprefix = $_POST['bookingprefix'];
    $refereereportemail = $_POST['refereereportemail'];
    $invoiceprefix = $_POST['invoiceprefix'];
    $maintenancemode = $_POST['maintenancemode'];
    $vatrate = $_POST['vatrate'];
    $qry = "UPDATE {$_SESSION['DB_PREFIX']}siteconfig SET " . "domainurl = '{$domainurl}', " . "vatrate = {$vatrate}, " . "address = '{$address}', " . "bookingprefix = '{$bookingprefix}', " . "refereereportemail = '{$refereereportemail}', " . "invoiceprefix = '{$invoiceprefix}', " . "maintenancemode = '{$maintenancemode}', " . "runscheduledays = '{$runscheduledays}', " . "emailfooter = '{$emailfooter}', metamodifieddate = NOW(), metamodifieduserid = " . getLoggedOnMemberID() . "";
    $result = mysql_query($qry);
    if (!$result) {
        logError("UPDATE {$_SESSION['DB_PREFIX']}siteconfig:" . $qry . " - " . mysql_error());
    }
    unset($_SESSION['SITE_CONFIG']);
}
$qry = "SELECT *, DATE_FORMAT(lastschedulerun, '%d/%m/%Y') AS lastschedulerun FROM {$_SESSION['DB_PREFIX']}siteconfig";
$result = mysql_query($qry);
if ($result) {
    while ($member = mysql_fetch_assoc($result)) {
        ?>
<form id="contentForm" name="contentForm" method="post" class="entryform">
	<label>Domain URL</label>
	<input required="true" type="text" class="textbox90" id="domainurl" name="domainurl" value="<?php 
        echo $member['domainurl'];
开发者ID:prodigyworks,项目名称:FA,代码行数:31,代码来源:siteconfig.php


示例7: mysql_query

        $qry = "UPDATE {$_SESSION['DB_PREFIX']}team SET \n\t\t\t\t\tfirstname = '{$fname}', \n\t\t\t\t\tlastname = '{$lname}',\n\t\t\t\t\ttelephone = '{$landline}',\n\t\t\t\t\temail = '{$email}'\n\t\t\t\t\tWHERE id = {$clubid}";
        $result = mysql_query($qry);
        if (!$result) {
            logError("UPDATE team failed ({$qry}):" . mysql_error());
        }
    }
    mysql_query("COMMIT");
    sendUserMessage(getLoggedOnMemberID(), "User Registration", "User " . $_POST['login'] . " has been registered as a user.<br>Password : " . $_POST['password']);
    sendUserMessage($memberid, "User Registration", "<h3>Welcome " . $_POST['fname'] . " " . $_POST['lname'] . ".</h3><br>You have been invited to become a member of 'Harrow Youth Football League'.<br>Please click on the <a href='" . getSiteConfigData()->domainurl . "/index.php'>link</a> to activate your account.<br><br><h4>Login details</h4>User ID : " . $_POST['login'] . "<br>Password : " . $_POST['password']);
    if ($result) {
        header("location: system-register-success.php");
    } else {
        logError("1 Query failed:" . mysql_error());
    }
} else {
    $memberid = $_GET['id'];
    $qry = "UPDATE {$_SESSION['DB_PREFIX']}members \n\t\t\t\tSET email = '{$email}', \n\t\t\t\tlandline = '{$landline}', \n\t\t\t\tfirstname = '{$fname}', \n\t\t\t\tlastname = '{$lname}', \n\t\t\t\tlastaccessdate = NOW() ";
    if ($password != "") {
        $qry .= ", passwd = '" . md5($password) . "' ";
    }
    $qry .= "WHERE member_id = {$memberid}";
    $result = mysql_query($qry);
    if (!$result) {
        logError("UPDATE members failed:" . mysql_error());
    }
    $_SESSION['SESS_FIRST_NAME'] = $fname;
    $_SESSION['SESS_LAST_NAME'] = $lname;
    sendUserMessage(getLoggedOnMemberID(), "User Amendment", "<h3>User amendment.</h3><br>Your details have been amended.<br>");
    header("location: system-register-amend.php");
}
//Check whether the query was successful or not
开发者ID:prodigyworks,项目名称:FA,代码行数:31,代码来源:system-register-exec.php


示例8: NOW

    $fullname = $fname . " " . $lname;
    //Create INSERT query
    $qry = "INSERT INTO {$_SESSION['DB_PREFIX']}members \n\t\t\t\t(\n\t\t\t\tfirstname, lastname, fullname, login, passwd, mobile,\n\t\t\t\temail, holidayentitlement, accepted, guid, status, \n\t\t\t\tmetacreateddate, metacreateduserid, metamodifieddate, metamodifieduserid\n\t\t\t\t) \n\t\t\t\tVALUES\n\t\t\t\t(\n\t\t\t\t'{$fname}','{$lname}', '{$fullname}', '{$login}', '{$pwd}', '{$mobile}',\n\t\t\t\t'{$email}', {$entitlement}, 'Y', '{$guid}', 'Y', \n\t\t\t\tNOW(), {$loggedon}, NOW(), {$loggedon}\n\t\t\t\t)";
    $result = @mysql_query($qry);
    $memberid = mysql_insert_id();
    if (!$result) {
        logError("{$qry} - " . mysql_error());
    }
    //Create INSERT query
    $qry = "INSERT INTO {$_SESSION['DB_PREFIX']}userroles(memberid, roleid, metacreateddate, metacreateduserid, metamodifieddate, metamodifieduserid) VALUES({$memberid}, 'PUBLIC', NOW(), " . getLoggedOnMemberID() . ", NOW(), " . getLoggedOnMemberID() . ")";
    $result = @mysql_query($qry);
    $qry = "INSERT INTO {$_SESSION['DB_PREFIX']}userroles(memberid, roleid, metacreateddate, metacreateduserid, metamodifieddate, metamodifieduserid) VALUES({$memberid}, 'USER', NOW(), " . getLoggedOnMemberID() . ", NOW(), " . getLoggedOnMemberID() . ")";
    $result = @mysql_query($qry);
    if (isset($_POST['accounttype'])) {
        $accountrole = $_POST['accounttype'];
        $qry = "INSERT INTO {$_SESSION['DB_PREFIX']}userroles(memberid, roleid, metacreateddate, metacreateduserid, metamodifieddate, metamodifieduserid) VALUES({$memberid}, '{$accountrole}', NOW(), " . getLoggedOnMemberID() . ", NOW(), " . getLoggedOnMemberID() . ")";
        $result = @mysql_query($qry);
    }
    sendRoleMessage("ADMIN", "User Registration", "User " . $login . " has been registered as a user.<br>Password : " . $_POST['password']);
    sendUserMessage($memberid, "User Registration", "<h3>Welcome {$fname} {$lname}.</h3><br>You have been invited to become a member of 'Schokolat'.<br><br><h4>Login details</h4>User ID : {$login}<br>Password : " . $_POST['password']);
    if ($result) {
        header("location: system-register-success.php");
    } else {
        logError("1 Query failed:" . mysql_error());
    }
} else {
    $memberid = $_GET['id'];
    $qry = "UPDATE {$_SESSION['DB_PREFIX']}members \n\t\t\t\tSET email = '{$email}', \n\t\t\t\tfirstname = '{$fname}', \n\t\t\t\tlastname = '{$lname}', \n\t\t\t\tmobile = '{$mobile}',\n\t\t\t\tlastaccessdate = NOW(),\n\t\t\t\tpasswd = '{$pwd}', \n\t\t\t\tmetamodifieddate = NOW(), \n\t\t\t\tmetamodifieduserid = {$loggedon}\n\t\t\t\tWHERE member_id = {$memberid}";
    $result = mysql_query($qry);
    if (!$result) {
        logError("UPDATE members failed:" . mysql_error());
开发者ID:prodigyworks,项目名称:schokolat,代码行数:31,代码来源:system-register-exec.php


示例9: getLoggedOnMemberID

		$("#frmpost").submit();
	}
	
</SCRIPT>
<form method="POST" id="frmpost" name="frmpost">
	<input type="hidden" name="mailcommand" id="mailcommand" />
	<table width='100%' cellspacing=4>
	<?php 
if (!isset($_GET['mode']) || $_GET['mode'] == "I") {
    $qry = "SELECT A.id, A.replied, A.status, A.subject, A.message, A.from_member_id, A.to_member_id, " . "DATE_FORMAT(A.createddate, '%m/%d/%Y') AS createddate, A.action, " . "B.firstname AS fromfirstname, B.lastname AS fromlastname, B.imageid AS fromimageid,  " . "C.firstname AS tofirstname, C.lastname AS tolastname, C.imageid AS toimageid  " . "FROM  {$_SESSION['DB_PREFIX']}messages A " . "LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}members C " . "ON C.member_id = A.to_member_id " . "LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}members B " . "ON B.member_id = A.from_member_id " . "WHERE A.to_member_id = " . getLoggedOnMemberID() . " " . "AND (A.deleted != 'Y' OR A.deleted IS NULL) " . "ORDER BY A.createddate DESC";
} else {
    if (isset($_GET['mode']) && $_GET['mode'] == "S") {
        $qry = "SELECT A.id, A.replied, A.status, A.subject, A.message, A.from_member_id, A.to_member_id, " . "DATE_FORMAT(A.createddate, '%m/%d/%Y') AS createddate, A.action, " . "B.firstname AS fromfirstname, B.lastname AS fromlastname, B.imageid AS fromimageid,  " . "C.firstname AS tofirstname, C.lastname AS tolastname, C.imageid AS toimageid  " . "FROM  {$_SESSION['DB_PREFIX']}messages A " . "LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}members C " . "ON C.member_id = A.to_member_id " . "LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}members B " . "ON B.member_id = A.from_member_id " . "WHERE A.from_member_id = " . getLoggedOnMemberID() . " " . "AND (A.deleted != 'Y' OR A.deleted IS NULL) " . "ORDER BY A.createddate DESC";
    } else {
        if (isset($_GET['mode']) && $_GET['mode'] == "D") {
            $qry = "SELECT A.id, A.replied, A.status, A.subject, A.message, A.from_member_id, A.to_member_id, " . "DATE_FORMAT(A.createddate, '%m/%d/%Y') AS createddate, A.action, " . "B.firstname AS fromfirstname, B.lastname AS fromlastname, B.imageid AS fromimageid,  " . "C.firstname AS tofirstname, C.lastname AS tolastname, C.imageid AS toimageid  " . "FROM  {$_SESSION['DB_PREFIX']}messages A " . "LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}members C " . "ON C.member_id = A.to_member_id " . "LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}members B " . "ON B.member_id = A.from_member_id " . "WHERE A.to_member_id = " . getLoggedOnMemberID() . " " . "AND A.deleted = 'Y' " . "ORDER BY A.createddate DESC";
        }
    }
}
$result = mysql_query($qry);
if (!$result) {
    logError("Error: " . mysql_error());
}
//Check whether the query was successful or not
if ($result) {
    while ($member = mysql_fetch_assoc($result)) {
        ?>
		<tr class='mailtable' status='<?php 
        echo $member['status'];
        ?>
'>
开发者ID:prodigyworks,项目名称:Service-Call,代码行数:31,代码来源:messages.php


示例10: url

			<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=1014 align=left >
				<TR>
					<TD style="BACKGROUND: url(images/shadow_lft.png)" width=17>
						&nbsp;
					</TD>
					<TD>
						<div class="tail-top">
						<!-- header -->
						<?php 
if (isAuthenticated()) {
    ?>
							<div id="header" class='header1'>
								<?php 
    $qry = "UPDATE {$_SESSION['DB_PREFIX']}members SET " . "lastaccessdate = NOW(), metamodifieddate = NOW(), metamodifieduserid = " . getLoggedOnMemberID() . " " . "WHERE member_id = " . $_SESSION['SESS_MEMBER_ID'] . "";
    $result = mysql_query($qry);
    $qry = "UPDATE {$_SESSION['DB_PREFIX']}loginaudit SET " . "timeoff = NOW(), metamodifieddate = NOW(), metamodifieduserid = " . getLoggedOnMemberID() . " " . "WHERE id = " . $_SESSION['SESS_LOGIN_AUDIT'] . "";
    $result = mysql_query($qry);
    ?>
								<div id="toppanel">
									<label class="prefix">logged on: </label>
									<label>
									<a href='profile.php'>
										<?php 
    echo getUserName();
    ?>
									</a>
									<span>
									&nbsp;|&nbsp;<a href='system-logout.php'>logout</a>
									</span> 
									</label>
								</div>
开发者ID:prodigyworks,项目名称:Service-Call,代码行数:31,代码来源:system-header.php


示例11: insert

 public function insert()
 {
     try {
         $qry = "INSERT INTO " . $this->table . " (";
         $first = true;
         foreach ($this->columns as $col) {
             if ($col['bind']) {
                 if ($first) {
                     $first = false;
                 } else {
                     $qry = $qry . ", ";
                 }
                 $qry = $qry . $col['name'];
             }
         }
         $qry = $qry . ", metacreateddate, metacreateduserid, metamodifieddate, metamodifieduserid) VALUES (";
         $first = true;
         foreach ($this->columns as $col) {
             if ($col['bind']) {
                 if ($first) {
                     $first = false;
                 } else {
                     $qry = $qry . ", ";
                 }
                 if ($col['type'] == "IMAGE") {
                     $qry = $qry . "'" . getImageData($col['name']) . "'";
                 } else {
                     if ($col['type'] == "FILE") {
                         $qry = $qry . "'" . getFileData($col['name']) . "'";
                     } else {
                         if ($col['type'] == "PASSWORD") {
                             $qry = $qry . "'" . md5($_POST[$col['name']]) . "'";
                         } else {
                             if ($col['type'] == "CHECKBOX") {
                                 $qry = $qry . (isset($_POST[$col['name']]) ? $_POST[$col['name']] == "on" ? 1 : 0 : 0);
                             } else {
                                 if (isset($_POST[$col['name']])) {
                                     if ($col['datatype'] == "timestamp" || $col['datatype'] == "") {
                                         $mysql_date = convertStringToDate($_POST[$col['name']]);
                                         $mysql_time = $_POST[$col['name'] . "_time"];
                                         $qry = $qry . "'" . mysql_escape_string($mysql_date) . " {$mysql_time}'";
                                     } else {
                                         if ($col['datatype'] == "date") {
                                             $mysql_date = convertStringToDate($_POST[$col['name']]);
                                             $qry = $qry . "'" . mysql_escape_string($mysql_date) . "'";
                                         } else {
                                             $qry = $qry . "'" . mysql_escape_string($_POST[$col['name']]) . "'";
                                         }
                                     }
                                 } else {
                                     if ($col['default'] == "TODAY") {
                                         $qry = $qry . "NOW()";
                                     } else {
                                         if ($col['default'] == "USER") {
                                             $qry = $qry . getLoggedOnMemberID();
                                         } else {
                                             $qry = $qry . "'" . mysql_escape_string($col['default']) . "'";
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
         $memberid = getLoggedOnMemberID();
         $qry = $qry . ", NOW(), {$memberid}, NOW(), {$memberid})";
         $result = mysql_query($qry);
         if (!$result) {
             logError($qry . " = " . mysql_error());
         }
         $this->postInsertEvent();
     } catch (Exception $e) {
         $this->errorDescriptions[] = $e->getMessage();
     }
 }
开发者ID:prodigyworks,项目名称:schokolat,代码行数:77,代码来源:crud.php


示例12: function

									$("#notes").val(node.notes);

									$("#detaildialog").dialog("open");
								}
							}
						);
				
				}
		    },
		    
		    dayClick: function(date, element, view) {
<?php 
?>
				$("#eventid").val("");
				$("#userid").val("<?php 
echo getLoggedOnMemberID();
?>
");
				$("#startdate").val(formatDate(date));
				$("#enddate").val(formatDate(date));
				tinyMCE.get("notes").setContent("");
				
				$("#detaildialog").dialog("open");
<?php 
?>
		    },
		    
		    events: function(start, end, callback) {
		    	var startYear = start.getYear();
		    	var endYear = end.getYear();
		    	
开发者ID:prodigyworks,项目名称:Coast-Guard,代码行数:30,代码来源:scheduleplanner.php


示例13: start_db

<?php

require_once "system-db.php";
start_db();
sendRoleMessage("ALERT", "Daily alert task schedule", "Information: Alerts task schedule run at " . date("d/m/Y"));
/********************************************************************* END OF SCHEDULE **************************************/
$qry = "UPDATE {$_SESSION['DB_PREFIX']}siteconfig SET lastschedulerun = CURDATE(), metamodifieddate = NOW(), metamodifieduserid = " . getLoggedOnMemberID() . "";
$result = mysql_query($qry);
if (!$result) {
    logError("Error: " . mysql_error(), false);
}
开发者ID:prodigyworks,项目名称:Service-Call,代码行数:11,代码来源:runalerts.php


示例14: showCalendar


//.........这里部分代码省略.........
							{ 
								sql: "SELECT A.id, A.userid, A.watch, " +
									 "DATE_FORMAT(A.startdate, '%d/%m/%Y') AS startdate, " +
									 "DATE_FORMAT(A.enddate, '%d/%m/%Y') AS enddate " +
									 "FROM <?php 
    echo $_SESSION['DB_PREFIX'];
    ?>
rotaitem A " + 
									 "WHERE A.id = " + calEvent.id
							},
							function(data) {
								if (data.length > 0) {
									var node = data[0];
								
									$("#eventid").val(node.id);
									$("#userid").val(node.userid);
									$("#startdate").val(node.startdate);
									$("#enddate").val(node.enddate);
									$("#watch").val(node.watch);

									$("#detaildialog").dialog("open");
								}
							}
						);
				
				}
		    },
		    
		    dayClick: function(date, element, view) {
<?php 
    ?>
				$("#eventid").val("");
				$("#userid").val("<?php 
    echo getLoggedOnMemberID();
    ?>
");
				$("#startdate").val(formatDate(date));
				$("#enddate").val(formatDate(date));
				$("#watch").val("B");
				
				$("#detaildialog").dialog("open");
<?php 
    ?>
		    },
		    
		    events: function(start, end, callback) {
		    	var startYear = start.getYear();
		    	var endYear = end.getYear();
		    	
		    	if (startYear < 2000) {
		    	    startYear += 1900;
		    	}
		    	
		    	if (endYear < 2000) {
		    	    endYear += 1900;
		    	}

		    	var startDate = startYear + "-" + padZero(start.getMonth() + 1) + "-" + padZero(start.getDate());
		    	var endDate = endYear + "-" + padZero(end.getMonth() + 1) + "-" + padZero(end.getDate());

				callAjax(
						"findrotaid.php", 
						{ 
							startdate: startDate,
							enddate: endDate
						},
开发者ID:prodigyworks,项目名称:Coast-Guard,代码行数:67,代码来源:rotacalendar.php


示例15: getFilteredData

function getFilteredData($sql)
{
    if (!isset($_SESSION['SITE_CONFIG'])) {
        return $sql;
    }
    $parser = new PHPSQLParser($sql);
    $tablealias = null;
    $data = getSiteConfigData();
    foreach ($parser->parsed['FROM'] as $table) {
        if ($table['table'] == "horizon_members") {
            if ($table['alias'] != "") {
                $tablealias = $table['alias']['name'];
            } else {
                $tablealias = $table['table'];
            }
        }
    }
    //	echo $sql . "\n";
    //	print_r($parser->parsed);
    if (!isset($parser->parsed['WHERE'])) {
        /* Create where clause. */
        $parser->parsed['WHERE'] = array();
    } else {
        /* Add to the where clause. */
        $parser->parsed['WHERE'][] = array("expr_type" => "operator", "base_expr" => "AND", "sub_tree" => "");
    }
    if (isUserInRole($data->adminrole) || isUserInRole($data->managementrole)) {
        /* Do nothing, access rights to all. */
        return $sql;
    }
    if (isUserInRole($data->trainingmanagementrole)) {
        /* Not restricted by anything training related. 
         * Page roles will prevent access to parts of the system
         * that are not appropriate to training management.
         */
        return $sql;
    }
    if (isUserInRole($data->officeadminrole)) {
        /* Restricted to.
         * Personal details for APPRAISALS only.
         */
        foreach ($parser->parsed['FROM'] as $table) {
            if ($table['table'] != "horizon_appraisal") {
                $parser->parsed['WHERE'][] = array("expr_type" => "colref", "base_expr" => $tablealias . ".member_id", "sub_tree" => "");
                $parser->parsed['WHERE'][] = array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => "");
                $parser->parsed['WHERE'][] = array("expr_type" => "const", "base_expr" => getLoggedOnMemberID(), "sub_tree" => "");
            }
        }
    }
    if (isUserInRole($data->compliancerole)) {
        foreach ($parser->parsed['FROM'] as $table) {
            if ($table['table'] == "horizon_holiday") {
                /* Compliance don't restrict holidays */
                return $sql;
            }
        }
        /* Restricted to.
         * All technicians and team leaders.
         */
        $parser->parsed['WHERE'][] = array("expr_type" => "bracket_expression", "sub_tree" => array(array("expr_type" => "colref", "base_expr" => $tablealias . ".position", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => ""), array("expr_type" => "const", "base_expr" => "'" . $data->technicianposition . "'", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "OR", "sub_tree" => ""), array("expr_type" => "colref", "base_expr" => $tablealias . ".position", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => ""), array("expr_type" => "const", "base_expr" => "'" . $data->teamleaderposition . "'", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "OR", "sub_tree" => ""), array("expr_type" => "colref", "base_expr" => $tablealias . ".member_id", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => ""), array("expr_type" => "const", "base_expr" => getLoggedOnMemberID(), "sub_tree" => "")));
    } else {
        if (isUserInRole($data->regionalservicemanagerrole)) {
            /* Restricted to.
             * All personnel and team leaders.
             */
            $parser->parsed['OPTIONS'][] = "DISTINCT";
            $parser->parsed['FROM'][] = array("expr_type" => "table", "table" => "horizon_userteams", "alias" => array("as" => "", "name" => "horizon_userteams", "base_expr" => "horizon_userteams"), "join_type" => "JOIN", "ref_type" => "ON", "ref_clause" => array(array("expr_type" => "colref", "base_expr" => "horizon_userteams.memberid", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => ""), array("expr_type" => "colref", "base_expr" => getLoggedOnMemberID(), "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "OR", "sub_tree" => ""), array("expr_type" => "colref", "base_expr" => $tablealias . ".member_id", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => ""), array("expr_type" => "const", "base_expr" => getLoggedOnMemberID(), "sub_tree" => "")));
            $parser->parsed['WHERE'][] = array("expr_type" => "bracket_expression", "sub_tree" => array(array("expr_type" => "colref", "base_expr" => "horizon_userteams.teamid", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => ""), array("expr_type" => "const", "base_expr" => $tablealias . ".teamid", "sub_tree" => "")));
        } else {
            if (isUserInRole($data->officerole)) {
                $appraisal = false;
                foreach ($parser->parsed['FROM'] as $table) {
                    if ($table['table'] == "horizon_appraisal") {
                        /* Compliance don't restrict holidays */
                        $appraisal = true;
                    }
                }
                if (!$appraisal) {
                    return $sql;
                }
                /* Restricted to.
                 * All technicians and team leaders.
                 */
                $parser->parsed['WHERE'][] = array("expr_type" => "bracket_expression", "sub_tree" => array(array("expr_type" => "colref", "base_expr" => $tablealias . ".position", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => ""), array("expr_type" => "const", "base_expr" => "'" . $data->technicianposition . "'", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "OR", "sub_tree" => ""), array("expr_type" => "colref", "base_expr" => $tablealias . ".position", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => ""), array("expr_type" => "const", "base_expr" => "'" . $data->teamleaderposition . "'", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "OR", "sub_tree" => ""), array("expr_type" => "colref", "base_expr" => $tablealias . ".member_id", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => ""), array("expr_type" => "const", "base_expr" => getLoggedOnMemberID(), "sub_tree" => "")));
            } else {
                if (isUserInRole($data->officemanagerrole)) {
                    /* Restricted to.
                     * All personnel and team leaders.
                     */
                    $parser->parsed['OPTIONS'][] = "DISTINCT";
                    $parser->parsed['FROM'][] = array("expr_type" => "table", "table" => "horizon_userroles", "alias" => array("as" => "", "name" => "horizon_userroles", "base_expr" => "horizon_userroles"), "join_type" => "JOIN", "ref_type" => "ON", "ref_clause" => array(array("expr_type" => "colref", "base_expr" => "horizon_userroles.memberid", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => ""), array("expr_type" => "colref", "base_expr" => $tablealias . ".member_id", "sub_tree" => "")));
                    $parser->parsed['WHERE'][] = array("expr_type" => "bracket_expression", "sub_tree" => array(array("expr_type" => "colref", "base_expr" => "horizon_userroles.roleid", "sub_tree" => ""), array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => ""), array("expr_type" => "const", "base_expr" => "'" . $data->officepersonnelrole . "'", "sub_tree" => "")));
                } else {
                    if (isUserInRole($data->teamleaderrole)) {
                        /* Restricted to.
                         * Team personnel and themselves.
                         */
                        $parser->parsed['WHERE'][] = array("expr_type" => "colref", "base_expr" => $tablealias . ".teamid", "sub_tree" => "");
                        $parser->parsed['WHERE'][] = array("expr_type" => "operator", "base_expr" => "=", "sub_tree" => "");
                        $parser->parsed['WHERE'][] = array("expr_type" => "const", "base_expr" => getLoggedOnTeamID(), "sub_tree" => "");
//.........这里部分代码省略.........
开发者ID:prodigyworks,项目名称:Service-Call,代码行数:101,代码来源:datafilter.php


示例16: md5

<?php

include "system-header.php";
if (isset($_POST['user'])) {
    $guid = $_GET['key'];
    $login = $_POST['user'];
    $passwd = md5($_POST['password']);
    $qry = "SELECT * " . "FROM {$_SESSION['DB_PREFIX']}members " . "WHERE accepted = 'N' " . "AND login = '{$login}' " . "AND passwd = '{$passwd}' " . "AND guid = '{$guid}'";
    $result = mysql_query($qry);
    if ($result) {
        while ($member = mysql_fetch_assoc($result)) {
            $memberid = $member['member_id'];
            $qry = "UPDATE {$_SESSION['DB_PREFIX']}members " . "SET accepted = 'Y', metamodifieddate = NOW(), metamodifieduserid = " . getLoggedOnMemberID() . " " . "WHERE member_id = {$memberid}";
            $itemresult = mysql_query($qry);
            if (!$itemresult) {
                logError($qry . " = " . mysql_error());
            }
            sendUserMessage($memberid, "User Registration", "Welcome to Oracle logs.<br>Your user registration has been accepted.");
            echo "<h4>Welcome to Oracle logs.<br>Your user registration has been accepted.</h4>";
        }
    }
} else {
    ?>
<form method="POST" id="activateform" name="activateform" class="entryform">
	<table>
		<tr>
			<td>Login</td>
			<td>
				<input required="true" type="text" id="user" name="user" />
			</td>
		</tr>
开发者ID:prodigyworks,项目名称:Service-Call,代码行数:31,代码来源:activateaccount.php


示例17: mysql_query

    $result = mysql_query($qry);
    //Check whether the query was successful or not
    if ($result) {
        if (mysql_num_rows($result) == 1) {
            $member = mysql_fetch_assoc($result);
            $memberid = $member['member_id'];
            srand(time());
            for ($i = 0; $i < 10; $i++) {
                $random = rand() % 52;
                if ($random > 26) {
                    $random = $random - 26;
                    $random = $random + 32;
                }
                $word = $word . chr($random + 65);
            }
            $qry = "UPDATE {$_SESSION['DB_PREFIX']}members " . "SET passwd = '" . md5($word) . "', metamodifieddate = NOW(), metamodifieduserid = " . getLoggedOnMemberID() . " " . "WHERE member_id = {$memberid}";
            $result = mysql_query($qry);
            if (!$result) {
                logError("Error RESET PASSWORD:" . $qry . " - " . mysql_error());
            }
            $errmsg_arr[] = "An email has been sent with a reset password.";
            sendUserMessage($memberid, "Password reset", "Your password has been reset to {$word}.<br>Please contact your system administrator if you have any problems.");
            sendRoleMessage("ADMIN", "Password reset", "User {$login} has had the password reset to {$word}.");
        } else {
            $errmsg_arr[] = "Invalid user.";
        }
    } else {
        $errmsg_arr[] = "Invalid user.";
    }
}
$_SESSION['ERRMSG_ARR'] = $errmsg_arr;
开发者ID:prodigyworks,项目名称:Service-Call,代码行数:31,代码来源:forgotpassword.php


示例18: postAddScriptEvent

    public function postAddScriptEvent()
    {
        ?>
			$("#customerid").val("").trigger("change");
			$("#clientid").val("").trigger("change");
			$("#crudaddbutton").show();
			$("#revision").val("1");
			$("#deliverycharge").val("0.00");
			$("#discount").val("0.00");
			$("#total").val("0.00");
			$("#orderdate").val(" 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getLogger函数代码示例发布时间:2022-05-15
下一篇:
PHP getLoggedMemberID函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap