Exemplo n.º 1
0
function local_login($username, $password)
{
    $user_info = get_login_info($username);
    if (isset($user_info) && is_array($user_info)) {
        $out_info = $user_info['data'];
        $out_info['success'] = $user_info['password'] === $password || $user_info['password'] === md5($password);
        return $out_info;
    }
    return array('success' => false);
}
Exemplo n.º 2
0
 private function checkLoginstatus()
 {
     if ($this->csloginid && (int) $this->csloginid > 0) {
         if ($this->csloginusersessionid) {
             $login_info = get_login_info((int) $this->csloginid);
             if ($login_info && $login_info->getStatus()) {
                 $user_info = get_user_info($login_info->getUserid());
                 if ($user_info) {
                     if ($this->csloginusersessionid == sha1($login_info->getLoginid() . $login_info->getUserid())) {
                         $this->islogin = true;
                         $this->login_info = $login_info;
                         $this->user_info = $user_info;
                         $this->usertype = $user_info->getType();
                         $this->userlevel = $user_info->getLevel();
                     }
                 }
             }
         }
     }
     return $this->islogin;
 }
Exemplo n.º 3
0
</head>
    <body>
        <header id="header" name="top">
            <div id="login_info">
                <?php 
get_login_info();
?>
            </div>
            <a href="">
                <h1>DESARROLLO DE APLICACIONES</h1>
                <h2>PHP - ANDROID</h2>
            </a>
            <nav>
                <ul>
                    <?php 
$active = get_active_menu();
?>
                    <a href="?p=home" class="<?php 
if ($active == "index") {
    echo "active";
}
?>
"><li>INICIO</li></a>
                    <a href="?p=homephp" class="<?php 
if ($active == "php") {
    echo "active";
}
?>
"><li>PHP</li></a>
                    <a href="?p=homeandroid" class="<?php 
if ($active == "android") {
Exemplo n.º 4
0
 function compose_message($to, $subject, $content, $path = '', $is_reply = false, $cc = '', $bcc = '')
 {
     $info = get_login_info();
     $mail = new PHPMailer();
     $mail->isSMTP();
     $mail->Host = "smtp.gmail.com";
     $mail->Username = $info['username'];
     $mail->Password = $info['password'];
     $mail->Port = 587;
     $mail->SMTPAuth = true;
     $mail->setFrom('*****@*****.**', 'example client');
     $mail->addReplyTo('*****@*****.**', 'example client');
     if (is_array($to)) {
         foreach ($to as $recipient) {
             $mail->addAddress($recipient);
         }
     } else {
         $mail->addAddress($to);
     }
     if ($is_reply !== FALSE) {
         $mail->AddCustomHeader("In-Reply-To: " . $is_reply);
     }
     if (is_array($path)) {
         foreach ($path as $file) {
             $mail->addAttachment($file);
         }
     } else {
         if (!empty($path)) {
             $mail->addAttachment($path);
         }
     }
     //This is due to certificate issues. TLS is recommended when possible
     $mail->SMTPOptions = array('ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true));
     $mail->Subject = $subject;
     $mail->Body = $content;
     $mail->isHTML(true);
     return $mail;
 }