예제 #1
0
파일: data.php 프로젝트: RandomEtc/apimaps
 function Context($db_dsn, $guardian_key, $flickr_key, $visitor_id)
 {
     $this->dbh =& DB::connect($db_dsn);
     $this->guardian_key = $guardian_key;
     $this->flickr_key = $flickr_key;
     $this->dbh->query('START TRANSACTION');
     $visitor = get_visitor($this, $visitor_id);
     if (!$visitor) {
         $visitor = add_visitor($this);
     }
     $this->dbh->query('COMMIT');
     $this->visitor_id = $visitor['id'];
 }
예제 #2
0
function create_session($bd, $login, $pwd, $id_session)
{
    $visitor = get_visitor($login, $bd);
    //L'internaute existe-t-il?
    if (is_object($visitor)) {
        //verif du mot de passe
        if ($visitor->pwd == md5($pwd)) {
            // on insere une session de trente minutes dans table websession
            $time_limit = date("U") + SESSION_DURATION;
            $insSession = "INSERT INTO websession (id_session, login, " . "time_limit, target_table, " . "mode) VALUES ('{$id_session}', '{$login}', '{$time_limit}', '{$visitor->target_table}', '{$visitor->mode}')";
            $resultat = execQry($insSession, $bd);
            return TRUE;
        } else {
            echo "<B> Sorry, incorrect password for {$login} !</B><P>";
            return FALSE;
        }
    } else {
        echo "<B>Sorry, {$login} is not a registered login!</B><P>";
        return FALSE;
    }
}
예제 #3
0
        <span class="Icon Icon--clock Icon--small"></span>
        <span class="ProfileHeaderCard-joinDateText js-tooltip u-dir" dir="ltr" >创建于2014年10月</span>
      </div>

            </div> 
   <div class="ProfileUserList ProfileUserList--socialProof">
  <div class="ProfileUserList-heading">
    <div class="ProfileUserList-title">
      <span class="Icon Icon--person Icon--medium u-alignBottom"></span>
      <span class="ProfileUserList-listName">
 <a href="javascript:;" class="ProfileUserList-permalink u-textUserColor js-nav">最近评论者</a></span>
    </div>
  </div>
    <ul class="ProfileUserList-facepile u-cf">      
     <?php 
    get_visitor();
    ?>
  </ul>
</div>
          
           </div> 
          </div> 
         </div> 
        </div> 
        <div class="Grid-cell u-size2of3 u-lg-size3of4"> 
         <div class="Grid Grid--withGutter"> 
          <div class="Grid-cell"> 
           <div class="js-profileClusterFollow"></div> 
          </div> 
          <div class="Grid-cell
                    u-lg-size2of3