当前位置: 首页>>代码示例>>PHP>>正文


PHP dbFetchArray函数代码示例

本文整理汇总了PHP中dbFetchArray函数的典型用法代码示例。如果您正苦于以下问题:PHP dbFetchArray函数的具体用法?PHP dbFetchArray怎么用?PHP dbFetchArray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dbFetchArray函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendNewsletter

function sendNewsletter($queueID = 0)
{
    if ($queueID == 0) {
        return false;
    }
    //wtf? not queueID was defined musta been a booboo!
    //k we need to umm grab the info from the queue
    $queueResults = dbQuery('SELECT e.*, t.* FROM email_queue AS e, email_templates AS t WHERE t.email_templates_id = e.email_template_id AND e.email_queue_id = ' . $queueID);
    $q = dbFetchArray($queueResults);
    //we have everything we need i believe!
    //lets send out the newsletter, then remove it from the queue and add to the sent table
    //the sent table will allow the admin to resend at anytime
    //include the class phpmailer()
    include_once 'classes/class.phpmailer.php';
    //now we need to get stuff!
    $content = output($q['email_templates_header']);
    $content .= output($q['email_queue_email_text']);
    $content .= output($q['email_templates_footer']);
    $q['content'] = $content;
    $recipients = explode(',', $q['email_queue_recipients']);
    foreach ($recipients as $key => $val) {
        $mail = new PHPMailer();
        $mail->From = output($q['email_queue_from']);
        $mail->FromName = output($q['email_queue_from']);
        $mail->isMail = true;
        $mail->Body = output($content);
        $mail->AddAddress($val);
        $mail->Subject = output($q['email_queue_subject']);
        //check to see if there is an attachment
        if ($q['email_queue_attachment'] != "") {
            $mail->AddAttachment(UPLOAD_DIR_NEWSLETTER . $q['email_queue_attachment'], $q['email_queue_attachment']);
        }
        $mail->ContentType = 'text/html';
        $mail->Send();
        $mail->ClearAddresses();
    }
    $row['client_id'] = 1;
    $row['email_queue_date_sent'] = time();
    $row['email_queue_subject'] = $q['email_queue_subject'];
    $row['email_queue_content'] = $q['content'];
    $row['email_templates_id'] = $q['email_template_id'];
    $row['email_recipients'] = $q['email_queue_recipients'];
    $row['email_display_home'] = $q['email_display_home'];
    dbPerform('email_queue_sent', $row, 'insert');
    dbQuery('DELETE FROM email_queue WHERE email_queue_id = ' . $q['email_queue_id']);
    return true;
}
开发者ID:sherdog,项目名称:cvsi,代码行数:47,代码来源:functions.email.php

示例2: orderoldfood

function orderoldfood()
{
    if (isset($_POST)) {
        $food_id = $_POST['food_id'];
        $food_name = $_POST['food_name'];
        $food_type = $_POST['food_type'];
        $add_amount = $_POST['add_amount'];
        $price_per = $_POST['price_per'];
        $total = $add_amount * $price_per;
    }
    $conn = dbConnect();
    if ($conn) {
        $sql0 = "SELECT AMOUNT FROM EMM_ZOO.FM_STOCK WHERE FOODID = {$food_id};";
        $stm = dbQuery($conn, $sql0);
        while ($row = dbFetchArray($conn, $stm)) {
            $amountx = $row[0];
        }
        $amount_now = $amountx + $add_amount;
        $sql1 = "INSERT INTO EMM_ZOO.FOODANIMAL_EXPENSE (FOODEXPENSE_ID,DATES,FOODID,COST,RESPONPERSONID) VALUES (DEFAULT,CURRENT DATE,{$food_id},{$total},'5678');";
        $cb = db2_exec($conn, $sql1);
        $sql2 = "UPDATE EMM_ZOO.FM_STOCK SET AMOUNT = {$amount_now} WHERE FOODID = {$food_id};";
        $cc = db2_exec($conn, $sql2);
        if ($cc && $cb) {
            $resultMessage = 1;
            return $resultMessage;
            header('Location: FoodStock.php#food_list');
        } else {
            $resultMessage = 0;
            return $resultMessage;
        }
        db2_free_stmt($stmt);
        db2_close($conn);
    }
}
开发者ID:Juklabs,项目名称:emmaline,代码行数:34,代码来源:orderControl.php

