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; } ?>
public function deleteImages() { foreach ($this->arrImageField as $k => $v) { if (isset($this->data[$k]) && !empty($this->data[$k])) { JWStdio::URLDelete($this->data[$k]); } } }
function textNewsStyleS($d = null) { if ($d != null) { ?> <a href="news_cnt.php?id=<?php echo $d->id; ?> "></a> <div class="metro-art"> <hgroup> <h1 class="news-title"><?php echo $d->title; ?> </h1> <p class="news-time"><?php echo JDate::date_format($d->date, 'm月d日 Y'); ?> </p> </hgroup> <p class="news-shrink_text"> <?php echo JWStdio::strip_truncate($d->content, 154); ?> </p> </div> <?php } else { ?> <a href="Javascript:void(0);"></a> <div class="metro-art"> <hgroup> <h1 class="news-title"></h1> <p class="news-time"></p> </hgroup> <p class="news-shrink_text"></p> </div> <?php } }
function textNewsStyle1($d = null) { if ($d != null) { ?> <a href="news_cnt.php?id=<?php echo $d->id; ?> "></a> <div class="news-pic pic left"> <img src="<?php echo $d->icon; ?> " /> </div> <div class="metro-art right"> <hgroup> <h1 class="news-title"><?php echo $d->title; ?> </h1> <p class="news-time"><?php echo JDate::date_format($d->date, 'm月d日 Y'); ?> </p> </hgroup> <p class="news-shrink_text"> <?php echo JWStdio::strip_truncate($d->content, 154); ?> </p> </div> <?php } else { ?> <a href="Javascript:void(0);"></a> <div class="news-pic pic left"> <img src="dist/images/news-cover.jpg" /> </div> <div class="metro-art right"> <hgroup> <h1 class="news-title"></h1> <p class="news-time"></p> </hgroup> <p class="news-shrink_text"> </p> </div> <?php } }
<? require_once( './local.inc' ); $f=apache_lookup_uri( $_GET['fpath'] )->filename; $filename=basename($f); $fname = iconv('utf-8','big5',$_GET['fname']).".".JWStdio::fileExtension($filename); header( "Content-Type: application/octet-stream" ); header( 'Content-Disposition: attachment; filename="' . $fname . '"' ); header( 'Pragma: no-cache' ); readfile( $f ); ?>
$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']);
<img src="upload/news/news_051701.jpg" alt=""> </div> <div class="news-intro left"> <hgroup class="cnt_title"> <h1 class="news-title"><?php echo $d->title; ?> ?</h1> <p class="news-time"><?php echo JDate::date_format($d->date, 'm月d日 Y'); ?> </p> </hgroup> <p class="news-shrink_text"> <?php echo JWStdio::strip_truncate($d->content, 154); ?> </p> <div class="news-link"> <a href="news_cnt.php?id=<?php echo $d->id; ?> " class="btn btn-black btn-more">繼續閱讀</a> </div> </div> </li> <?php } ?> </ul>