Ejemplo n.º 1
0
/**
 * page code function
 */
function PageCompMainCode()
{
    global $oTemplConfig;
    global $logged;
    $iId = (int) $_COOKIE['memberID'];
    if ($iId > 0) {
        $sPassword = getPassword($iId);
        $bEnableRay = getParam('enable_ray') == 'on';
        $check_res = checkAction($iId, ACTION_ID_USE_RAY_CHAT);
        if ($bEnableRay && $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) {
            $ret .= getApplicationContent('chat', 'user', array('id' => $iId, 'password' => $sPassword));
        } else {
            // $ret .= '
            // <center>
            // <table width=100% height=100% cellpadding=0 cellspacing=0>
            // <td align=center valign=center>
            // <table width="90%" height="70" cellpadding="5" cellspacing="1" class="table">
            // <tr>
            // <td class="panel" width="100%" align="center" valign="middle">
            // <div align="center" class="small">' . $check_res[CHECK_ACTION_MESSAGE] . '</div>
            // </td>
            // </tr>
            // </table>
            // </td>
            // </table>
            // </center>';
            $ret .= MsgBox($check_res[CHECK_ACTION_MESSAGE]);
        }
        return DesignBoxContent(_t("_RAY_CHAT"), $ret, $oTemplConfig->PageCompThird_db_num);
    } else {
        return DesignBoxContent(_t('_LOGIN_ERROR'), MsgBox(_t('_Please login before using Ray chat')), 1);
    }
}
Ejemplo n.º 2
0
 public function add()
 {
     if ($this->request->is('post')) {
         $this->User->create();
         $this->request->data['Group']['Group'][] = (int) Configure::read('Settings.Company.DefaultGroupId');
         $this->request->data['User']['date_joined'] = gmdate('Y-m-d H:i:s');
         $password = getPassword();
         $this->request->data['User']['password'] = $password;
         $signature = substr(MD5($this->request->data['User']['email'] . $this->request->data['User']['date_joined']), 0, 7);
         $this->request->data['User']['signature'] = $signature;
         if ($this->User->save($this->request->data)) {
             //save Signature archive
             $arrSignature = array();
             $arrSignature['SignatureArchive']['user_id'] = $this->User->id;
             $arrSignature['SignatureArchive']['signature'] = $signature;
             $arrSignature['SignatureArchive']['user_modify'] = $this->Session->read('Auth.User.id');
             $arrSignature['SignatureArchive']['date_from'] = gmdate('Y-m-d H:i:s');
             $arrSignature['SignatureArchive']['date_till'] = gmdate('Y-m-d H:i:s');
             $this->SignatureArchive->save($arrSignature);
             $mail_content = "Account informations: \n\n" . "Name: " . $this->request->data['User']['name'] . "\n" . "Email login: "******"\n" . "Password: "******"\n" . "Signature: " . $signature . "\n";
             $arr_options = array('to' => array($this->request->data['User']['email']), 'viewVars' => array('content' => $mail_content));
             $this->_sendEmail($arr_options);
             $this->Session->setFlash(__('The user has been saved'));
             return $this->redirect(array('action' => 'index'));
         }
     } else {
         $companyid = $this->Session->read('company_id');
         if ($companyid) {
             $this->request->data['User']['company_id'] = $companyid;
         }
     }
     $this->render('edit');
 }
Ejemplo n.º 3
0
 /**
  * This funciton will change user security fields of current user
  */
 public function changeUserAction()
 {
     $username = $this->input->post('username');
     $password = $this->input->post('password');
     $new_username = trim($this->input->post('new_user'));
     $new_password = trim($this->input->post('new_pass'));
     if ($this->session->userdata["username"] == $username) {
         $this->load->model('employee_model');
         $this->load->helper('user');
         $password = getPassword($username, $password);
         $user = $this->employee_model->getUser($username, $password);
         if ($user != false) {
             $fields = array();
             $fields['emp_id'] = $user['emp_id'];
             if (strlen($new_username) > 0) {
                 $fields['emp_username'] = $new_username;
                 $fields['emp_username_chdt'] = date('Y-m-d H:i:s');
                 $fields['emp_username_chby'] = $this->session->userdata["user_id"];
             } else {
                 $new_username = $user['emp_username'];
             }
             if (strlen($new_password) > 0) {
                 $fields['emp_password'] = getPassword($new_username, $new_password);
                 $fields['emp_password_chby'] = $this->session->userdata["user_id"];
                 $fields['emp_password_chdt'] = date('Y-m-d H:i:s');
             }
             echo $this->employee_model->update($fields) ? 0 : -1;
         }
     }
 }
