Exemplo n.º 1
0
		public function _enable() {
			$ret=new stdClass();
			$ret->success=true;
			$r= new JTUser($_SESSION['login_user_id']);
			$r->select( $_GET['id'] );
			$r->data['enable'] = $_GET['enable'];
			$r->update();
			die( json_encode($ret) );
		}
Exemplo n.º 2
0
	switch($action)	{
		case 'form':
			$smarty = new JSmartyTemplate($templateName);
			if( isset($_REQUEST['error']) )
				$smarty->assign('error', $_REQUEST['error']);
			$smarty->display(dirname(__FILE__).'/login.tpl.htm');
			break;
		case 'login':
			if( !Vercode::verify( $_POST['vercode_instance_id'], $_POST['vercode']) )	{
				Vercode::clear();
				$smarty = new JSmartyTemplate( $templateName );
				$smarty->assign( 'error', '驗証碼錯誤' );
				$smarty->display( dirname(__FILE__).'/login.tpl.htm' );
				exit;
			}
			Vercode::clear();
			if( !JTUser::login( $_POST['account'], $_POST['password'] ) )	{
				$smarty = new JSmartyTemplate($templateName);
				$smarty->assign('error', JTUser::$errorMessage);
				$smarty->display(dirname(__FILE__).'/login.tpl.htm');
			}	else	{
				$uri = JUtil::ifv($_POST['uri']=='','/admin/',$_POST['uri']);
				JWStdio::location($uri);
			}
			break;
		case 'logout':
			JTUser::logout();
			JWStdio::location("/admin/");
			break;
	}
?>
Exemplo n.º 3
0
 public static function loginFail($acocunt, $errorID, $errorMessage)
 {
     self::$errorID = $errorID;
     self::$errorMessage = $errorMessage;
 }
<?
	require_once('local.inc');
	header('Content-Type: text/html; charset=utf-8');
	sleep(1);
	$ret=array();
	$ret[0]=$_REQUEST['fieldId'];
	$ret[1]=true;
	if( JTUser::isAccountExists($_REQUEST['fieldValue']) )	{
		$ret[1]=false;
	}
	die( json_encode($ret) );
?>
Exemplo n.º 5
0
<?
	require_once('./local.inc');
	$smarty = new JSmartyTemplate($templateName);
	$news = new JTNews();
	$smarty->assign('news_count', $news->count());
	$team = new JTTeam();
	$smarty->assign('team_count', $team->count());
	$advisory = new JTAdvisory();
	$smarty->assign('advisory_count', $advisory->count());
	$report = new JTReport();
	$smarty->assign('report_count', $report->count());
	$document = new JTDocument();
	$smarty->assign('document_count', $document->count());
	$saleschannel = new JTSaleschannel();
	$smarty->assign('saleschannel_count', $saleschannel->count());
	$faq = new JTFAQ();
	$smarty->assign('faq_count', $faq->count());
	$user = new JTUser();
	$smarty->assign('user_count', $user->count());
	$smarty->display(dirname(__FILE__).'/index.tpl.htm');
?>
Exemplo n.º 6
0
$smartyMail->assign('r', $contactus);
$mail->Body = $smartyMail->fetch('message.tpl.htm');
$mail->Subject = "康和期貨經理事業 - 聯絡表單";
$mail->AddAddress($contactus->data['email'], $contactus->data['name']);
if (!$mail->Send()) {
    JWStdio::error($mail->ErrorInfo);
    exit;
}
//
//	from user to 管理者
//
$mail = new JMailer();
// if( !empty($contactus->data['email']) )	{
$mail->AddReplyTo($contactus->data['email'], $contactus->data['name']);
// }
$mail->setFromAsService();
$smartyMail = new JSmartyTemplate();
$smartyMail->assign('openTo', 'admin');
$smartyMail->assign('r', $contactus);
$mail->Body = $smartyMail->fetch('message.tpl.htm');
$mail->Subject = "康和期貨經理事業 - 聯絡表單";
$ru = new JTUser();
$rsUser = $ru->all();
foreach ($rsUser as $rUser) {
    $mail->AddAddress($rUser->email, $rUser->name);
}
if (!$mail->Send()) {
    JWStdio::error($mail->ErrorInfo);
    exit;
}
JWStdio::alert('送出完成', $_POST['url']);