示例3: get_available_calculators

function get_available_calculators()
{
    $results = dbQuery('SELECT * FROM tools_calculators');
    while ($r = dbFetchArray($results)) {
        $c[] = array('id' => $r['tools_calculators_id'], 'name' => $r['tools_calculators_name']);
        echo "<li><label><input type=\"checkbox\" name=\"calculators[]\" value=\"" . $val['id'] . "\">" . $val['name'] . "</option></li>\n";
    }
    return $c;
}
开发者ID:sherdog,项目名称:cvsi,代码行数:9,代码来源:functions.tools.php

示例4: getDateCreated

function getDateCreated($userID)
{
    $results = dbQuery('SELECT user_created FROM user WHERE user_id = ' . $userID);
    $row = dbFetchArray($results);
    if ($row['user_created'] == 0) {
        return "n/a";
    } else {
        return date('m/d/Y', $row['user_created']);
    }
}
开发者ID:sherdog,项目名称:cvsi,代码行数:10,代码来源:functions.user.php

示例5: carReturn

function carReturn()
{
    $up = "Y";
    if (isset($_POST)) {
        $empID = $_POST['empID'];
        $carID = $_POST['carID'];
        // an array that want to insert this can be multiple array at the time.
        // print var_dump to display an array of variable data with type that prepare for query.
        //echo var_dump($data) ."<br>";
    }
    // define $conn from model
    $conn = dbConnect();
    if ($conn) {
        // DEFAULT if you set generated as identify with specifier this will auto increament for integer.
        $delete = "DELETE FROM EMM_ZOO.CARS_BORROWED WHERE EMM_ZOO.CARS_BORROWED.CARID = '" . $carID . "';";
        $update = "UPDATE EMM_ZOO.CARS SET EMM_ZOO.CARS.AVAILABLE = '" . $up . "' WHERE EMM_ZOO.CARS.CARID = '" . $carID . "';";
        $guanteen = "SELECT AVAILABLE FROM EMM_ZOO.CARS WHERE EMM_ZOO.CARS.CARID = '" . $carID . "';";
        $ans = dbQuery($conn, $guanteen);
        $row = dbFetchArray($conn, $ans);
        if ($row[0] == 'Y' || $row[0] == 'y') {
            echo "<script type='text/javascript'>alert(' This car has not been borrowed yet');</script>";
            header("Refresh:0; url=returnCar.php");
        } else {
            $result = db2_exec($conn, $delete);
            if ($result) {
                $result2 = db2_exec($conn, $update);
                if ($result2) {
                    echo "<script type='text/javascript'>alert('CAR RETURNED');</script>";
                    header("Refresh:0; url=returnCar.php");
                } else {
                    echo "<script type='text/javascript'>alert('You need to fill all input OR Your employeeID,carID does not exist');</script>";
                    header("Refresh:0; url=TransportationEmployee.php");
                }
            } else {
                // If statement is error why see the code
                die('Critical error:' . db2_stmt_error($stmt));
            }
            db2_free_stmt($result);
            db2_free_stmt($result2);
        }
        db2_free_stmt($ans);
        db2_free_stmt($row);
        db2_close($conn);
    } else {
        echo db2_conn_errormsg($conn);
    }
}
开发者ID:Juklabs,项目名称:emmaline,代码行数:47,代码来源:returnController.php

示例6: recurseCategories

