Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once('FirePHPCore/fb.php');
- ob_start();
- $thisstep = "1";
- include_once 'accesscontrol.php';
- $userid = $_SESSION['userid'];
- $username = $_SESSION['username'];
- $useremail = $_SESSION['useremail'];
- $usersignature = getClean($_SESSION['usersignature']);
- $usertemplates = $_SESSION['usertemplates'];
- unset($_SESSION['recipients']);
- unset($_SESSION['subject']);
- unset($_SESSION['newsubject']);
- include 'overall_header.php';
- ?><h1 id="step">step <? echo $thisstep; ?>:</h1>
- <h2 id="stepname">choose your template</h2>
- <div class="introcopy">The number of templates available to you at any given time may vary, based upon those activated or deactivated by the web administrator(s) for seasonality or other reasons.</div>
- <div class="introcopy">If you do not see a template that you believe should be activated, contact the web administrator(s).</div>
- <?
- echo "<h3 class=\"subhead\">Template options:</h3>\n\n";
- getTemplates($usertemplates);
- fb($usertemplates);
- include 'overall_footer.php';
- function getTemplates($string){
- $array = explode(',',$string);
- dbConnect("db39440_joomla");
- $sql = "SELECT * FROM jos_bwmailtpl WHERE
- state='1' ORDER BY ordering DESC";
- $result = mysql_query($sql);
- if (!$result) {
- error('A database error occurred while pulling the template options.');
- }
- if (mysql_num_rows($result) == 0) {
- ?>
- <p>You currently have no template options available.</p>
- <?php
- } else {
- $count = mysql_num_rows($result);
- $rowindex = $count -1;
- while ($count > 0){
- $thisid = mysql_result($result,$rowindex,'id');
- if (in_array($thisid, $array)) {
- $thistitle = mysql_result($result,$rowindex,'title');
- $thissubject = mysql_result($result,$rowindex,'title_alias');
- $thismessage = getClean(mysql_result($result,$rowindex,'introtext'));
- $thissalutation = mysql_result($result,$rowindex,'salutation');
- $thisdesign = mysql_result($result,$rowindex,'design');
- echo "
- <div style=\"border:1px solid #cccccc;height:272px;margin-bottom:10px;\">
- <div style=\"float:left;width:252px;height:252px;margin:10px;\"><a href=\"step2.php?id=" .$thisid. "\"><img src=\"design" .$thisdesign. "/thumb.png\" height=\"250\" width=\"250\" style=\"border:1px solid #999999;background-color:#e7e7e7;\" /></a></div>
- <div style=\"float:left;width:252px;height:252px;margin:10px 10px 10px 0px;\">
- <a href=\"step2.php?id=" .$thisid. "\" class=\"actionlinks\">" .$thistitle. "</a>
- <br /><br /><b>Default subject:</b><br />" .$thissubject. "
- <br /><br /><b>Default message:</b><br />" .$thismessage. "
- <br /><br /><b>Default salutation:</b><br />" .$thissalutation. "
- </div>
- </div>\n\n";
- }
- $count = $count -1;
- $rowindex = $count -1;
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment