本文整理汇总了PHP中createUserDataFile函数的典型用法代码示例。如果您正苦于以下问题:PHP createUserDataFile函数的具体用法?PHP createUserDataFile怎么用?PHP createUserDataFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了createUserDataFile函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateUserNewPwd
function generateUserNewPwd($ID)
{
$sPwd = genRndPwd();
$sSalt = genRndSalt();
$sQuery = "\n UPDATE `Profiles`\n SET\n `Password` = '" . encryptUserPwd($sPwd, $sSalt) . "',\n `Salt` = '{$sSalt}'\n WHERE\n `ID`='{$ID}'\n ";
db_res($sQuery);
createUserDataFile($ID);
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php';
$oZ = new BxDolAlerts('profile', 'edit', $ID);
$oZ->alert();
return $sPwd;
}
示例2: PageCompPageMainCode
/**
* page code function
*/
function PageCompPageMainCode($iLoggedID)
{
$member['ID'] = (int) $iLoggedID;
$p_arr = getProfileInfo($member['ID']);
if ($_POST['CHANGE_STATUS']) {
$sStatus = "";
switch ($_POST['CHANGE_STATUS']) {
case 'SUSPEND':
if ($p_arr['Status'] == 'Active') {
$sStatus = "Suspended";
}
break;
case 'ACTIVATE':
if ($p_arr['Status'] == 'Suspended') {
$sStatus = "Active";
}
break;
}
if (mb_strlen($sStatus) > 0) {
db_res("UPDATE `Profiles` SET `Status` = '{$sStatus}' WHERE `ID` = {$member['ID']}");
}
createUserDataFile($p_arr['ID']);
reparseObjTags('profile', $member['ID']);
$p_arr = getProfileInfo($member['ID']);
}
$aData = array('profile_status_caption' => _t("_Profile status"), 'status' => $p_arr['Status'], 'status_lang_key' => _t('__' . $p_arr['Status']));
$aForm = array('form_attrs' => array('action' => BX_DOL_URL_ROOT . 'change_status.php', 'method' => 'post', 'name' => 'form_change_status'), 'inputs' => array('status' => array('type' => 'hidden', 'name' => 'CHANGE_STATUS', 'value' => ''), 'subscribe' => array('type' => 'submit', 'name' => 'subscribe', 'value' => '')));
switch ($p_arr['Status']) {
case 'Active':
$aForm['inputs']['status']['value'] = 'SUSPEND';
$aForm['inputs']['subscribe']['value'] = _t('_Suspend account');
$oForm = new BxTemplFormView($aForm);
$aData['form'] = $oForm->getCode();
$aData['message'] = _t("_PROFILE_CAN_SUSPEND");
break;
case 'Suspended':
$aForm['inputs']['status']['value'] = 'ACTIVATE';
$aForm['inputs']['subscribe']['value'] = _t('_Activate account');
$oForm = new BxTemplFormView($aForm);
$aData['form'] = $oForm->getCode();
$aData['message'] = _t("_PROFILE_CAN_ACTIVATE");
break;
default:
$aData['message'] = _t("_PROFILE_CANT_ACTIVATE/SUSPEND");
$aData['form'] = '';
break;
}
return $GLOBALS['oSysTemplate']->parseHtmlByName('change_status.html', $aData);
}
示例3: _saveCatAdminPassword
function _saveCatAdminPassword(&$aData)
{
$iId = (int) $_COOKIE['memberID'];
$aAdmin = $this->_oDb->getRow("SELECT `Password`, `Salt` FROM `Profiles` WHERE `ID`= ?", [$iId]);
if (encryptUserPwd($aData['pwd_old'], $aAdmin['Salt']) != $aAdmin['Password']) {
return MsgBox(_t('_adm_txt_settings_wrong_old_pasword'), $this->_iResultTimer);
}
$iLength = strlen($aData['pwd_new']);
if ($iLength < 3) {
return MsgBox(_t('_adm_txt_settings_wrong_new_pasword'), $this->_iResultTimer);
}
if ($aData['pwd_new'] != $aData['pwd_conf']) {
return MsgBox(_t('_adm_txt_settings_wrong_conf_pasword'), $this->_iResultTimer);
}
$this->_oDb->query("UPDATE `Profiles` SET `Password`='" . encryptUserPwd($aData['pwd_new'], $aAdmin['Salt']) . "' WHERE `ID`='{$iId}'");
createUserDataFile($iId);
return true;
}
示例4: PageCompPageMainCode
//.........这里部分代码省略.........
// enum combo box with numbers
// enum combo box with numbers
case 'date':
// date
$fval = process_db_input($fval, 0, 1);
$cl_values .= " `{$dbname}` = '{$fval}'";
$cl_values .= ", ";
break;
case 'p':
$fval = md5(process_pass_data($fval));
$cl_values .= " `{$dbname}` = '{$fval}'";
$cl_values .= ", ";
break;
}
}
$cl_values .= " `LastReg` = NOW()";
db_res($cl_values);
$IDnormal = mysql_insert_id();
$IDcrypt = crypt($IDnormal, "secret_string");
// encrypted ID for security purposes
setcookie("IDc", $IDcrypt, 0, "/");
$_COOKIE['IDc'] = $IDcrypt;
// Affiliate and friend checking
if ($en_aff && $_COOKIE['idAff']) {
$res = db_res("SELECT `ID` FROM `aff` WHERE `ID` = {$_COOKIE['idAff']} AND `Status` = 'active'");
if (mysql_num_rows($res)) {
$res = db_res("INSERT INTO `aff_members` (`idAff`,`idProfile`) VALUES ({$_COOKIE['idAff']}, {$IDnormal})");
}
}
if ($en_aff && $_COOKIE['idFriend']) {
$idFriend = getID($_COOKIE['idFriend']);
if ($idFriend) {
$res = db_res("UPDATE `Profiles` SET `aff_num` = `aff_num` + 1 WHERE `ID` = '{$idFriend}'");
createUserDataFile($idFriend);
}
}
if (strcmp(crypt($IDnormal, 'secret_string'), $_COOKIE['IDc']) != 0) {
ob_end_clean();
$_page['header'] = _t("_Error");
$ret = "<table width=\"100%\" cellpadding=4 cellspacing=4><tr><td align=center class=text2>";
$ret .= _t("_MUST_HAVE_COOKIES");
$ret .= "</td></tr></table>";
return $ret;
}
if (getParam('autoApproval_ifNoConfEmail') == 'on') {
if (getParam('autoApproval_ifJoin')) {
db_res("UPDATE `Profiles` SET `Status`='Active' WHERE `ID`='{$IDnormal}'");
$page_text = _t("_USER_ACTIVATION_SUCCEEDED") . $ret . $add_on;
$message = getParam("t_Activation");
$subject = getParam('t_Activation_subject');
sendMail($p_arr['Email'], $subject, $message, $IDnormal);
} else {
db_res("UPDATE `Profiles` SET `Status`='Approval' WHERE `ID`='{$IDnormal}'");
$page_text = _t("_USER_CONF_SUCCEEDED") . $add_on;
}
if ($newusernotify) {
$message = "New user {$p_arr['NickName']} with email {$p_arr['Email']} has been confirmed,\nhis/her ID is {$IDnormal}.\n--\n{$site['title']} mail delivery system\n<Auto-generated e-mail, please, do not reply>\n";
$subject = "New user confirmed";
sendMail($site['email_notify'], $subject, $message);
}
} else {
$page_text = _t("_JOIN3") . $add_on;
$page_text .= activation_mail($IDnormal);
$page_text .= "<br /><br /><br /><br /><center>" . _t("_UPLOAD_WHILE_WAITING", $site['url']) . "</center>";
}
modules_add($IDnormal);
示例5: getProfileInfo
function getProfileInfo($iProfileID, $checkActiveStatus = false, $forceCache = false)
{
global $aUser;
global $dir;
global $date_format;
$iProfileID = (int) $iProfileID;
if (!$iProfileID) {
return false;
}
if (!isset($aUser[$iProfileID]) || !is_array($aUser[$iProfileID]) || $forceCache) {
$sCacheFile = $dir['cache'] . 'user' . $iProfileID . '.php';
if (!file_exists($sCacheFile) || $forceCache) {
if (!createUserDataFile($iProfileID)) {
return false;
}
}
@(include $sCacheFile);
}
if ($checkActiveStatus and $aUser[$iProfileID]['Status'] != 'Active') {
return false;
}
return $aUser[$iProfileID];
}
示例6: onEventDeleted
function onEventDeleted($iEntryId, $aDataEntry = array())
{
createUserDataFile($this->_iProfileId);
// arise alert
$oAlert = new BxDolAlerts('bx_avatar', 'delete', $iEntryId, $this->_iProfileId);
$oAlert->alert();
}
示例7: makePrimPhoto
function makePrimPhoto($iPhotoID, $bCouple = false)
{
if ($bCouple > 0) {
$aMember = getProfileInfo($this->iProfileID);
$sDestID = $aMember['Couple'];
} else {
$sDestID = $this->iProfileID;
}
if ($sDestID > 0) {
$this->oMediaQuery->setPrimaryPhoto($sDestID, $iPhotoID);
}
createUserDataFile($sDestID);
}
示例8: setLangCookie
function setLangCookie($sLang)
{
$iProfileId = getLoggedId();
if ($iProfileId) {
$iLangID = db_value("SELECT `ID` FROM `sys_localization_languages` WHERE `Name` = '" . process_db_input($sLang) . "'");
if (!$iLangID) {
$iLangID = 0;
}
db_res('UPDATE `Profiles` SET `LangID` = ' . (int) $iLangID . ' WHERE `ID` = ' . (int) $_COOKIE['memberID']);
// recompile profile cache ;
createUserDataFile($iProfileId);
}
setcookie('lang', '', time() - 60 * 60 * 24, '/');
setcookie('lang', $sLang, time() + 60 * 60 * 24 * 365, '/');
}
示例9: PageCompPageMainCode
/**
* page code function
*/
function PageCompPageMainCode()
{
global $dir;
$member['ID'] = (int) $_COOKIE['memberID'];
ob_start();
$p_arr = getProfileInfo($member['ID']);
if ($_POST['CHANGE_STATUS']) {
switch ($_POST['CHANGE_STATUS']) {
case 'SUSPEND':
if ($p_arr['Status'] == 'Active') {
db_res("UPDATE `Profiles` SET `Status` = 'Suspended' WHERE `ID` = '{$member['ID']}';");
modules_block($p_arr['ID']);
}
break;
case 'ACTIVATE':
if ($p_arr['Status'] == 'Suspended') {
db_res("UPDATE `Profiles` SET `Status` = 'Active' WHERE `ID` = {$member['ID']}");
// call modules to add user to modules
$check_res = checkAction($member['ID'], ACTION_ID_USE_CHAT);
if ($check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) {
modules_unblock($p_arr['ID'], 'chat');
}
$check_res = checkAction($member['ID'], ACTION_ID_USE_FORUM);
if ($check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) {
modules_unblock($p_arr['ID'], 'forum');
}
}
break;
}
createUserDataFile($p_arr['ID']);
reparseObjTags('profile', $member['ID']);
$p_arr = getProfileInfo($member['ID']);
}
echo "<table width=\"100%\" cellpadding=4 cellspacing=4><td align=center class=text2>";
echo _t("_Profile status");
?>
: <b><font class=prof_stat_<?php
echo $p_arr['Status'];
?>
> <?php
echo _t("__{$p_arr['Status']}");
?>
</font></b><br />
<?php
switch ($p_arr['Status']) {
case 'Active':
echo _t("_PROFILE_CAN_SUSPEND");
?>
<br /><br /><form action="<?php
echo $_SERVER['PHP_SELF'];
?>
" method=post>
<input type=hidden name=CHANGE_STATUS value=SUSPEND>
<center><input class=no type=submit value="<?php
echo _t("_Suspend account");
?>
"></center>
</form>
<?php
break;
case 'Suspended':
echo _t("_PROFILE_CAN_ACTIVATE");
?>
<br /><br /><form action="<?php
echo $_SERVER['PHP_SELF'];
?>
" method=post>
<input type=hidden name=CHANGE_STATUS value=ACTIVATE>
<center><input class=no type=submit value="<?php
echo _t("_Activate account");
?>
"></center>
</form>
<?php
break;
default:
echo _t("_PROFILE_CANT_ACTIVATE/SUSPEND");
break;
}
echo "</td></table>";
$ret = ob_get_contents();
ob_end_clean();
return $ret;
}
示例10: setDefaultGroup
function setDefaultGroup($iGroupId)
{
$this->_oDb->setDefaultGroup($this->_iOwnerId, $iGroupId);
createUserDataFile($this->_iOwnerId);
}
示例11: bx_admin_profile_featured_control
/**
* Perform change of featured status with clearing profile(s) cache
* @param int $iProfileId - profile id
* @param boolean $bFeature - mark as featured / unfeatured
* @return boolean - TRUE on success / FALSE on failure
*/
function bx_admin_profile_featured_control($iProfileId, $bFeature = TRUE)
{
$iProfileId = (int) $iProfileId;
$iFeatured = $bFeature ? 1 : 0;
if ($GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Featured` = {$iFeatured} WHERE `ID` = {$iProfileId}")) {
createUserDataFile($iProfileId);
return TRUE;
}
return FALSE;
}
示例12: setLangCookie
function setLangCookie($sLang)
{
$iProfileId = getLoggedId();
if ($iProfileId) {
$iLangID = getLangIdByName($sLang);
if (!$iLangID) {
$iLangID = 0;
}
db_res('UPDATE `Profiles` SET `LangID` = ' . (int) $iLangID . ' WHERE `ID` = ' . (int) $_COOKIE['memberID']);
// recompile profile cache ;
createUserDataFile($iProfileId);
}
setcookie('lang', '', time() - 60 * 60 * 24, '/');
setcookie('lang', $sLang, time() + 60 * 60 * 24 * 365, '/');
}
示例13: _updateNewProfiles
/**
* Function update new dolphin's profiles table;
*
* @return : (string) - error message or empty;
*/
function _updateNewProfiles()
{
// define the last profile Id from old Db;
$sQuery = "SELECT `ID` FROM `Profiles` ORDER BY `ID` DESC LIMIT 1";
$rResult = mysql_query($sQuery, $this->rOldDb);
$aRow = mysql_fetch_assoc($rResult);
$iLastProfileId = (int) $aRow['ID'];
$iLastProfileId++;
// update current profiles table;
$sQuery = "SELECT `ID` FROM `Profiles`";
$aProfiles = $this->oMigrationModule->_oDb->getAll($sQuery);
if ($aProfiles) {
foreach ($aProfiles as $iKey => $aItems) {
$sQuery = "UPDATE `Profiles` SET `ID` = '{$iLastProfileId}' WHERE `ID` = '{$aItems['ID']}'";
$this->oMigrationModule->_oDb->query($sQuery);
createUserDataFile($iLastProfileId);
$iLastProfileId++;
}
}
}
示例14: ActionChangeStatus
/**
* Change profile status
*
* @param $iProfileId integer
* @param $sStatus text
* @return text
*/
function ActionChangeStatus($iProfileId, $sStatus = '')
{
$iProfileId = (int) $iProfileId;
$sOutputCode = '';
$oUserStatus = new BxDolUserStatusView();
if ($oUserStatus->getRegisteredStatus($sStatus)) {
//process status
$sStatus = process_db_input($sStatus, BX_TAGS_STRIP, BX_SLASHES_AUTO);
$sQuery = "UPDATE `Profiles` SET `UserStatus`='{$sStatus}', `DateLastNav` = NOW()\n WHERE `ID` = '{$iProfileId}'";
if (db_res($sQuery, 0)) {
// send system event
bx_import('BxDolAlerts');
$oZ = new BxDolAlerts('profile', 'edit_status', $iProfileId, $iProfileId);
$oZ->alert();
bx_import('BxTemplMemberMenu');
$oMemberMenu = new BxTemplMemberMenu();
$oMemberMenu->deleteMemberMenuKeyFile($iProfileId);
createUserDataFile($iProfileId);
$sOutputCode = $oUserStatus->getStatusIcon($iProfileId);
}
}
return $sOutputCode;
}
示例15: foreach
foreach ($_POST['members'] as $iId) {
createUserDataFile((int) $iId);
reparseObjTags('profile', (int) $iId);
$aProfile = getProfileInfo($iId);
$aMail = $oEmailTemplate->parseTemplate('t_Activation', array(), $iId);
sendMail($aProfile['Email'], $aMail['subject'], $aMail['body'], $iId, array(), 'html', false, true);
$oAlert = new BxDolAlerts('profile', 'change_status', (int) $iId, 0, array('status' => 'Active'));
$oAlert->alert();
}
echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>";
exit;
} else {
if (isset($_POST['adm-mp-deactivate']) && (bool) $_POST['members']) {
$GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Status`='Approval' WHERE `ID` IN ('" . implode("','", $_POST['members']) . "')");
foreach ($_POST['members'] as $iId) {
createUserDataFile((int) $iId);
reparseObjTags('profile', (int) $iId);
$oAlert = new BxDolAlerts('profile', 'change_status', (int) $iId, 0, array('status' => 'Approval'));
$oAlert->alert();
}
echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>";
exit;
} else {
if (isset($_POST['adm-mp-ban']) && (bool) $_POST['members']) {
foreach ($_POST['members'] as $iId) {
$GLOBALS['MySQL']->query("REPLACE INTO `sys_admin_ban_list` SET `ProfID`='" . $iId . "', `Time`='0', `DateTime`=NOW()");
}
echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>";
exit;
} else {
if (isset($_POST['adm-mp-unban']) && (bool) $_POST['members']) {