function recurseCategories($parent = 0, $count = 1)
{
    $sql = 'SELECT * FROM store_categories WHERE categories_parent = ' . $parent . ' ORDER BY categories_title ASC';
    for ($i = 0; $i <= $count; $i++) {
        $padding = 10 * $count;
    }
    $results = dbQuery($sql);
    while ($cInfo = dbFetchArray($results)) {
        echo "<tr>\n";
        echo "<td class=\"row" . $row . "\"><a href=\"" . PAGE_STORE . "?section=products&action=manage&c=" . $cInfo['categories_id'] . "\" title=\"" . output($cInfo['categories_title']) . "Products\"><img src=\"images/icons/folder_closed_16x16.gif\" width=\"16\" height=\"16\" border=\"0\" /></a></td>\n";
        echo "<td class=\"row" . $row . " pageTitleSub \"><img src=\"images/filler.gif\" width=\"" . $padding . "\" height=\"5\"> <a href=\"" . PAGE_STORE . "?section=products&action=manage&c=" . $cInfo['categories_id'] . "\" title=\"" . output($cInfo['categories_title']) . " Products\">" . output($cInfo['categories_title']) . "</a></td>\n";
        echo "<td class=\"row" . $row . "\">" . date('m/d/Y', $cInfo['categories_date_added']) . "</td>\n";
        echo "<td width=\"50\" class=\"row" . $row . "\"><a href=\"" . PAGE_STORE_CATEGORIES . "&action=editcategory&id=" . $cInfo['categories_id'] . "\" title=\"Edit " . output($cInfo['categories_title']) . "\" ><img src=\"images/icons/edit_16x16.gif\" width=\"16\" height=\"16\" border=\"0\" /></a> | <a href=\"" . PAGE_STORE . "?action=deletecategory&id=" . $cInfo['categories_id'] . "\" onclick=\"return confirm('Are you sure you want to delete " . $cInfo['categories_title'] . "?');\"><img src=\"images/icons/delete_16x16.gif\" width=\"16\" height=\"16\" border=\"0\" /></a></td>\n";
        echo "</tr>\n";
        recurseCategories($cInfo['categories_id'], $count + 1);
    }
}
开发者ID:sherdog,项目名称:cvsi,代码行数:17,代码来源:functions.store.php

示例7: ordernewfood

function ordernewfood()
{
    if (isset($_POST)) {
        $food_name = $_POST['food_name'];
        $food_type = $_POST['food_type'];
        $add_amount = $_POST['add_amount'];
        $price_per = $_POST['price_per'];
        $total = $add_amount * $price_per;
        $username = $_POST['username'];
        $data = array($food_name, $food_type, $add_amount, $price_per);
    }
    $conn = dbConnect();
    if ($conn) {
        $conn = dbConnect();
        $sql0 = "INSERT INTO EMM_ZOO.FM_STOCK (FOODID,FOODNAME,TYPE,AMOUNT,PERAMOUNT) VALUES(DEFAULT,'{$food_name}','{$food_type}',{$add_amount}, {$price_per})";
        $ca = db2_exec($conn, $sql0);
        if ($ca) {
            $resultMessage = 1;
            return $resultMessage;
        } else {
            $resultMessage = 0;
            return $resultMessage;
        }
        $sql1 = "SELECT FOODID FROM EMM_ZOO.FM_STOCK WHERE FOODNAME = '{$food_name}';";
        $stm = dbQuery($conn, $sql);
        while ($row = dbFetchArray($conn, $stm)) {
            $foodidx = $row[0];
        }
        $sql2 = "INSERT INTO EMM_ZOO.FOODANIMAL_EXPENSE (FOODEXPENSE_ID,DATES,FOODID,COST,RESPONPERSONID) VALUES (DEFAULT,current date,{$foodidx},{$total},{$username});";
        $sc = db2_exec($conn, $sql2);
        if ($sc) {
            $resultMessage = 1;
            return $resultMessage;
            header('Location: FoodStock.php#order_new');
            exit;
        } else {
            $resultMessage = 0;
            return $resultMessage;
        }
        db2_free_stmt($stmt);
        db2_close($conn);
    }
}
开发者ID:Juklabs,项目名称:emmaline,代码行数:43,代码来源:ordernewControl.php

示例8: exportfood

