Example #1
0
">
						<table class="contenttoc" style="float:none">
							<tr>
								<td><label for="firstName">Nombre</label></td>
								<td><input type="text" name="firstName" id="firstName" class="inputbox" value="<?php 
echo $u->prepareFirstName();
?>
" /></td>
								<td><label for="lastName">Apellidos</label></td>
								<td><input type="text" name="lastName" id="lastName" class="inputbox" value="<?php 
echo $u->prepareLastName();
?>
" /></td>
								<td><label for="birthday">Fecha de Nacimiento</label></td>
								<td><input type="text" name="birthday" id="birthday" class="inputbox" value="<?php 
if ($u->getBirthday()) {
    echo $u->getBirthday()->format('n/j/y');
}
?>
" /></td>
								<td><label for="phone">Teléfono</label></td>
								<td><input type="text" name="phone" id="phone" class="inputbox" value="<?php 
echo $u->preparePhone();
?>
" /></td>
							</tr>
							<tr>
								<td><label for="cellphone">Celular</label></td>
								<td><input type="text" name="cellphone" id="cellphone" class="inputbox" value="<?php 
echo $u->prepareCellphone();
?>
Example #2
0
    function getProfileX($mid)
    {
        global $people_allow_sexe, $people_allow_birthday, $people_allow_zodiac, $people_allow_website, $people_allow_nation;
        $html = "";
        // from User.class.php
        $musername = getUsernameByMembershipID($this->Database, $mid);
        $user = new User($musername);
        $avat = $user->getAvatar();
        $name_surname = $user->getNameSurname();
        $age = $user->getAge();
        $zsign = $this->evaluateZSign($user->getZSign());
        $exact_birthday = date('m/d/Y', strtotime($user->getBirthday()));
        $birthday = date('F, j', strtotime($user->getBirthday()));
        $nationality_1 = $user->getNationality();
        $nationality_flag_1 = $user->getNationalityFlag($nationality_1);
        $sexe = $user->getSexe();
        $sexeicon = $user->getSexeIcon($sexe);
        $contact_icq = $user->getContactICQ();
        $contact_jabber = $user->getContactJabber();
        $contact_msn = $user->getContactMSN();
        $contact_yahoo = $user->getContactYahoo();
        $contact_aim = $user->getContactAIM();
        $contact_email = $user->getEmail();
        $website = $user->getWebSite();
        $html .= <<<EOS
\t <div style="position:absolute;visibility:hidden;">
\t 
\t 
\t <textarea id="inf_namesurname">{$name_surname}</textarea>
\t <textarea id="inf_sexe">{$sexe}</textarea>"
\t <textarea id="inf_birthday">{$exact_birthday}</textarea>
\t <textarea id="inf_nationality">{$nationality_1}</textarea>
\t <textarea id="inf_myspace">{$website}</textarea>
\t 
\t <textarea id="inf_email"></textarea>
\t <textarea id="inf_aim">{$contact_aim}</textarea>"
\t <textarea id="inf_msn">{$contact_msn}</textarea>
\t <textarea id="inf_yahoo">{$contact_yahoo}</textarea>
\t <textarea id="inf_jabber">{$contact_jabber}</textarea>
\t <textarea id="inf_icq">{$contact_icq}</textarea>
\t 
\t 
\t </div>
\t 
EOS;
        // and start the HTML
        $html .= "<div class=\"vcard\">";
        $html .= "<img class=\"photo\" src=\"{$avat}?" . rand(0, 1000) . "\" width=\"80\" alt=\"{$name_surname}\" height=\"80\" border=\"0\" align=\"left\" style=\"margin-bottom: 5px;margin-left: 15px; margin-right: 25px;\" />";
        $html .= "<div style=\"font-size: 1.2em;\"><b><span class=\"fn\">{$name_surname}</span>";
        if ($people_allow_birthday) {
            $html .= " ({$age})";
        }
        $html .= "</b> ";
        if ($people_allow_nation) {
            $html .= "<img src=\"{$nationality_flag_1}\" width=\"16\" height=\"11\" border=\"0\" />";
        }
        $html .= "</div>";
        if ($people_allow_website) {
            $html .= "<div style=\"font-size: 1.1em;margin-bottom: 10px;\"><a class=\"url\" href=\"{$website}\">{$website}</a></div>";
        }
        $html .= "<div style=\"margin-bottom: 10px;\">";
        if ($people_allow_sexe) {
            $html .= "<img align=\"bottom\" src=\"{$sexeicon}\" border=\"0\" alt=\"\" width=\"16\" height=\"16\" /> ";
        }
        if ($people_allow_zodiac) {
            $html .= $zsign . " (<span class=\"bday\">{$birthday}</span>)";
        }
        $html .= "</div>";
        $html .= "";
        /*
        $html .= "<div>";
        $html .= "<a class=\"url\" type=\"application/x-icq\" href=\"http://www.icq.com/people/cmd.php?uin={$contact_icq}&action=message\"><img src=\"{$this->OnlineStatusIndicator}icq/{$contact_icq}\" alt=\"\" border=\"0\" style=\"margin-right: 5px; margin-right: 25px;\" /></a>";
        $html .= "<a class=\"url\" href=\"xmpp:{$contact_jabber}\"><img src=\"{$this->OnlineStatusIndicator}jabber/{$contact_jabber}\" alt=\"\" border=\"0\" style=\"margin-right: 5px; margin-right: 25px;\" /></a>";
        $html .= "<a class=\"url\" href=\"msnim:chat?contact={$contact_msn}\"><img src=\"{$this->OnlineStatusIndicator}msn/{$contact_msn}\" alt=\"\" border=\"0\" style=\"margin-right: 5px; margin-right: 25px;\" /></a>";
        $html .= "<a class=\"url\" href=\"ymsgr:sendIM?{$contact_yahoo}\"><img src=\"{$this->OnlineStatusIndicator}yahoo/{$contact_yahoo}\" alt=\"\" border=\"0\" style=\"margin-right: 5px; margin-right: 25px;\" /></a>";
        $html .= "<a class=\"url\" href=\"aim:goim?screenname={$contact_aim}\"><img src=\"{$this->OnlineStatusIndicator}aim/{$contact_aim}\" alt=\"\" border=\"0\" style=\"margin-right: 5px; margin-right: 25px;\" /></a>";
        $html .= "</div>";
        */
        $html .= "</div>";
        if (isset($_SESSION['valid_user']) && $musername == $_SESSION['valid_user']) {
            $html .= <<<EOS

        
        <script type="text/javascript" src="http://grou.ps/includes/wz_dragdrop.js"></script>
        <script type="text/javascript">
        <!--
        
        function crop_preloader() {
                
            SET_DHTML('theCrop');
                
        }
            
        crop_preloader();
            
            

        function my_DragFunc()
        {
            var z = xHeight('theImage')<=xWidth('theImage')?xHeight('theImage'):xWidth('theImage');
            
            dd.elements.theCrop.maxoffr = xWidth('theImage') - dd.elements.theCrop.w;
            dd.elements.theCrop.maxoffb = xHeight('theImage') - dd.elements.theCrop.h;
            dd.elements.theCrop.maxoffl = 0;
            dd.elements.theCrop.maxofft = 0;
            dd.elements.theCrop.minw = 80;
            dd.elements.theCrop.minh = 80;
            dd.elements.theCrop.maxw = (xWidth('theImage') + xPageX('theImage')) - dd.elements.theCrop.x;
            dd.elements.theCrop.maxh = (xHeight('theImage') + xPageY('theImage')) - dd.elements.theCrop.y;
        }

        function my_ResizeFunc()
        {
            var z = xHeight('theImage')<=xWidth('theImage')?xHeight('theImage'):xWidth('theImage');
            
            dd.elements.theCrop.maxoffr = xWidth('theImage') - dd.elements.theCrop.w;
            dd.elements.theCrop.maxoffb = xHeight('theImage') - dd.elements.theCrop.h;
            dd.elements.theCrop.maxoffl = 0;
            dd.elements.theCrop.maxofft = 0;
            dd.elements.theCrop.minw = 80;
            dd.elements.theCrop.minh = 80;
            dd.elements.theCrop.maxw = (xWidth('theImage') + xPageX('theImage')) - dd.elements.theCrop.x;
            dd.elements.theCrop.maxh = (xHeight('theImage') + xPageY('theImage')) - dd.elements.theCrop.y;
        }

   

        //-->
        </script>
        
        

\t\t
EOS;
        }
        return $html;
    }
