Пример #1
0
 public static function changeAccount($iAccountId)
 {
     //TODO:check if the user has access to change to that account
     //change account id in session to $iAccountId
     $_SESSION['account_id'] = $iAccountId;
     $_SESSION['account_domain'] = YASE_Account::getDomain($_SESSION['account_id']);
 }
Пример #2
0
 static function login($sLogin, $sPassword)
 {
     $res = mysql_query("SELECT login from user where login='******' and password='******'");
     $row = mysql_fetch_row($res);
     $sLoggedIn = $row[0];
     if (isset($sLoggedIn)) {
         $_SESSION['login'] = $sLoggedIn;
         $_SESSION['user_id'] = YASE_User::getId($_REQUEST['username']);
         $_SESSION['account_id'] = YASE_User::getFirstAccountId();
         $_SESSION['account_domain'] = YASE_Account::getDomain($_SESSION['account_id']);
         return true;
     } else {
         return false;
     }
 }
Пример #3
0
<?php

require_once 'classes/YASE/Framework.php';
$id = YASE_User::getId("pedant.dk");
$_SESSION['user_id'] = $id;
$aid = YASE_User::getFirstAccountId($id);
print_r(YASE_Account::getDomain($aid) . "\r\n");
Пример #4
0
<?php

require_once "../classes/YASE/Framework.php";
require_once "../classes/Template.php";
Template::admintop();
$iAccountID = $_REQUEST['account_id'];
if (isset($iAccountID)) {
    YASE_Account::changeAccount($iAccountID);
}
?>

<br>
<H1> Account information </H1>
<br><br>
account id:[<?php 
print $_SESSION["account_domain"];
?>
]

<?php 
print "[" . $_SESSION["account_id"] . "]";
Template::bottom();
?>

Пример #5
0
Файл: job.php Проект: engel/yase
<?php

require_once '../classes/YASE/Framework.php';
$account = $argv[1];
if ($argv[1] == "") {
    print "usage:\r\n";
    print "  job.php [account name] \r\n";
    exit - 1;
}
$iAccountID = YASE_Account::getId($argv[1]);
$c = new YASE_Crawler($iAccountID);
$c->start();
$i = new YASE_Indexer($iAccountID);
$i->start();