function exportfood()
{
    if (isset($_POST)) {
        $food_id = $_POST['food_id2'];
        $food_name = $_POST['food_name2'];
        $food_type = $_POST['food_type2'];
        $out_amount = $_POST['out_amount'];
        $username = $_SESSION['current_user_name'];
    }
    $conn = dbConnect();
    if ($conn) {
        $sql0 = "SELECT AMOUNT FROM EMM_ZOO.FM_STOCK WHERE FOODID = {$food_id};";
        $stm = dbQuery($conn, $sql0);
        while ($row = dbFetchArray($conn, $stm)) {
            $amountx = $row[0];
        }
        $amount_now = $amountx - $out_amount;
        if ($amount_now > 0) {
            $sql1 = "UPDATE EMM_ZOO.FM_STOCK SET AMOUNT = {$amount_now} WHERE FOODID = {$food_id};";
            $cz = db2_exec($conn, $sql1);
            $sql2 = "INSERT INTO EMM_ZOO.FOOD_GIVE(GIVENO,FOODID,EMPID,FOODNAME,FOODTYPE,AMOUNT,GIVETIME,ANIMAL) VALUES (DEFAULT,'{$food_id}','5678','{$food_name}','{$food_type}',{$out_amount},NULL,NULL);";
            $cb = db2_exec($conn, $sql2);
            if ($cb && $cz) {
                $resultMessage = 1;
                return $resultMessage;
                header('Location: FoodStock.php#food_list');
            } else {
                $resultMessage = 0;
                return $resultMessage;
            }
            db2_free_stmt($stmt);
            db2_close($conn);
        } else {
            echo "<script language='javascript'>alert('Not enough food!');</script>";
        }
    }
}
开发者ID:Juklabs,项目名称:emmaline,代码行数:37,代码来源:export.php

示例9: recurse_pages

function recurse_pages($id = 0, $level = 0)
{
    $level++;
    $sql = "SELECT * FROM page_content WHERE parent = " . $id . " ORDER BY page_content_title ASC";
    $pageResults = dbQuery($sql);
    $count = 0;
    while ($pInfo = dbFetchArray($pageResults)) {
        $padding = 18 * $level;
        if ($level != 1) {
            $style = "style=\"padding-left:" . ($padding + 18) . "px; background-repeat:no-repeat; background-position:" . $padding . "px 0px; background-image:url(images/directory_arrow.gif);\"";
        } else {
            $class = "";
        }
        //SECURITY CHECK
        //ONLY SHOW PAGES THAT THE USER HAS ACCESS TOO
        $row = $count % 2;
        echo "<tr>\n";
        echo "<td  nowrap width=\"1\">\n";
        if ($pInfo['page_content_member']) {
            echo "<a href=\"javascript:void(0);\" title=\"Membership Required\"><img src=\"images/icons/lock_16x16.gif\" border=\"0\"><a>";
        }
        echo "</td>\n";
        echo "<td nowrap width\"1\">" . date('m/d/Y', $pInfo['page_content_publish_date']) . "</td>\n";
        echo "<td " . $style . "><a href=\"" . PAGE_MANAGE . "?action=edit&section=webpage&id=" . $pInfo['page_content_id'] . "\">" . output($pInfo['page_content_title']) . "</a></td>\n";
        echo "<td nowrap width\"1\">";
        if ($pInfo['page_content_status'] == 'pending') {
            echo "<span class=\"textPending\">Pending</span>";
        } else {
            if ($pInfo['page_content_status'] == 'published') {
                echo "<span class=\"textActive\">Published</span>";
            } else {
                echo "<span class=\"textInactive\">Unpublished</span>";
            }
        }
        echo "</td>\n";
        echo "<td nowrap width\"1\">\n";
        echo "<span class=\"smallText\"><abbr title=\"by " . getAuthor($pInfo['page_content_author']) . "\" style=\"margin:2px;\">Created: " . date('m/d/y g:i a', $pInfo['page_content_added']) . " </abbr></span>\n";
        //check to see if this page has been edited
        //display
        $modifiedResults = dbQuery('SELECT * FROM page_content_log WHERE page_content_id = ' . $pInfo['page_content_id'] . ' LIMIT 1');
        if (dbNumRows($modifiedResults)) {
            $m = dbFetchArray($modifiedResults);
            echo "<br>";
            echo "<span class=\"smallText\" style=\"font-style:italic;\"><abbr style=\"margin:2px;\" title=\"by " . getAuthor($m['user_id']) . "\">Last Modified: " . date('m/d/y g:i a', $m['page_content_log_timestamp']) . "</abbr></span>";
        }
        echo "</td>\n";
        echo "<td align=\"right\" >";
        if ($level == 1) {
            echo "<a class=\"table_addsubpage_link\" href=\"" . PAGE_PUBLISH . "?section=webpage&parent=" . $pInfo['page_content_id'] . "\" title=\"Add Sub Page\">Add Subpage</a>";
            echo " ";
        }
        if (user_has_permission('banners')) {
            //echo "<a class=\"table_banner_link\" href=\"".PAGE_MANAGE."?action=banners&section=webpage&id=".$pInfo['page_content_id']."\" title=\"Add Banner\">Advert</a>\n";
            //echo " ";
        }
        if (user_has_permission('content') && user_has_page_permissions($pInfo['page_content_id'])) {
            echo "<a class=\"table_edit_link\" href=\"" . PAGE_MANAGE . "?action=edit&section=webpage&id=" . $pInfo['page_content_id'] . "\" title=\"Edit " . output($pInfo['page_content_title']) . "\">Edit</a>\n";
            echo " ";
        }
        if (user_has_permission('admin')) {
            echo "<a class=\"table_delete_link\" href=\"" . PAGE_MANAGE . "?action=delete&section=webpage&id=" . $pInfo['page_content_id'] . "\" title=\"Delete " . output($pInfo['page_content_title']) . "\" onclick=\"return confirm('Are you sure you want to delete this page? THIS IS NOT UNDOABLE');\">Delete</a>\n";
        }
        echo "</td>\n";
        echo "</tr>\n";
        recurse_pages($pInfo['page_content_id'], $level);
        $count++;
    }
}
开发者ID:sherdog,项目名称:cvsi,代码行数:68,代码来源:functions.general.php