Ejemplo n.º 4
0
function LaunchRayChat()
{
    global $site;
    $iId = (int) $_COOKIE['memberID'];
    $sPassword = getPassword($iId);
    $aPostVals = array('module' => 'chat', 'app' => 'user', 'id' => $iId, 'password' => $sPassword);
    Redirect($site['url'] . 'ray/index.php', $aPostVals, 'get', 'Ray chat');
}
Ejemplo n.º 5
0
function auth()
{
    $u = getUsername();
    $p = getPassword();
    if (!trim($u) || !trim($p)) {
        return false;
    }
    return smfapi_authenticate(trim($u), trim($p), true);
}
function validatePassword($username, $password)
{
    $hash = getPassword($username);
    $params = explode(":", $hash);
    if (count($params) < HASH_SECTIONS) {
        return false;
    }
    $pbkdf2 = base64_decode($params[HASH_PBKDF2_INDEX]);
    return slow_equals($pbkdf2, pbkdf2($params[HASH_ALGORITHM_INDEX], $password, $params[HASH_SALT_INDEX], (int) $params[HASH_ITERATION_INDEX], strlen($pbkdf2), true));
}
Ejemplo n.º 7
0
function checkNickPassword($nick, $password)
{
    $truePassword = getPassword($nick);
    if ($truePassword != null) {
        if (strcmp($truePassword, $password) == 0) {
            return true;
        }
    }
    return false;
}
Ejemplo n.º 8
0
function wikiLogin()
{
    global $login;
    global $wikilogin;
    global $snoopy;
    global $wikiapi_url;
    while (!$login) {
        $wikilogin['action'] = 'login';
        $wikilogin['lgname'] = trim(ask('wiki user name'));
        $wikilogin['lgpassword'] = getPassword('wikis');
        $wikilogin['format'] = 'php';
        if (!$snoopy instanceof Snoopy) {
            $snoopy = new Snoopy();
        }
        if (!$snoopy->submit($wikiapi_url, $wikilogin)) {
            I2CE::raiseError("Could not log in to {$wikiapi_url}");
            continue;
        }
        $res = unserialize($snoopy->results);
        if (array_key_exists('error', $res)) {
            I2CE::raiseError("Could not login:\n" . print_r($res['error'], true));
            continue;
        }
        if (!array_key_exists('login', $res) || !is_array($res['login']) || !array_key_exists('result', $res['login'])) {
            I2CE::raiseError("Error logging in:" . print_r($res, true));
            continue;
        }
        if ($res['login']['result'] == 'NeedToken' && array_key_exists('token', $res['login']) && $res['login']['token']) {
            $wikilogin['lgtoken'] = $res['login']['token'];
            $snoopy->setcookies();
            if (!$snoopy->submit($wikiapi_url, $wikilogin)) {
                I2CE::raiseError("Could not log in to {$wikiapi_url}");
                continue;
            }
            $res = unserialize($snoopy->results);
            if (array_key_exists('error', $res)) {
                I2CE::raiseError("Could not login:\n" . print_r($res['error'], true));
                continue;
            }
            if (!array_key_exists('login', $res) || !is_array($res['login']) || !array_key_exists('result', $res['login'])) {
                I2CE::raiseError("Error logging in");
                continue;
            }
        }
        if ($res['login']['result'] != 'Success') {
            I2CE::raiseError("No success logging in:" . print_r($res, true));
            continue;
        }
        I2CE::raiseError("Logged into {$wikiapi_url} as " . $wikilogin['lgname']);
        $snoopy->setcookies();
        $login = true;
    }
    return $login;
}
Ejemplo n.º 9
0
function checkNickPassword($nick, $password)
{
    $truePassword = getPassword($nick);
    $hashedPassword = hash("sha256", $password, false);
    if ($truePassword != null) {
        if (strcmp($truePassword, $hashedPassword) == 0) {
            return true;
        }
    }
    return false;
}
Ejemplo n.º 10
0
function checkUserPassword($username, $givenPassword)
{
    $rep = false;
    if (isset($username) && isset($givenPassword)) {
        if (checkUserExists($username)) {
            if (getPassword($username) == hashPassword($username, $givenPassword)) {
                $rep = true;
            }
        }
    }
    return $rep;
}
Ejemplo n.º 11
0
function checkAuth($username, $token)
{
    if (empty($token)) {
        return ['error' => 'Empty Token'];
    }
    $password = getPassword($username, $token);
    if ($password == false) {
        if (!getUser($username)) {
            return ['error' => 'Invalid User'];
        } else {
            return ['error' => 'Invalid Token'];
        }
    }
    return true;
}
Ejemplo n.º 12
0
/**
 * page code function
 */
function PageCompMainCode()
{
    global $oTemplConfig;
    global $logged;
    $iId = (int) $_COOKIE['memberID'];
    if ($iId > 0) {
        $sPassword = getPassword($iId);
        $bEnableRay = getParam('enable_ray') == 'on';
        $check_res = checkAction($iId, ACTION_ID_USE_RAY_CHAT);
        if ($bEnableRay && $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) {
            $ret .= getApplicationContent('chat', 'user', array('id' => $iId, 'password' => $sPassword), true);
        } else {
            $ret .= MsgBox($check_res[CHECK_ACTION_MESSAGE]);
        }
        return DesignBoxContent(_t("_RAY_CHAT"), $ret, $oTemplConfig->PageCompThird_db_num);
    } else {
        return DesignBoxContent(_t('_LOGIN_ERROR'), MsgBox(_t('_Please login before using Ray chat')), 1);
    }
}
Ejemplo n.º 13
0
 public function updateUsersAction()
 {
     $this->load->model('employee_model');
     $id = $this->input->post('emp_id');
     $username = $this->input->post('username');
     $password = $this->input->post('password');
     $con_password = $this->input->post('con_password');
     $department = $this->input->post('department');
     $ranking = $this->input->post('designation');
     $employee = $this->employee_model->getUserByName($username);
     if (is_array($employee) && isset($employee['emp_username']) && $employee['emp_username'] == $username && $employee['emp_id'] !== $id) {
         echo 2;
         exit;
         // echo 2 for if username is already exist;
     } else {
         $this->load->helper('user');
         $date = date('Y-m-d H:i:s');
         $data = array();
         $data['emp_id'] = $id;
         if (intval($department . $ranking) > 0 && strlen($department . $ranking) == 2) {
             $data['emp_security_val'] = $department . $ranking;
         }
         if (isset($username) && strlen($username) > 5) {
             $data['emp_username_chdt'] = $date;
             $data['emp_username_chby'] = $this->session->userdata('user_id');
             $data['emp_username'] = $username;
         }
         if (isset($password) && strlen($password) > 4) {
             $pass = getPassword($username, $password);
             $data['emp_password'] = $pass;
             $data['emp_password_chby'] = $this->session->userdata('user_id');
             $data['emp_password_chdt'] = $date;
         }
         if ($this->employee_model->update($data)) {
             echo 0;
             exit;
         }
     }
     echo -1;
     exit;
     // echo 0 if all are okay
 }
Ejemplo n.º 14
0
 function __construct()
 {
     $this->sName = 'bottom';
     $this->sDbTable = 'sys_menu_bottom';
     $this->sCacheKey = 'sys_menu_bottom';
     $this->aMenuInfo = array();
     if (isMember()) {
         $this->aMenuInfo['memberID'] = getLoggedId();
         $this->aMenuInfo['memberNick'] = getNickName($this->aMenuInfo['memberID']);
         $this->aMenuInfo['memberPass'] = getPassword($this->aMenuInfo['memberID']);
         $this->aMenuInfo['memberLink'] = getProfileLink($this->aMenuInfo['memberID']);
         $this->aMenuInfo['visible'] = 'memb';
     } else {
         $this->aMenuInfo['memberID'] = 0;
         $this->aMenuInfo['memberNick'] = '';
         $this->aMenuInfo['memberPass'] = '';
         $this->aMenuInfo['memberLink'] = '';
         $this->aMenuInfo['visible'] = 'non';
     }
     $this->aItems = array();
     $this->oPermalinks = new BxDolPermalinks();
 }
Ejemplo n.º 15
0
?>
<br />
	Total: <?php 
echo numecho2($user->gold + $user->bank);
?>
<br />
	<br />
	<small>Deposit Fee <?php 
echo $user->bankper;
?>
%</small>
	<form  name="<?php 
echo getPassword(10);
?>
" method="post">
		<input name="<? $_SESSION['depbox'] = getPassword(10); echo $_SESSION['depbox']; ?>" type="text" size="12" maxlength="17" value="<?php 
