本文整理汇总了PHP中STemplate::fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP STemplate::fetch方法的具体用法?PHP STemplate::fetch怎么用?PHP STemplate::fetch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类STemplate
的用法示例。
在下文中一共展示了STemplate::fetch方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: nl2br
STemplate::assign('message', $_REQUEST[message]);
STemplate::assign('key', $key);
STemplate::assign('firstname', $flist[$i]);
$mailbody = STemplate::fetch($email_path);
$mailbody = nl2br($mailbody);
@mailing($to, $name, $from, $subj, $mailbody);
}
}
if ($_REQUEST['recipients']) {
$emails = explode(",", $_REQUEST['recipients']);
for ($i = 0; $i < count($emails); $i++) {
$to = $emails[$i];
$name = $_SESSION[USERNAME];
$from = $_SESSION[EMAIL];
STemplate::assign('message', $_REQUEST[message]);
$mailbody = STemplate::fetch($email_path);
$mailbody = nl2br($mailbody);
$subj = str_replace('$sender_name', $sender_name, $subj);
$subj = str_replace('$gname', $gname, $subj);
@mailing($to, $name, $from, $subj, $mailbody);
}
}
header("Location: invite_members.php?urlkey={$_REQUEST['urlkey']}&gid={$_REQUEST['gid']}&msg=Your invite sent successfully");
}
}
$sql = "select fname from signup where UID='{$_SESSION['UID']}'";
$rs = $conn->execute($sql);
$first_name = $rs->fields['fname'];
STemplate::assign('first_name', $first_name);
$sql = "select friends_name, FID from friends where UID={$_SESSION['UID']} and friends_status='Confirmed'";
$rs = $conn->execute($sql);
示例2: Copyright
<?php
/**************************************************************************************************
| PinMe Script
| http://www.pinmescript.com
| webmaster@pinmescript.com
|
|**************************************************************************************************
|
| By using this software you agree that you have read and acknowledged our End-User License
| Agreement available at http://www.pinmescript.com/eula.html and to be bound by it.
|
| Copyright (c) PinMeScript.com. All rights reserved.
|**************************************************************************************************/
include "include/config.php";
include "include/functions/import.php";
$thebaseurl = $config['baseurl'];
$offset = intval($_REQUEST['offset']);
$query = "select A.PID, A.ptitle, A.pic, A.pkey, A.price, A.youtube, B.USERID, B.username, B.fname, B.lname, B.profilepicture, C.bname from posts A, members B, boards C WHERE A.active='1' AND A.USERID=B.USERID AND A.BID=C.BID AND A.youtube!='' order by A.points desc, A.viewcount desc, A.PID desc limit {$offset}, 10";
$results = $conn->execute($query);
$pins = $results->getrows();
STemplate::assign('pins', $pins);
$pcount = count($pins);
$html = STemplate::fetch('more.tpl');
$arr = array('count' => $pcount, 'lastPage' => false, 'html' => $html);
header("Content-Type: application/json");
echo json_encode($arr);
示例3: Copyright
/**************************************************************************************************
| PinMe Script by Scriptolution.com
| http://www.pinmescript.com
| webmaster@pinmescript.com
|
|**************************************************************************************************
|
| By using this software you agree that you have read and acknowledged our End-User License
| Agreement available at http://www.pinmescript.com/eula.html and to be bound by it.
|
| Copyright (c) PinMeScript.com. All rights reserved.
|**************************************************************************************************/
include "include/config.php";
include "include/functions/import.php";
$thebaseurl = $config['baseurl'];
$q = intval(cleanit($_REQUEST['params']['q']));
STemplate::assign('q', $q);
if ($q > 0) {
$addme = "AND D.USERID ='" . mysql_real_escape_string($q) . "'";
$offset = intval($_REQUEST['offset']);
$query = "select A.PID, A.ptitle, A.pic, A.pkey, A.price, A.youtube, A.USERID, C.bname from posts A, boards C, posts_fav D WHERE A.active='1' AND A.BID=C.BID AND A.PID=D.PID {$addme} order by A.points desc, A.viewcount desc, A.PID desc limit {$offset}, 10";
$results = $conn->execute($query);
$pins = $results->getrows();
STemplate::assign('pins', $pins);
$pcount = count($pins);
$html = STemplate::fetch('more_owner_likes.tpl');
$arr = array('count' => $pcount, 'lastPage' => false, 'html' => $html);
header("Content-Type: application/json");
echo json_encode($arr);
}
示例4: base64_encode
STemplate::assign('sender_name', $name);
STemplate::assign('message', $_REQUEST[message]);
STemplate::assign('freqkey', base64_encode($_SESSION[UID]));
for ($i = 0; $i < count($emails); $i++) {
$sql = "insert into friends set UID={$_SESSION['UID']}, friends_name='" . $emails[$i] . "', friends_type='All|" . $rtype[$i] . "', invite_date='" . date("Y-m-d") . "'";
$conn->execute($sql);
if (mysql_affected_rows() == 1) {
$id = mysql_insert_id();
} else {
$sql = "select id from friends WHERE UID={$_SESSION['UID']} and friends_name='" . $emails[$i] . "'";
$rs = $conn->execute($sql);
$id = $rs->fields['id'];
}
STemplate::assign('id', base64_encode($id));
STemplate::assign('receiver_name', $fnames[$i]);
$mailbody = STemplate::fetch('emails/invite_email.tpl');
$mailbody = nl2br($mailbody);
mailing($emails[$i], $name, $from, $subj, $mailbody);
}
}
$msg = "Invitation sent successfully";
}
$sql = "select fname from signup where UID='{$_SESSION['UID']}'";
$rs = $conn->execute($sql);
$first_name = $rs->fields['fname'];
STemplate::assign('first_name', $first_name);
STemplate::assign(err, $err);
STemplate::assign('msg', $msg);
STemplate::display('head1.tpl');
STemplate::display('err_msg.tpl');
STemplate::display('invite_signup.tpl');
示例5: explode
$uniqueid = explode("|", $custom);
$userid = $uniqueid[0];
$pack_id = $uniqueid[1];
$period = $uniqueid[2];
$theprice = $uniqueid[3];
// mailing("zakaria.cse@gmail.com","Stream it Now","robelsust@gmail.com","$userid, $pack, $period, $mailto","Test email");
$expired_time = date("Y-m-d H:i:s", strtotime("+{$period}"));
$sql = "update subscriber set\n pack_id={$pack_id},\n subscribe_time='" . date("Y-m-d H:i:s") . "',\n expired_time='{$expired_time}'\n where UID = {$userid}";
$conn->execute($sql);
$sql = "update signup set\n account_status = 'Active'\n where UID={$userid}";
$conn->execute($sql);
$sql = "select * from signup where UID={$userid}";
$rs_u = $conn->execute($sql);
$to = $rs_u->fields['email'];
$name = $config['site_name'];
$from = $config['admin_email'];
$subj = "Payment is received successfully";
STemplate::assign("userid", $rs_u->fields['UID']);
STemplate::assign("username", $rs_u->fields['username']);
STemplate::assign("pack_id", $pack_id);
STemplate::assign("pack_name", $rs_p->fields['pack_name']);
STemplate::assign("amount", $theprice);
STemplate::assign("period", $period);
STemplate::assign("expired_time", $expired_time);
$body = STemplate::fetch("mail/notify_payment.tpl");
mailing($to, $name, $from, $subj, $body);
} else {
$paypal_ipn->error_out("Fraud attempt was detected. (PayPal didn't validate the request data)");
}
exit;
// ---- end of PayPal IPN pocessing -----
示例6: Copyright
/**************************************************************************************************
| PinMe Script by Scriptolution.com
| http://www.pinmescript.com
| webmaster@pinmescript.com
|
|**************************************************************************************************
|
| By using this software you agree that you have read and acknowledged our End-User License
| Agreement available at http://www.pinmescript.com/eula.html and to be bound by it.
|
| Copyright (c) PinMeScript.com. All rights reserved.
|**************************************************************************************************/
include "include/config.php";
include "include/functions/import.php";
$thebaseurl = $config['baseurl'];
$q = intval(cleanit($_REQUEST['params']['q']));
STemplate::assign('q', $q);
if ($q > 0) {
$addme = "AND A.USERID ='" . mysql_real_escape_string($q) . "'";
$offset = intval($_REQUEST['offset']);
$query = "select A.PID, A.ptitle, A.pic, A.pkey, A.price, A.youtube, C.bname from posts A, boards C WHERE A.active='1' AND A.BID=C.BID {$addme} order by A.points desc, A.viewcount desc, A.PID desc limit {$offset}, 10";
$results = $conn->execute($query);
$pins = $results->getrows();
STemplate::assign('pins', $pins);
$pcount = count($pins);
$html = STemplate::fetch('more_owner.tpl');
$arr = array('count' => $pcount, 'lastPage' => false, 'html' => $html);
header("Content-Type: application/json");
echo json_encode($arr);
}