示例10: dbFetchArray

																	while($imgInfo = dbFetchArray($imgCheck))
																	{
																		echo "<tr>";
																		echo "<td value=\"top\" class=\"pageTitleSub\">Image: <br /><span style=\"font-size:10px; font-weight:normal\">(click to enlarge)</a></td>";
																		echo "<td><a href=\"".STORE_IMAGE_URL . $imgInfo['products_images_filename']."\" target=\"_blank\" class=\"title\"><img src=\"".STORE_IMAGE_URL . getThumbnailFilename($imgInfo['products_images_filename'], 'thumb')."\" /><br /><a href=\"store.php?action=deleteproductimage&id=".$imgInfo['products_images_id']."&pid=".$_GET['id']."\">Delete</a></td>";
																		echo "</tr>";
																	}
																}
															  }
															  ?>
													        <tr>
													          <td class="pageTitleSub">Category</td>
													          <td class="pageTitleSub"><select name="c" id="c" class="textField-title">
													            <?
															  $categories = dbQuery('SELECT * FROM store_categories ORDER BY categories_title');
															  while($cInfo = dbFetchArray($categories)) {
																echo "<option value=\"".$cInfo['categories_id']."\"";
																	if($cInfo['categories_id'] == $_GET['c'])
																		echo " selected";
																echo ">".output($cInfo['categories_title'])."</option>\n";
															  }
															  ?>
													            </select></td>
												            </tr>
													        <?
															  if($_GET['action'] == 'editproduct') { //check to see if an image already exists if so then we want to allow the user to view the image
																if($pInfo['products_info_custom_6'] != "") {
																	echo "<tr>";
																	echo "<td valign=\"top\" class=\"pageTitleSub\">Current Spec Sheet <br><span style=\"font-size:10px; font-weight:normal;\">(click to enlarge)</a></td>";
																	echo "<td>";
																	echo "<a href=\"../files/".$pInfo['products_info_custom_6']."\" target=\"_blank\" class=\"title\">[view spec sheet]</a>";	
开发者ID:sherdog,项目名称:cvsi,代码行数:31,代码来源:store.php

示例11: dbConnect

<?php

include 'dbInterface.php';
$q = $_GET["q"];
$con = dbConnect();
$sql = "SELECT * FROM cliente WHERE idCliente = '" . $q . "'";
$result = dbExecQuery($sql, $con);
$row = dbFetchArray($result);
echo '<td>' . $row['idCliente'] . "</td>";
echo "<td>" . $row['nomeCliente'] . "</td>";
dbCloseConnection($con);
开发者ID:atilamtm,项目名称:temcmol,代码行数:11,代码来源:findClientByID.php

示例12: uploadSold

function uploadSold()
{
    if (isset($_POST)) {
        $product_id = $_POST['product_id'];
        $amount = $_POST['amount'];
        $date = $_POST['date'];
        $location = $_POST['location'];
        //$location= $_POST['location'];
        $price = "SELECT EMM_ZOO.PRODUCT.PRICE FROM EMM_ZOO.PRODUCT WHERE EMM_ZOO.PRODUCT.PRODUCTNO = " . $product_id . ";";
        $start = "SELECT EMM_ZOO.PROMOTION.PROSTART FROM EMM_ZOO.PROMOTION WHERE EMM_ZOO.PROMOTION.PRODUCTNO = " . $product_id . ";";
        $end = "SELECT EMM_ZOO.PROMOTION.PROEND FROM EMM_ZOO.PROMOTION WHERE EMM_ZOO.PROMOTION.PRODUCTNO = " . $product_id . ";";
        $discount = "SELECT EMM_ZOO.PROMOTION.PROTYPE FROM EMM_ZOO.PROMOTION WHERE EMM_ZOO.PROMOTION.PRODUCTNO = " . $product_id . ";";
        // $price= $_POST['price'];
        // $toatl =$price*$amount;
        // an array that want to insert this can be multiple array at the time.
        //$data = array( $product_id ,$price*$amount, $amount, $date);
        // print var_dump to display an array of variable data with type that prepare for query.
        //echo var_dump($data) ."<br>";
    }
    // define $conn from model
    $conn = dbConnect();
    if ($conn) {
        // DEFAULT if you set generated as identify with specifier this will auto increament for integer.
        $select = "SELECT PRICE FROM PRODUCT WHERE PRODUCTNO = " . $product_id . ";";
        $sql = 'INSERT INTO EMM_ZOO.HISTORYSOLD(RUNNINGNO,PRODUCTNO,PRICE,AMOUNT,DATEE)  VALUES (DEFAULT,?,?,?,?);';
        $update = "UPDATE EMM_ZOO.SHOP_STOCK  SET EMM_ZOO.SHOP_STOCK.AMOUNT = EMM_ZOO.SHOP_STOCK.AMOUNT - '" . $amount . "' \n           WHERE EMM_ZOO.SHOP_STOCK.PRODUCTNO = '" . $product_id . "'  \n           AND EMM_ZOO.SHOP_STOCK.SHOPLOCATION = '" . $location . "';";
        echo $sql;
        // prepare statement using connection and sql
        $stmt = db2_prepare($conn, $sql);
        $stmt2 = db2_exec($conn, $update);
        $result3 = dbQuery($conn, $start);
        $startrow = dbFetchArray($conn, $result3);
        $result4 = dbQuery($conn, $end);
        $endrow = dbFetchArray($conn, $result4);
        $result5 = dbQuery($conn, $price);
        $pricerow = dbFetchArray($conn, $result5);
        $result6 = dbQuery($conn, $discount);
        $discountrow = dbFetchArray($conn, $result6);
        echo $location;
        if ($date < $endrow[0] && $date > $startrow[0]) {
            $pricerow[0] = $pricerow[0] - $pricerow[0] * $discountrow[0] / 100;
        }
        $data2 = array($product_id, $pricerow[0] * $amount, $amount, $date);
        // If statement is valid execute it to db2
        if ($stmt) {
            //echo "SQL is valid<br>";
            $result = db2_execute($stmt, $data2);
            if ($result) {
                $resultMessage = "Successfully added to parking reserved";
                //echo "Successfully added";
                header("Refresh:0; url=sold.php");
                // you must refresh page after insert, define specific page you want to refresh , header("Refresh:0"); it mean refresh current page
            } else {
                $resultMessage = "Failed to query into database";
            }
        }
        if ($stmt2) {
            print "Updated successfully\n";
        }
        //else { // If statement is error why see the code
        //   die('Critical error:' . db2_stmt_error($stmt2));
        //}
        db2_free_stmt($stmt);
        //db2_free_stmt($stmt2);
        db2_close($conn);
    } else {
        echo db2_conn_errormsg($conn);
    }
}
开发者ID:Juklabs,项目名称:emmaline,代码行数:69,代码来源:upOrder.php

示例13: switch

<?php

include 'application.php';
//what section
switch ($_GET['load']) {
    case 'header':
        //get html for header =)
        $headeResults = dbQuery('SELECT email_templates_header FROM email_templates WHERE email_templates_id = ' . $_GET['id']);
        if (!dbNumRows($headeResults)) {
            echo "no Results!";
        }
        $h = dbFetchArray($headeResults);
        echo html_entity_decode(output($h['email_templates_header']));
        break;
    case 'footer':
        //get html for header =)
        $headeResults = dbQuery('SELECT email_templates_footer FROM email_templates WHERE email_templates_id = ' . $_GET['id']);
        $h = dbFetchArray($headeResults);
        echo html_entity_decode(output($h['email_templates_footer']));
        break;
    case 'body':
        //get html for header =)
        $headeResults = dbQuery('SELECT email_templates_body FROM email_templates WHERE email_templates_id = ' . $_GET['id']);
        $h = dbFetchArray($headeResults);
        echo "<textarea name=\"emailTemplateBody\" id=\"mceEditor\">" . output($h['email_templates_body ']), "</textarea>\n";
        break;
}
开发者ID:sherdog,项目名称:cvsi,代码行数:27,代码来源:templateLoader.php

示例14: dbQuery

<?php

//used in conjuction with the gallery area
//display form to add caption and set sort order number.
include 'application.php';
if (!isset($_GET['page'])) {
    echo "Page is not set!";
}
$galleryResults = dbQuery('SELECT * FROM page_gallery_images WHERE page_gallery_image_id =  ' . $_GET['image_id']);
$gal = dbFetchArray($galleryResults);
?>
 


<table width="100%" border="0" cellspacing="0" cellpadding="5">
    <tr>
      <td align="right"><a href="#" class="jqmClose"><em>Close</em></a></td>
    </tr>
  </table>
<div class="success" style="display:none;">Saved image successully <a href="javascript:void(0);" onClick="location.reload(true);">Close and refresh window</a></div>
<div class="error" style="display:none;">Whoops, there was an error saving your information<br /><a href="#" id="jqmClose">Close Window</a></div>
<div id="imageForm">
<form id="imagePageCaptionForm" method="post" action="savePageCaption.php">
<input type="hidden" name="action" value="save" />
<input type="hidden" name="page_content_id" id="page_content_id" value="<?php 
echo $_GET['page'];
?>
" />
<input type="hidden" name="image_id" id="image_id" value="<?php 
echo $_GET['image_id'];
?>
开发者ID:sherdog,项目名称:cvsi,代码行数:31,代码来源:editpageimage.php

示例15: dbQuery

                                        <td><input name="subscriber_zipcode" type="text" class="textField-title" id="subscriber_zipcode" value="<?=$sInfo['subscriber_zipcode']?>" style="width:300px;" /></td>
                                      </tr>
                                      <tr>
                                        <td><strong>Notes</strong></td>
                                        <td>
                                        <textarea name="subscriber_notes" id="subscriber_notes" style="width:300px;" class="textField-title"><?=output($sInfo['subscriber_notes'])?></textarea>
                                        </td>
                                      </tr>
                                      <tr>
                                     	<td valign="top" class=""><strong>Attach contact to list</strong></td>
                                        <td>
                                                <div class="selection">
                                                <ul>
                                                    <?php
                                                    $listResults = dbQuery('SELECT * FROM subscriber_lists ORDER BY subscriber_lists_name ASC');
                                                    while($lInfo = dbFetchArray($listResults)) {
                                                        echo "<li>";
														echo "<label><input type=\"checkbox\" name=\"lists[]\" id=\"list_".$lInfo['subscriber_lists_id']."\"";
                                                        if(is_array($contactLists)) {
                                                            if( in_array( $lInfo['subscriber_lists_id'], $contactLists)) echo " checked";
                                                        }
                                                        echo " value=\"".$lInfo['subscriber_lists_id']."\">".output($lInfo['subscriber_lists_name'])."</label></li>\n";
                                                    }	
                                                    ?>
                                                </ul>
                                                </div>
                                        	</td>
                                        </tr>
                                        </table>
                                     
                                      </td>
开发者ID:sherdog,项目名称:cvsi,代码行数:31,代码来源:communication.php


注:本文中的dbFetchArray函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。