Example #3
0
//LOGIN
$app->post('/login', function () {
    global $login, $app;
    $details = json_decode($app->request->getBody(), true);
    $result = $login->match($details['email'], $details['password']);
    echo $result;
});
//LOGOUT
$app->delete('/logout', function () {
    echo session_destroy();
});
//VERIFY LOGIN BY ECHOING SESSION
$app->get('/login/', function () use($friends, $user) {
    if (isset($_SESSION['user_id'])) {
        $_SESSION['num_friends'] = $friends->getNumberOfFriends($_SESSION['user_id']);
        $_SESSION['user_age'] = $user->getBirthday($_SESSION['user_id']);
    } else {
        $_SESSION['login'] = false;
    }
    echo json_encode($_SESSION);
});
//REGISTER PROCESS - check if email exists
$app->post('/checkemail', function () {
    global $user, $app;
    //echo ($app->request->getBody());
    $result = $user->checkEmailExists($app->request->getBody());
    echo $result;
    //var_dump ($us0r->getAllUsers());
});
// Register User
$app->post('/user/', function () {
Example #4
0
 public static function toArray(User $user)
 {
     $params = array(':userId' => $user->getId(), ':password' => $user->getPassword(), ':name' => $user->getName(), ':gender' => $user->getGender(), ':telephone' => $user->getTelephone(), ':email' => $user->getEmail(), ':avatar' => $user->getAvatar(), ':slogan' => $user->getSlogan(), ':birthday' => $user->getBirthday(), ':createdAt' => $user->getCreatedAt(), ':character' => $user->getCharacter());
     return $params;
 }
Example #5
0
 /**
  * @param User $inUser
  * @param      $password
  * @return bool | int returns new user ID on success
  */
 public function addUser(User $inUser, $password)
 {
     if (!PermissionEngine::getInstance()->currentUserCanDo('userCanAddUsers')) {
         return false;
     }
     $db = Database::getInstance();
     if (!$db->isConnected()) {
         return false;
     }
     $pass = Hasher::generateHash($password);
     $roleID = $db->escapeString($inUser->getRoleID());
     $firstName = $db->escapeString($inUser->getFirstName());
     $lastName = $db->escapeString($inUser->getLastName());
     $userName = $db->escapeString($inUser->getUserName());
     $email = $db->escapeString($inUser->getEmail());
     $givenID = $db->escapeString($inUser->getGivenIdentifier());
     $birthday = $inUser->getBirthday();
     $birthday = $db->escapeString($birthday->format("Y-m-d H:i:s"));
     $picture = $db->escapeString($inUser->getProfilePictureLocation()->getRawHref());
     $password = $db->escapeString($pass);
     $results = $db->insertData('user', 'roleID, firstName,lastName, userName, email, givenIdentifier, birthday, profilePictureLocation, password', "{$roleID}, '{$firstName}','{$lastName}', '{$userName}','{$email}', '{$givenID}', '{$birthday}', '{$picture}', '{$password}'");
     if (!$results) {
         return false;
     }
     return true;
 }