echo numecho2($user->gold);
?>
" />
		<? if($user->bankimg == 1) { ?>
			<br />
			<img src="imageclick.php?<?php 
echo session_name() . '=' . session_id();
?>
" title="random characters" alt="random characters"><br />
			<select name="turing">
				<option value="1">one</option>
				<option value="2">two</option>
				<option value="3">three</option>
				<option value="4">four</option>
				<option value="5">five</option>
Ejemplo n.º 16
0
 function registerMember()
 {
     $oPC = new BxDolProfilesController();
     $oZ = new BxDolAlerts('profile', 'before_join', 0, 0, $this->aValues[0]);
     $oZ->alert();
     $aProfile1 = $this->oPF->getProfileFromValues($this->aValues[0]);
     if (empty($aProfile1['NickName'])) {
         $aProfile1['NickName'] = uriGenerate(empty($aProfile1['FirstName']) ? genRndPwd(10, false) : $aProfile1['FirstName'], 'Profiles', 'NickName');
     }
     list($iId1, $sStatus1) = $oPC->createProfile($aProfile1);
     //--- check whether profile was created successfully or not
     if (!$iId1) {
         if (isset($aProfile1['ProfilePhoto']) && !empty($aProfile1['ProfilePhoto'])) {
             @unlink($GLOBALS['dir']['tmp'] . $aProfile1['ProfilePhoto']);
         }
         return array(false, 'Fail');
     }
     //--- check for couple profile
     if ($this->bCouple) {
         $aProfile2 = $this->oPF->getProfileFromValues($this->aValues[1]);
         list($iId2, $sStatus2) = $oPC->createProfile($aProfile2, false, $iId1);
         if (!$iId2) {
             $oPC->deleteProfile($iId1);
             return array(false, 'Fail');
         }
     }
     //--- upload profile photo
     if (isset($aProfile1['ProfilePhoto']) && !empty($aProfile1['ProfilePhoto'])) {
         $sPass1 = getPassword($iId1);
         bx_login($iId1);
         check_logged();
         BxDolService::call('avatar', 'set_image_for_cropping', array($iId1, $GLOBALS['dir']['tmp'] . $aProfile1['ProfilePhoto']));
         if (BxDolRequest::serviceExists('photos', 'perform_photo_upload', 'Uploader')) {
             $aFileInfo = array('medTitle' => _t('_sys_member_thumb_avatar'), 'medDesc' => _t('_sys_member_thumb_avatar'), 'medTags' => _t('_ProfilePhotos'), 'Categories' => array(_t('_ProfilePhotos')), 'album' => str_replace('{nickname}', getUsername($iId1), getParam('bx_photos_profile_album_name')), 'albumPrivacy' => BX_DOL_PG_ALL);
             BxDolService::call('photos', 'perform_photo_upload', array($GLOBALS['dir']['tmp'] . $aProfile1['ProfilePhoto'], $aFileInfo, false), 'Uploader');
         }
     }
     if (BxDolModule::getInstance('BxWmapModule')) {
         BxDolService::call('wmap', 'response_entry_add', array('profiles', $iId1));
     }
     //--- create system event
     bx_import('BxDolAlerts');
     $oZ = new BxDolAlerts('profile', 'join', $iId1, 0, array('status_text' => &$sStatus1));
     $oZ->alert();
     return array($iId1, $sStatus1);
 }
Ejemplo n.º 17
0
 /**
  * @Description : sales staff reset password
  *
  * @return 	: html
  * @Author 	: tungpa - tungbk29@gmail.com
  */
 public function resetPassword($id)
 {
     $this->autoRender = false;
     $this->User->id = $id;
     if (!$this->User->exists()) {
         throw new NotFoundException(__('Invalid User'));
     }
     $data = $this->User->read(null, $id);
     $password = getPassword();
     $data['User']['password'] = $password;
     if ($this->User->save($data)) {
         $mail_content = "Account informations: \n\n" . "New password: "******"\n";
         $arr_options = array('to' => array($data['User']['email']), 'viewVars' => array('content' => $mail_content), 'subject' => __('Your password had been reset'));
         $this->_sendEmail($arr_options);
         $this->Session->setFlash(__('The user has been reset password'));
         return $this->redirect(array('action' => 'index'));
     }
 }
Ejemplo n.º 18
0
function bx_login($iId, $bRememberMe = false, $bAlert = true)
{
    $sPassword = getPassword($iId);
    $aUrl = parse_url($GLOBALS['site']['url']);
    $sPath = isset($aUrl['path']) && !empty($aUrl['path']) ? $aUrl['path'] : '/';
    $sHost = '';
    $iCookieTime = $bRememberMe ? time() + 24 * 60 * 60 * 30 : 0;
    setcookie("memberID", $iId, $iCookieTime, $sPath, $sHost);
    $_COOKIE['memberID'] = $iId;
    setcookie("memberPassword", $sPassword, $iCookieTime, $sPath, $sHost, false, true);
    $_COOKIE['memberPassword'] = $sPassword;
    db_res("UPDATE `Profiles` SET `DateLastLogin`=NOW(), `DateLastNav`=NOW() WHERE `ID`='" . $iId . "'");
    createUserDataFile($iId);
    if ($bAlert) {
        require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php';
        $oZ = new BxDolAlerts('profile', 'login', $iId);
        $oZ->alert();
    }
    return getProfileInfo($iId);
}
Ejemplo n.º 19
0
 public function resetPassword($user_id)
 {
     $plainTxtPassword = getNewPassword();
     $password = getPassword($plainTxtPassword);
     $stmt = $this->getDb()->prepare("update users set password=:password WHERE id=:user_id");
     $stmt->bindValue(':password', $password, PDO::PARAM_STR);
     $stmt->bindValue(':user_id', intval($user_id), PDO::PARAM_INT);
     $stmt->execute();
     if ($stmt->rowCount() > 0) {
         return $plainTxtPassword;
     } else {
         return false;
     }
 }
Ejemplo n.º 20
0
 /**
  * Function will generate list of member's friends ;
  *
  * @param  : $iMemberId (integer) - member's Id;
  * @return : Html presentation data;
  */
 function get_member_menu_friends_list($iMemberId = 0)
 {
     global $oFunctions;
     $iMemberId = (int) $iMemberId;
     $iOnlineTime = (int) getParam('member_online_time');
     // define the member's menu position ;
     $sExtraMenuPosition = isset($_COOKIE['menu_position']) ? $_COOKIE['menu_position'] : getParam('ext_nav_menu_top_position');
     $aLanguageKeys = array('requests' => _t('_Friend Requests'), 'online' => _t('_Online Friends'));
     // get all friends requests ;
     $iFriendsRequests = getFriendRequests($iMemberId);
     $iOnlineFriends = getFriendNumber($iMemberId, 1, $iOnlineTime);
     // try to generate member's messages list ;
     $sWhereParam = "AND p.`DateLastNav` > SUBDATE(NOW(), INTERVAL " . $iOnlineTime . " MINUTE)";
     $aAllFriends = getMyFriendsEx($iMemberId, $sWhereParam, 'last_nav_desc', "LIMIT 5");
     $oModuleDb = new BxDolModuleDb();
     $sVideoMessengerImgPath = $GLOBALS['oSysTemplate']->getIconUrl('video.png');
     $sMessengerTitle = _t('_Chat');
     foreach ($aAllFriends as $iFriendID => $aFriendsPrm) {
         $aMemberInfo = getProfileInfo($iFriendID);
         $sThumb = $oFunctions->getMemberIcon($aMemberInfo['ID'], 'none');
         $sHeadline = mb_strlen($aMemberInfo['UserStatusMessage']) > 40 ? mb_substr($aMemberInfo['UserStatusMessage'], 0, 40) . '...' : $aMemberInfo['UserStatusMessage'];
         $aFriends[] = array('profile_link' => getProfileLink($iFriendID), 'profile_nick' => $aMemberInfo['NickName'], 'profile_id' => $iFriendID, 'thumbnail' => $sThumb, 'head_line' => $sHeadline, 'bx_if:video_messenger' => array('condition' => $oModuleDb->isModule('messenger'), 'content' => array('sender_id' => $iMemberId, 'sender_passw' => getPassword($iMemberId), 'recipient_id' => $iFriendID, 'video_img_src' => $sVideoMessengerImgPath, 'messenger_title' => $sMessengerTitle)));
     }
     $aExtraSection = array('friends_request' => $aLanguageKeys['requests'], 'request_count' => $iFriendsRequests, 'ID' => $iMemberId, 'online_friends' => $aLanguageKeys['online'], 'online_count' => $iOnlineFriends);
     // fill array with needed keys ;
     $aTemplateKeys = array('bx_if:menu_position_bottom' => array('condition' => $sExtraMenuPosition == 'bottom', 'content' => $aExtraSection), 'bx_if:menu_position_top' => array('condition' => $sExtraMenuPosition == 'top' || $sExtraMenuPosition == 'static', 'content' => $aExtraSection), 'bx_repeat:friend_list' => $aFriends);
     $sOutputCode = $GLOBALS['oSysTemplate']->parseHtmlByName('view_friends_member_menu_friends_list.html', $aTemplateKeys);
     return $sOutputCode;
 }
Ejemplo n.º 21
0
		if ($captcha != $_SESSION['number']) {
			throw new Exception('You failed to match the captcha to the correct number');
		}
		
		
		if (Activation::getByUsernameEmailCount($username, $email) > 0) {
			header('Location: index.php?e=4');
			exit;
		}
		
		if (User::getByUsernameEmailCount($username, $email) > 0) {
			throw new Exception('That username or email already exists. If you have forgotten your password, please use the resend password link');
		}
	
		// if we get here, we can add the user.
		$password      = getPassword();
		$a             = new Activation();
		$a->username   = $username;
		$a->email      = $email;
		$a->password   = md5($password);
		$a->nation     = $nation;
		$a->IP         = $_SERVER['REMOTE_ADDR'];
		$a->referrerId = $t->referrerId;
		$a->time       = time();
		$id            = $a->create();
	
		if ($id) {
			// Can send the email
			$et           = new Template('activation-email', 1);
			$et->username = $username;
			$et->password = $password;
Ejemplo n.º 22
0
 function show()
 {
     global $gorumroll, $lll, $gorumuser, $dontRemoveInstallFiles, $CONFIG_FILE_DIR, $noahVersion;
     JavaScript::addCss(CSS_DIR . "/checkconf.css?{$noahVersion}");
     $_GS = new GlobalStat();
     if ($_GS->congrat) {
         View::assign("congrat", $lll["congrat"]);
         $_GS->congrat = FALSE;
         modify($_GS);
     }
     $report = array();
     $st = join("", file($CONFIG_FILE_DIR . "/config.php"));
     $p = "^<\\?";
     $cfe = FALSE;
     if (!ereg($p, $st)) {
         $cfe = TRUE;
         $report[] = array($lll["confpreerr"], 'conferr');
     }
     $p = "\\?>\$";
     $p1 = "\\?>\n\$";
     $p2 = "\\?>\r\n\$";
     if (!ereg($p, $st) && !ereg($p1, $st) && !ereg($p2, $st)) {
         $cfe = TRUE;
         $report[] = array($lll["confposterr"], 'conferr');
     }
     if ($cfe) {
         $report[] = array($lll["conffileok"], 'confok');
     }
     if ($gorumuser->password == getPassword("admin")) {
         $report[] = array($lll["chadmpass"], 'conferr');
     }
     $_S =& new AppSettings();
     if ($_S->adminEmail == "") {
         $report[] = array($lll["chsyspass"], 'conferr');
         $report[] = array($lll["chsyspass_expl"], 'confexpl');
     } else {
         $ctrl = new AppController("checkconf/mailtest");
         $report[] = array($ctrl->generAnchor($lll["triggerMailTest"]), 'confok');
     }
     if (!defined("IMG_GIF") || !function_exists("ImageTypes")) {
         $report[] = array($lll["nogd"], 'conferr');
         $report[] = array($lll["nogd_expl"], 'confexpl');
     }
     if (!is_writeable(ini_get("session.save_path"))) {
         $error_message = "The configured Path for Session files (" . ini_get("session.save_path") . ") is not writeable!";
     }
     $this->checkWritePermission($noPermDirs);
     if (count($noPermDirs)) {
         $report[] = array(sprintf($lll["nopermission"], implode(", ", $noPermDirs)), 'conferr');
         $report[] = array($lll["nopermission_expl"], 'confexpl');
     }
     $this->checkReadPermission($noPermDirs);
     if (count($noPermDirs)) {
         $report[] = array(sprintf($lll["nopermission_read"], implode(", ", $noPermDirs)), 'conferr');
         $report[] = array($lll["nopermission_read_expl"], 'confexpl');
     }
     // Nice URL section:
     View::assign("rewriteOn", $gorumroll->rewriteOn);
     if (!$gorumroll->rewriteOn) {
         if (function_exists("apache_get_modules")) {
             View::assign("rewriteModuleEnabled", in_array("mod_rewrite", apache_get_modules()));
         } else {
             View::assign("rewriteModuleEnabled", "unsure");
         }
     }
     // CAPTCHA test:
     View::assign("captchaLink", Controller::getBaseURL() . "gorum/captcha/captcha.php");
     if ((!empty($dontRemoveInstallFiles) || $this->installFilesRemoved()) && $this->appFilesRemoved() && $this->backupFilesRemoved() && $_GS->defPageConf) {
         $ctrl =& new AppController("checkconf", "remove_first_check");
         View::assign("clickToDisappear", "{$lll['confdisapp']} " . $ctrl->generAnchor($lll["here1"]) . ".<br>{$lll['confclicheck']}");
     }
     View::assign("report", $report);
 }
Ejemplo n.º 23
0
        $error[] = 'パスワードは英数字6文字以上20文字以内';
    } else {
        if ($_POST['password'] != $_POST['repassword']) {
            $error[] = '二つのパスワードが異なっています';
        } else {
            if (!preg_match($birthre, $_POST['birthyear'] . '-' . $_POST['birthmonth'] . '-' . $_POST['birthday'])) {
                $error[] = '誕生日の入力が不正です';
            } else {
                if ($_POST['gender'] != '0' && $_POST['gender'] != '1') {
                    $error[] = '性別の入力が不正です';
                }
            }
        }
    }
    if (count($error) == 0) {
        $_POST['password'] = getPassword($_POST['repassword']);
        unset($_POST['repassword']);
        unset($_POST['token']);
        unset($_SESSION['token']);
        $_SESSION['signup'] = $_POST;
        unset($_POST);
        header('Location: ' . SITE_URL . 'registuser.php');
        exit;
    }
}
?>

