コード例 #1
0
 function _before_edit()
 {
     $Tpl = template_file('Slide');
     $this->assign('Tpl', $Tpl);
     //$Flash= template_file('',$this->Flashpath,'swf');
     //$this->assign ( 'Flash', $Flash);
 }
コード例 #2
0
 /**
  * 编辑
  *
  */
 public function edit()
 {
     $id = intval($_GET['id']);
     foreach ((array) $this->Urlrule as $key => $r) {
         if ($r['ishtml']) {
             $Urlrule[$key] = $r;
         }
     }
     $this->assign('Urlrule', $Urlrule);
     $yourphp_auth_key = sysmd5(C('ADMIN_ACCESS') . $_SERVER['HTTP_USER_AGENT']);
     $yourphp_auth = authcode('1-1-0-1-jpeg,jpg,png,gif-3-0', 'ENCODE', $yourphp_auth_key);
     $this->assign('yourphp_auth', $yourphp_auth);
     $templates = template_file();
     $this->assign('templates', $templates);
     $record = $this->categorys[$id];
     $record['readgroup'] = explode(',', $record['readgroup']);
     if (empty($id) || empty($record)) {
         $this->error(L('do_empty'));
     }
     $parentid = intval($record['parentid']);
     import('@.ORG.Tree');
     $result = $this->categorys;
     foreach ($result as $r) {
         //if($r['type']==1) continue;
         $r['selected'] = $r['id'] == $parentid ? 'selected' : '';
         $array[] = $r;
     }
     $str = "<option value='\$id' \$selected>\$spacer \$catname</option>";
     $tree = new Tree($array);
     $select_categorys = $tree->get_tree(0, $str, $parentid);
     $this->assign('select_categorys', $select_categorys);
     $this->assign('vo', $record);
     $usergroup = F('Role');
     $this->assign('rlist', $usergroup);
     $this->display();
 }
コード例 #3
0
function template_file_exists($template, $template_dir = NULL)
{
    $template_file = template_file($template, $template_dir);
    return file_exists_($template_file);
}
コード例 #4
0
ファイル: index.php プロジェクト: BackupTheBerlios/oos-svn
 */
/**
 * Make sure we're UTF-8
 */
header('Content-Type: text/html; charset=utf-8');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/1">
	<title><?php 
template_sitename();
?>
</title>
	<link rel="stylesheet" type="text/css" href="<?php 
template_file('style.css');
?>
" media="screen"/>
	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
	<script language="JavaScript" type="text/javascript" src="<?php 
echo get_option('baseurl');
?>
inc/js/jquery.js"></script>
	<script language="JavaScript" type="text/javascript" src="<?php 
template_directory();
?>
/effects.js"></script>
	<?php 
template_header();
?>
</head>
コード例 #5
0
 /**
  * @param $file
  * @param array $data
  */
 public static function add_template_file($file, $data = array())
 {
     template_file(self::$current_working_file, $file, $data);
 }
コード例 #6
0
ファイル: index.php プロジェクト: cyberpay/multifaucet
        //Get status
        $status = $FAUCET->status();
    } else {
        //SpammerSlapper Failed
        $status = SF_STATUS_PAYOUT_ERROR;
    }
} elseif (isset($_POST["cryptocoin_address"])) {
    //BAD CAPTCHA
    $status = SF_STATUS_CAPTCHA_INCORRECT;
} else {
    //No Submition
    $status = $FAUCET->status();
}
// statistics:
$vars['stats'] = $FAUCET->get_stats();
//Save Status
$vars['status'] = $status;
//TODO: I need to think of a better way to do this
$show_form = faucet_eval_status($status, $vars, $LANGUAGE, $SETTINGS);
if ($show_form) {
    // Render Captcha
    $vars['captcha'] = faucet_get_captcha($SETTINGS);
    // Render Form
    $vars['content'] = render_template(faucet_get_content('form'), $vars);
} else {
    // Render Error/Status
    $vars['content'] = render_template(faucet_get_content('status'), $vars);
}
// Render full page
print render_template(template_file("page.tpl.php", get_current_theme_name()), $vars);
コード例 #7
0
ファイル: install.php プロジェクト: cyberpay/multifaucet
if (!empty($_GET)) {
    $redirect = install_process_get_request($step, $vars);
    //Redirect to new page if needed
    if (!empty($redirect)) {
        header("Location: {$redirect}");
        exit;
    }
}
//Process any POST requests
if (!empty($_POST)) {
    $redirect = install_process_post_request($step, $vars);
    //Redirect to new page if needed
    if (!empty($redirect)) {
        header("Location: {$redirect}");
        exit;
    }
}
//Genorate Page Title and heading based on insallation step
$vars['title'] = install_get_page_title($step);
$vars['heading'] = install_get_page_heading($step);
$vars['copyright'] = APPLICATION_NAME . " Install" . ' &copy;' . date("Y");
$vars['step'] = $step;
//Load License
$vars['LICENCE'] = getLicense();
//Load Template Engine
include "libraries/template.lib.php";
//Build and Display Page
$vars['breadcrumb'] = render_template(install_get_breadcrumb($step), $vars);
$vars['content'] = render_template(install_get_content($step), $vars);
print render_template(template_file("page.tpl.php"), $vars);
コード例 #8
0
ファイル: Form.class.php プロジェクト: bossyuetao/yuephp
 public function template($info, $value)
 {
     $templates = template_file(MODULE_NAME);
     $newinfo = $info;
     $info['setup'] = is_array($info['setup']) ? $info['setup'] : string2array($info['setup']);
     $options = array();
     $options[0] = L('please_chose');
     foreach ($templates as $key => $r) {
         if (strstr($r['value'], 'show')) {
             $options[$r['value']] = $r['filename'];
         }
     }
     $newinfo['options'] = $options;
     $fun = $info['setup']['inputtype'];
     return $this->select($newinfo, $value);
 }
コード例 #9
0
ファイル: template.php プロジェクト: jaz303/site-skel
function display_template($__tpl__, $locals = array())
{
    global $_TPL;
    extract($_TPL);
    require template_file($__tpl__);
}
コード例 #10
-2
ファイル: utils.php プロジェクト: netdust/ntdst-cms
function send_mail($from, $email, $tpl, $data = array())
{
    try {
        //Create a new PHPMailer instance
        $mail = new PHPMailer();
        // Set PHPMailer to use the sendmail transport
        //$mail->isSendmail();
        //Set who the message is to be sent from
        $mail->setFrom($from, $from);
        //Set an alternative reply-to address
        $mail->addReplyTo($from, $from);
        //Set who the message is to be sent to
        $mail->addAddress($email, '');
        //$mail->addAddress( '*****@*****.**', '');
        //Set the subject line
        $mail->Subject = isset($data['emailsubject']) ? $data['emailsubject'] : 'email from ' . $from;
        //Read an HTML message body from an external file, convert referenced images to embedded,
        //convert HTML into a basic plain-text alternative body
        $mail->msgHTML(template_file($tpl, $data));
        //Replace the plain text body with one created manually
        $mail->AltBody = '';
        $mail->CharSet = 'utf-8';
        if ($mail->send()) {
        }
    } catch (Exception $e) {
        print_r($e);
    }
}