<!DOCTYPE html>
<html>
<head><title>デートアプリ</title>
Ejemplo n.º 24
0
 function GenActionsMenuBlock()
 {
     // init some user's values
     $p_arr = $this->_aProfile;
     $iMemberID = getLoggedId();
     $iViewedMemberID = (int) $p_arr['ID'];
     if (!$iMemberID or !$iViewedMemberID or $iMemberID == $iViewedMemberID) {
         return null;
     }
     // prepare all nedded keys
     $p_arr['url'] = BX_DOL_URL_ROOT;
     $p_arr['window_width'] = $this->oTemplConfig->popUpWindowWidth;
     $p_arr['window_height'] = $this->oTemplConfig->popUpWindowHeight;
     $p_arr['anonym_mode'] = $this->oTemplConfig->bAnonymousMode;
     $p_arr['member_id'] = $iMemberID;
     $p_arr['member_pass'] = getPassword($iMemberID);
     $sActions = $GLOBALS['oFunctions']->genObjectsActions($p_arr, 'Profile', 'cellpadding="0" cellspacing="0"');
     return $sActions;
 }
 /**
  * Function will generate chat block for current member ;
  *
  * @param  : $iSender (integer)     - sender member's Id;
  * @return : (array);
  */
 function getChatBox($iSender)
 {
     global $oFunctions;
     $iSender = (int) $iSender;
     $oModuleDb = new BxDolModuleDb();
     $oUserStatus = new BxDolUserStatusView();
     $sMemberThumb = $oFunctions->getMemberThumbnail($iSender, 'none');
     $sMemberIcon = $oFunctions->getMemberIcon($iSender, 'none', false, '_plain');
     $aSenderInfo = getProfileInfo($iSender);
     $sSenderLink = getProfileLink($iSender);
     $sStatusIcon = $oUserStatus->getStatusIcon($iSender);
     // language keys;
     $aLanguageKeys = array('minimize' => _t('_simple_messenger_minimize_button'), 'close' => _t('_simple_messenger_close_button'), 'video_mess' => _t('_simple_messenger_switch_to_video'));
     // contain data for sender block;
     $aSenderBlock = array('sender_thumb' => $sMemberThumb, 'sender_link' => $sSenderLink, 'status_text' => $aSenderInfo['UserStatusMessage'], 'sender_nick' => getNickName($aSenderInfo['ID']), 'reduce_title' => $aLanguageKeys['minimize'], 'close_title' => $aLanguageKeys['close'], 'history_window_id' => $this->aCoreSettings['history_block_prefix'] . $iSender, 'sender_id' => $iSender, 'bx_if:video_messenger' => array('condition' => $oModuleDb->isModule('messenger'), 'content' => array('sender_id' => $this->iLoggedMemberId, 'sender_passw' => getPassword($this->iLoggedMemberId), 'recipient_id' => $iSender, 'video_messenger' => $aLanguageKeys['video_mess'])));
     $aMessagesList = $this->getMessagesHistory($this->iLoggedMemberId, $iSender, 0, false);
     // process nick name;
     $sNickName = getNickName($aSenderInfo['ID']);
     if (mb_strlen($sNickName) > $this->iMaxNickLength) {
         $sNickName = mb_substr($sNickName, 0, $this->iMaxNickLength) . '...';
     }
     $aTemplateKeys = array('block_indent' => $this->sMemberMenuPosition == 'bottom' ? 'bottom_indent' : 'top_indent', 'chat_block_position' => $this->sMemberMenuPosition == 'bottom' ? 'chat_block_bottom_position' : 'chat_block_top_position', 'sender_nick' => $sNickName, 'sender_icon' => $sMemberIcon, 'member_status' => $sStatusIcon, 'history_window_id' => $this->aCoreSettings['history_block_prefix'] . $iSender, 'history_block_position' => $this->sMemberMenuPosition == 'bottom' ? 'history_bottom_position' : 'history_top_position', 'recipient_id' => $iSender, 'bx_if:menu_pos_top' => array('condition' => $this->sMemberMenuPosition == 'bottom', 'content' => $aSenderBlock), 'bx_if:menu_pos_bottom' => array('condition' => $this->sMemberMenuPosition != 'bottom', 'content' => $aSenderBlock), 'messages' => $aMessagesList['messages_list']);
     // generate the chat box's content;
     $sOutputCode = $this->_oTemplate->parseHtmlByName('chat_block.html', $aTemplateKeys);
     $aRetArray = array('chat_box' => $sOutputCode, 'last_message' => $aMessagesList['last_message'], 'count_messages' => $aMessagesList['count_messages']);
     return $aRetArray;
 }
									<input id='pass' name='pass' type='password' class='campo' 
                                      <?php 
if (ul != null) {
    out . println("value='" + ul . getPassword() + "'");
}
?>
 />
								</td>
								<td valign='middle'>
									<p>Confirmar Password:</p>	
								</td>
								<td valign='middle'>
									<input id='conpass' name='conpass' type='password' class='campo'
                                      <?php 
if (ul != null) {
    out . println("value='" + ul . getPassword() + "'");
}
?>
 />
								</td>			
							</tr>
							
							<tr>
								<td  width='152px' valign='middle'>
									<p>Tipo Documento:</p>
								</td>
								<td width='168px' valign='middle'>
									<select name='tipodoc'>
                                        <?php 
//                                             String[] tipoDocs = {"DNI", "LC", "LE"};
//                                             foreach (String tp : tipoDocs) {
Ejemplo n.º 27
0
 function getProfileViewActions($iProfileId, $bDynamic = false)
 {
     global $oTemplConfig;
     $iProfileId = (int) $iProfileId;
     if (!$iProfileId) {
         return '';
     }
     $aProfileInfo = getProfileInfo($iProfileId);
     if (empty($aProfileInfo)) {
         return '';
     }
     $iViewerId = getLoggedId();
     // prepare all needed keys
     $aConfig = array('url' => BX_DOL_URL_ROOT, 'anonym_mode' => '', 'member_id' => $iViewerId, 'member_pass' => getPassword($iViewerId));
     $aMainKeys = array('cpt_edit', 'cpt_send_letter', 'cpt_fave', 'cpt_befriend', 'cpt_remove_friend', 'cpt_get_mail', 'cpt_share', 'cpt_report', 'cpt_block', 'cpt_unblock', 'cpt_activate', 'cpt_ban', 'cpt_delete', 'cpt_delete_spam', 'cpt_feature', 'act_activate', 'act_ban', 'act_feature');
     $aMain = array_fill_keys($aMainKeys, '');
     if (isMember($iViewerId)) {
         $aMain['cpt_edit'] = _t('_EditProfile');
         $aMain['cpt_send_letter'] = _t('_SendLetter');
         $aMain['cpt_fave'] = _t('_Fave');
         $aMain['cpt_remove_fave'] = _t('_Remove Fave');
         $aMain['cpt_befriend'] = _t('_Befriend');
         $aMain['cpt_remove_friend'] = _t('_Remove friend');
         $aMain['cpt_get_mail'] = _t('_Get E-mail');
         $aMain['cpt_share'] = $this->isAllowedShare($this->_aProfile) ? _t('_Share') : '';
         $aMain['cpt_report'] = _t('_Report Spam');
         $aMain['cpt_block'] = _t('_Block');
         $aMain['cpt_unblock'] = _t('_Unblock');
     }
     if (isAdmin($iViewerId) || isModerator($iViewerId) and $iViewerId != $iProfileId) {
         $sMsgKeyStart = '_adm_btn_mp_';
         // delete
         $aMain['cpt_delete'] = _t($sMsgKeyStart . 'delete');
         // delete spam
         $aMain['cpt_delete_spam'] = _t($sMsgKeyStart . 'delete_spammer');
         // activate / deactivate
         $sTypeActiv = 'activate';
         if ($aProfileInfo['Status'] == 'Active') {
             $sTypeActiv = 'de' . $sTypeActiv;
         }
         $aMain['cpt_activate'] = _t($sMsgKeyStart . $sTypeActiv);
         $aMain['act_activate'] = $sTypeActiv;
         // ban / unban
         $sTypeBan = 'ban';
         if (isLoggedBanned($aProfileInfo['ID'])) {
             $sTypeBan = 'un' . $sTypeBan;
         }
         $aMain['cpt_ban'] = _t($sMsgKeyStart . $sTypeBan);
         $aMain['act_ban'] = $sTypeBan;
         // feature / unfeature
         $sTypeFeat = 'featured';
         $aMain['cpt_feature'] = _t('_Feature it');
         if ((int) $aProfileInfo['Featured']) {
             $sTypeFeat = 'un' . $sTypeFeat;
             $aMain['cpt_feature'] = _t('_De-Feature it');
         }
         $aMain['act_feature'] = $sTypeFeat;
     }
     //--- Subscription integration ---//
     $oSubscription = BxDolSubscription::getInstance();
     $sAddon = $oSubscription->getData($bDynamic);
     $aButton = $oSubscription->getButton($iViewerId, 'profile', '', $iProfileId);
     $aMain['sbs_profile_title'] = $aButton['title'];
     $aMain['sbs_profile_script'] = $aButton['script'];
     //--- Subscription integration ---//
     $aCheckGreet = checkAction(getLoggedId(), ACTION_ID_SEND_VKISS);
     $aMain['cpt_greet'] = $aCheckGreet[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED ? _t('_Greet') : '';
     $aMain = array_merge($aProfileInfo, $aConfig, $aMain);
     return $sAddon . $this->genObjectsActions($aMain, 'Profile');
 }
Ejemplo n.º 28
0
    <meta charset="UTF-8" />
    <title>Admin Home</title>
	<link rel='stylesheet' type='text/css' href='css/standard.css'/>
  </head>
  <body>
    <div id="login">
      <div id="form">
        <div class="top">
	<h2> Hello 
	<?php 
$temp = getUsername();
if (!isset($temp)) {
    return;
}
$User = getUsername();
$Pass = getPassword();
$sql = "SELECT `firstName` FROM `Proj2Advisors` \n\t\t\tWHERE `Username` = '{$User}' \n\t\t\tand `Password` = '{$Pass}'";
$rs = $COMMON->executeQuery($sql, $_SERVER["SCRIPT_NAME"]);
$row = mysql_fetch_row($rs);
echo $row[0];
?>
	</h2>
	
	<form action="AdminProcessUI.php" method="post" name="UI">
		<div class="nextButton">
		<input type="submit" name="next" class="button large selection" value="Schedule appointments"><br>
		<input type="submit" name="next" class="button large selection" value="Print schedule for a day"><br>
		<input type="submit" name="next" class="button large selection" value="Edit appointments"><br>
		<input type="submit" name="next" class="button large selection" value="Search for an appointment"><br>
		<input type="submit" name="next" class="button large selection" value="Create new Admin Account"><br>
		</div>
function loadShoutbox($framewidth = 0, $frameheight = 0)
{
    $iId = (int) $_COOKIE['memberID'];
    $sPassword = getPassword($iId);
    return getApplicationContent('shoutbox', 'user', array('id' => $iId, 'password' => $sPassword));
}
Ejemplo n.º 30
0
// END wipeAgent
////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
//                                                                                       //
//                              Main program execution                                   //
//                                                                                       //
///////////////////////////////////////////////////////////////////////////////////////////
// Establish a new CLCSConfiguration object
$cfg_file = new CLCSConfiguration("PublicOpinion");
// Find own IP address for registration
$ownIPAddress = getOwnIPAddress();
// Retrieve the stored node ID ("UNDEFINED" means a non-registered node)
$nodeID = $cfg_file->getSetting("PublicOpinion", "DBUser");
// Register the node if not already done
if ($nodeID == "UNDEFINED") {
    $nodeID = getPassword();
    registerNode($nodeID, $cfg_file);
}
// Set default command, then loop to process
$chCommand = "RUN";
while ($chCommand != "STOP" && $chCommand != "DIE") {
    echo "Asking for tasking...\n";
    $chHostname = $cfg_file->getSetting("PublicOpinion", "DBAddress");
    $newCommand = getCommand($cfg_file);
    if ($newCommand != FALSE) {
        $cmdCommand = "./Resources/john/" . $newCommand[0] . " --pot=/tmp/" . $nodeID . ".pot " . "--wordlist=/tmp/wordlist.txt " . "/tmp/targets.txt";
        $cmdWords = "http://" . $chHostname . "/" . $newCommand[1];
        $cmdTargets = "http://" . $chHostname . "/" . $newCommand[2];
        $jobID = $newCommand[3];
        downloadFile($cmdWords, "/tmp/wordlist.txt");
        downloadFile($cmdTargets, "/tmp/targets.txt");