本文整理汇总了PHP中pod_query函数的典型用法代码示例。如果您正苦于以下问题:PHP pod_query函数的具体用法?PHP pod_query怎么用?PHP pod_query使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pod_query函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: pods_nav_array
/**
* Build the navigation array
*
* @param string $uri (optional) The base URL
* @param int $depth (optional) The maximum recursion depth
* @since 1.2.0
*/
function pods_nav_array($uri = '<root>', $max_depth = 1)
{
$having = 0 < $max_depth ? "HAVING depth <= {$max_depth}" : '';
$sql = "\n SELECT\n node.id, node.uri, node.title, (COUNT(parent.title) - (sub_tree.depth + 1)) AS depth\n FROM\n @wp_pod_menu AS node,\n @wp_pod_menu AS parent,\n @wp_pod_menu AS sub_parent,\n (\n SELECT\n node.uri, (COUNT(parent.uri) - 1) AS depth\n FROM\n @wp_pod_menu AS node,\n @wp_pod_menu AS parent\n WHERE\n node.lft BETWEEN parent.lft AND parent.rgt AND\n node.uri = '{$uri}'\n GROUP BY\n node.uri\n ORDER BY\n node.lft\n ) AS sub_tree\n WHERE\n node.lft BETWEEN parent.lft AND parent.rgt AND\n node.lft BETWEEN sub_parent.lft AND sub_parent.rgt AND\n sub_parent.uri = sub_tree.uri\n GROUP BY\n node.uri\n {$having}\n ORDER BY\n node.weight, node.lft\n ";
$result = pod_query($sql);
if (0 < mysql_num_rows($result)) {
while ($row = mysql_fetch_assoc($result)) {
$menu[] = $row;
}
return $menu;
}
return false;
}
开发者ID:bidhanbaral,项目名称:fotodep_store,代码行数:20,代码来源:deprecated.php
示例2: pod_query
<?php
// Get all pages
$result = pod_query("SELECT id, uri FROM @wp_pod_pages ORDER BY uri");
while ($row = mysql_fetch_assoc($result)) {
$pages[$row['id']] = $row['uri'];
}
?>
<!-- Begin page area -->
<script type="text/javascript">
jQuery(function() {
jQuery(".select-page").change(function() {
page_id = jQuery(this).val();
if ("" == page_id) {
jQuery("#pageArea .stickynote").show();
jQuery("#pageContent").hide();
jQuery("#page_code").val("");
jQuery("#page_precode").val("");
}
else {
jQuery("#pageArea .stickynote").hide();
jQuery("#pageContent").show();
loadPage();
}
});
jQuery(".select-page").change();
jQuery("#pageBox").jqm();
});
function loadPage() {
jQuery.ajax({
开发者ID:bidhanbaral,项目名称:fotodep_store,代码行数:31,代码来源:manage_pages.php
示例3: elseif
$browse_disabled = true;
}
$upload_disabled = false;
if (defined('PODS_DISABLE_FILE_UPLOAD') && true === PODS_DISABLE_FILE_UPLOAD) {
$upload_disabled = true;
} elseif (defined('PODS_UPLOAD_REQUIRE_LOGIN') && is_bool(PODS_UPLOAD_REQUIRE_LOGIN) && true === PODS_UPLOAD_REQUIRE_LOGIN && !is_user_logged_in()) {
$upload_disabled = true;
} elseif (defined('PODS_UPLOAD_REQUIRE_LOGIN') && !is_bool(PODS_UPLOAD_REQUIRE_LOGIN) && (!is_user_logged_in() || !current_user_can(PODS_UPLOAD_REQUIRE_LOGIN))) {
$upload_disabled = true;
}
/**
* Load file list
*/
if ('browse_files' == $params->action && false === $browse_disabled) {
$search = 0 < strlen($params->search) ? "AND (post_title LIKE '%{$params->search}%' OR guid LIKE '%{$params->search}%')" : '';
$result = pod_query("SELECT id, guid FROM {$wpdb->posts} WHERE post_type = 'attachment' {$search} ORDER BY guid ASC");
if (0 < mysql_num_rows($result)) {
while ($row = mysql_fetch_assoc($result)) {
$guid = substr($row['guid'], strrpos($row['guid'], '/') + 1);
?>
<div class="file_match" rel="<?php
echo $row['id'];
?>
"><?php
echo $guid;
?>
</div>
<?php
}
} else {
echo 'Nothing found.';
开发者ID:bidhanbaral,项目名称:fotodep_store,代码行数:31,代码来源:misc.php
示例4: iif
$profile_data['subscription_plan'] = iif($a['payment_schedule'] == '1', 'Monthly', 'Yearly');
$profile_data['renewal_month'] = date("m", time());
$profile_data['renewal_day'] = date("d", time());
$profile_data['authorization_code'] = $authorization_code;
$profile_data['transaction_id'] = $transaction_id;
//$subscription_unit = 'months';
//$start_date = date("Y-m-d", strtotime("+ 1 year"));
// SCREW PODSCMS... just do a plain ole SQL update
$sql = "UPDATE wp_pod_tbl_vendor_profiles SET ";
$sql_fields = array();
foreach ($profile_data as $key => $val) {
$sql_fields[] .= "{$key}='{$val}'";
}
$sql .= implode(', ', $sql_fields);
$sql .= " WHERE vendor = {$active_user_id}";
pod_query($sql);
$success = true;
} else {
if ($payment->isDeclined()) {
// Get reason for the decline from the bank. This always says,
// "This credit card has been declined". Not very useful.
$reason = $payment->getResponseText();
$avs_result = $payment->getAVSResponse();
// not used at this time
$cvv_result = $payment->getCVVResponse();
// not used at this time
// Politely tell the customer their card was declined
// and to try a different form of payment.
$err[] = "There was an error processing this credit card. The response from the bank was: {$reason}";
//$err[] = "AVS Result: $avs_result";
//$err[] = "CVV Result: $cvv_result";
开发者ID:heathervreeland,项目名称:Occasions-Online-WP-Theme,代码行数:31,代码来源:upgrade.php
示例5: phpversion
<input type="button" class="button-primary" style="background:#f39400;border-color:#d56500;" onclick="pods_resetDB()" value=" Reset Pods " />
<hr />
<h3 style="padding-top:15px">Debug Information</h3>
<textarea>
WordPress <?php
global $wp_version;
echo $wp_version;
?>
PHP Version: <?php
echo phpversion();
?>
MySQL Version: <?php
echo mysql_result(pod_query("SELECT VERSION()"), 0);
?>
Server Software: <?php
echo $_SERVER['SERVER_SOFTWARE'];
?>
Your User Agent: <?php
echo $_SERVER['HTTP_USER_AGENT'];
?>
-- Currently Active Plugins --
<?php
$all_plugins = get_plugins();
foreach ($all_plugins as $plugin_file => $plugin_data) {
开发者ID:bidhanbaral,项目名称:fotodep_store,代码行数:31,代码来源:manage_settings.php
示例6: header
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
// use the Content-Disposition header to supply a recommended filename and
// force the browser to display the save dialog.
$dtmarker = date('Ymd');
header("Content-Disposition: attachment; filename=occasions_leads_{$dtmarker}.csv;");
/*
The Content-transfer-encoding header should be binary, since the file will be read
directly from the disk and the raw bytes passed to the downloading computer.
The Content-length header is useful to set for downloads. The browser will be able to
show a progress meter as a file downloads. The content-lenght can be determines by
filesize function returns the size of a file.
*/
header("Content-Transfer-Encoding: binary");
//header("Content-Length: ".strlen($csv_data));
$result = pod_query("SELECT name AS Name, email AS Email, address AS Address, city AS City, state AS State, zipcode AS Zipcode, phone AS Phone, DATE_FORMAT(event_date,'%Y/%m/%d') AS EventDate, interests AS Interests, interest_weddings AS InterestedInWeddings, interest_social AS InterestedInSocial, interest_corporate AS InterestedInCorporate, interest_mitzvahs AS InterestedInMitzvahs, interest_parties AS InterestedInParties, notes AS Notes, inquire_date AS DateOfInquiry FROM wp_pod_tbl_user_profiles WHERE event_date = '0000-00-00 00:00:00' OR event_date >= NOW() ORDER BY id");
$out = fopen('php://output', 'w');
// get our field information
$i = 0;
$aFields = array();
while ($i < mysql_num_fields($result)) {
$meta = mysql_fetch_field($result, $i);
$aFields[] = $meta->name;
$i++;
}
// write our fields to the CSV file
write_csv($out, $aFields);
// write our rows to the CSV file
while ($row = mysql_fetch_assoc($result)) {
$field_data = array_values($row);
write_csv($out, $field_data);
开发者ID:heathervreeland,项目名称:Occasions-Online-WP-Theme,代码行数:31,代码来源:leads.php
示例7: Pod
// INITIALIZATION, so to speak
// *******************************************************************
// Basically, if we have a $pid, go ahead an get the data from the database, We might end up
// replacing that data with data the user is trying to save, but this will make sure we have
// all the images and related data.... a good baseline, so to speak
$profile = new Pod('vendor_profiles');
//$profile->findRecords( 'id', -1, "t.id = '$pid' and t.vendor = $active_user_id");
$profile->findRecords('id', -1, "t.vendor = {$active_user_id}");
$total = $profile->getTotalRows();
if ($total > 0) {
$profile->fetchRecord();
}
$title = 'Make a Payment';
$profile_name = $profile->get_field('name');
$pid = $profile->get_field('id');
$result = pod_query("SELECT full_name, user_contact, user_email FROM ao_vendors WHERE id='{$active_user_id}'");
$row = mysql_fetch_assoc($result);
$user_email = $row['user_email'];
$user_contact = $row['user_contact'];
$full_name = $row['full_name'];
// *******************************************************************
// IS THE USER TRYING TO DO THE UPGRADE???
// *******************************************************************
if ($_POST['submitted'] == "1") {
$success = false;
// pull everything off of $_POST into our $a array.
// we're specifically NOT using $_REQUEST here for a tiny bit of security.
foreach ($_POST as $key => $value) {
$a[$key] = htmlspecialchars(stripslashes($value));
}
if (floatval($a['pay_amount']) < 2) {
开发者ID:heathervreeland,项目名称:Occasions-Online-WP-Theme,代码行数:31,代码来源:payment.php
示例8: ob_start
<?php
ob_start();
require_once preg_replace("/wp-content.*/", "wp-load.php", __FILE__);
require_once preg_replace("/wp-content.*/", "/wp-admin/includes/admin.php", __FILE__);
require_once realpath(dirname(__FILE__) . '/init.php');
ob_end_clean();
if ((!isset($_POST['_wpnonce']) || !pods_access('manage_settings') || false === wp_verify_nonce($_POST['_wpnonce'], 'pods-uninstall')) && !defined('WP_UNINSTALL_PLUGIN')) {
die('Error: Access denied');
}
$result = pod_query("SHOW TABLES LIKE '@wp_pod%'");
if (0 < mysql_num_rows($result)) {
while ($row = mysql_fetch_array($result)) {
pod_query("DROP TABLE {$row[0]}");
}
}
pod_query("DELETE FROM @wp_options WHERE option_name LIKE 'pods_%'");
开发者ID:bidhanbaral,项目名称:fotodep_store,代码行数:17,代码来源:uninstall.php
示例9: delete_attachment
function delete_attachment($attachment_id)
{
$result = pod_query("SELECT id FROM @wp_pod_fields WHERE coltype = 'file'");
if (0 < mysql_num_rows($result)) {
while ($row = mysql_fetch_assoc($result)) {
$field_ids[] = $row['id'];
}
$field_ids = implode(',', $field_ids);
// Remove all references to the deleted attachment
do_action('pods_delete_attachment', $attachment_id, $field_ids);
pod_query("DELETE FROM @wp_pod_rel WHERE field_id IN ({$field_ids}) AND tbl_row_id = {$attachment_id}");
}
}
开发者ID:netinial,项目名称:pods,代码行数:13,代码来源:PodInit.php
示例10: pod_query
<?php
// Get all pages
$result = pod_query("SELECT id, name FROM @wp_pod_templates ORDER BY name");
while ($row = mysql_fetch_assoc($result)) {
$templates[$row['id']] = $row['name'];
}
?>
<!-- Begin template area -->
<script type="text/javascript">
jQuery(function() {
jQuery(".select-template").change(function() {
template_id = jQuery(this).val();
if ("" == template_id) {
jQuery("#templateArea .stickynote").show();
jQuery("#templateContent").hide();
jQuery("#template_code").val("");
}
else {
jQuery("#templateArea .stickynote").hide();
jQuery("#templateContent").show();
loadTemplate();
}
});
jQuery(".select-template").change();
jQuery("#templateBox").jqm();
});
function loadTemplate() {
jQuery.ajax({
type: "post",
开发者ID:natduffy,项目名称:gicinema,代码行数:31,代码来源:manage_templates.php
示例11: get_adminselector
function get_adminselector()
{
// this functon generates the HTML code to display the admin user select list which is used
// to allow admins to masquarade as other users.
?>
<form action="<?php
echo $_SERVER['REQUEST_URI'];
?>
" method="post" name="profileForm" id="profileForm" >
<p class="vendor_desc">You are logged in as...</p>
<?php
$ven = get_active_user_id();
$result = pod_query("SELECT id, full_name FROM ao_vendors ORDER BY full_name");
echo '<p class="vendor_txt"><select name="fake_user_id" id="fake_user_id" class="vendor_select">';
echo '<option value="0"';
if ($ven == "0") {
echo ' selected';
}
echo '><none></option>';
while ($row = mysql_fetch_assoc($result)) {
echo '<option value="', $row['id'], '"';
if ($ven == $row['id']) {
echo ' selected';
}
echo '>', $row['full_name'], '</option>';
}
echo '</select> <input name="doSave" type="submit" id="admin_selector_submit" value="Change" /></p>';
echo '</form>';
}
开发者ID:heathervreeland,项目名称:Occasions-Online-WP-Theme,代码行数:29,代码来源:dbc.php
示例12: pod_query
$chart->setTitle("Site-wide Click-thru Activity");
$result = pod_query($sql_click_ALL);
while ($row = mysql_fetch_assoc($result)) {
$chart_points[substr($row['MN'], 0, 3) . ' ' . $row['Y']] = $row['C'];
}
foreach ($source_points as $key => $val) {
$dataSet->addPoint(new Point($key, $chart_points[$key]));
}
$chart->setDataSet($dataSet);
// make sure our directory exists
$chart->render("{$img_dst_logo}/chart_click_ALL.png");
$chart_points = $source_points;
$chart = new VerticalBarChart(570, 300);
$dataSet = new XYDataSet();
$chart->setTitle("Site-wide Profile Views");
$result = pod_query($sql_profile_view_ALL);
while ($row = mysql_fetch_assoc($result)) {
$chart_points[substr($row['MN'], 0, 3) . ' ' . $row['Y']] = $row['C'];
}
foreach ($source_points as $key => $val) {
$dataSet->addPoint(new Point($key, $chart_points[$key]));
}
$chart->setDataSet($dataSet);
// make sure our directory exists
$chart->render("{$img_dst_logo}/chart_profile_view_ALL.png");
$chart_points = $source_points;
}
?>
<p><img src="<?php
echo "{$img_web_logo}/{$pid}/chart_activity.png";
开发者ID:heathervreeland,项目名称:Occasions-Online-WP-Theme,代码行数:31,代码来源:profile.php
示例13: pod_query
?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<tr class="coltype-pick">
<td>Related to</td>
<td>
<select id="column_pickval" onchange="sisterFields()">
<option value="" style="font-weight:bold; font-style:italic" class="pod-selection">-- Pod --</option>
<?php
// Get all pod names
$result = pod_query("SELECT name FROM @wp_pod_types ORDER BY name");
while ($row = mysql_fetch_array($result)) {
?>
<option value="<?php
echo $row['name'];
?>
" class="pod-selection"><?php
echo $row['name'];
?>
</option>
<?php
}
?>
<option value="" style="font-weight:bold; font-style:italic">-- WordPress --</option>
<option value="wp_taxonomy">WP Taxonomy</option>
<option value="wp_page">WP Page</option>
开发者ID:natduffy,项目名称:gicinema,代码行数:31,代码来源:manage_pods.php
示例14: esc_attr
">
<input type="hidden" name="type" value="<?php
echo esc_attr($datatype);
?>
" />
<?php
if (empty($filters)) {
$result = pod_query("SELECT list_filters FROM @wp_pod_types WHERE id = {$datatype_id} LIMIT 1");
$row = mysql_fetch_assoc($result);
$filters = $row['list_filters'];
}
if (!empty($filters)) {
$filters = explode(',', $filters);
foreach ($filters as $key => $val) {
$field_name = trim($val);
$result = pod_query("SELECT label, pickval, coltype FROM @wp_pod_fields WHERE datatype = {$datatype_id} AND name = '{$field_name}' LIMIT 1");
$row = mysql_fetch_assoc($result);
if ('pick' == $row['coltype'] && !empty($row['pickval'])) {
$pick_params = array('table' => $row['pickval'], 'field_name' => $field_name, 'unique_vals' => false);
$field_data = $this->get_dropdown_values($pick_params);
$field_label = ucwords(str_replace('_', ' ', $field_name));
if (0 < strlen($row['label'])) {
$field_label = $row['label'];
}
?>
<select name="<?php
echo esc_attr($field_name);
?>
" id="filter_<?php
echo esc_attr($field_name);
?>
开发者ID:bidhanbaral,项目名称:fotodep_store,代码行数:31,代码来源:list_filters.php
示例15: do_action
<?php
// Plugin hook
do_action('pods_manage_content');
if (false === apply_filters('pods_manage_content', true)) {
return;
}
// Get all pod types
$result = pod_query("SELECT id, name FROM @wp_pod_types ORDER BY name ASC");
while ($row = mysql_fetch_assoc($result)) {
$datatypes[$row['id']] = $row['name'];
}
// Figure out which tab to display
$manage_action = 'manage';
$wp_page = pods_var('page', 'get');
$dtname = pods_var('pod', 'get');
if ('pods-manage-' == substr($wp_page, 0, 12)) {
$manage_action = 'top-level-manage';
$dtname = substr($wp_page, 12);
if (isset($_GET['action']) && ('add' == $_GET['action'] || 'duplicate' == $_GET['action'])) {
?>
<script type="text/javascript">
document.location = "<?php
echo pods_ui_var_update(array('page' => 'pods-add-' . $dtname, 'action' => $_GET['action'], 'id' => 'duplicate' == $_GET['action'] && isset($_GET['id']) ? absint($_GET['id']) : ''));
?>
";
</script>
<?php
die;
}
} elseif ('pods-add-' == substr($wp_page, 0, 9)) {
开发者ID:natduffy,项目名称:gicinema,代码行数:31,代码来源:manage_content.php
示例16: showform
/**
* Display HTML for all datatype fields
*/
function showform($pod_id = null, $public_columns = null, $label = 'Save changes')
{
if (empty($this->datatype_id)) {
echo "<e>Error: Pod name invalid</e>";
return null;
}
$pod_id = absint($pod_id);
$cache = PodCache::instance();
$datatype = $this->datatype;
$datatype_id = (int) $this->datatype_id;
$this->data['pod_id'] = $pod_id = (int) $pod_id;
$where = '';
if (!empty($public_columns)) {
foreach ($public_columns as $key => $val) {
if (is_array($public_columns[$key])) {
$where[] = $key;
$attributes[$key] = $val;
} else {
$where[] = $val;
$attributes[$val] = array();
}
}
$where = "AND name IN ('" . implode("','", $where) . "')";
}
$result = pod_query("SELECT * FROM @wp_pod_fields WHERE datatype = {$datatype_id} {$where} ORDER BY weight ASC");
$public_columns = array();
while ($row = mysql_fetch_assoc($result)) {
$fields[$row['name']] = $row;
$public_columns[] = $row['name'];
}
// Re-order the fields if a public form
if (!empty($attributes)) {
$tmp = $fields;
$fields = array();
foreach ($attributes as $key => $val) {
if (isset($tmp[$key])) {
$fields[$key] = $tmp[$key];
}
}
unset($tmp);
}
// Edit an existing item
if (!empty($pod_id)) {
$sql = "\n SELECT\n `t`.*\n FROM\n @wp_pod `p`\n INNER JOIN\n `@wp_pod_tbl_{$datatype}` AS `t` ON `t`.`id` = `p`.`tbl_row_id`\n WHERE\n `p`.`id` = {$pod_id}\n LIMIT\n 1\n ";
$result = pod_query($sql);
if (0 < mysql_num_rows($result)) {
$tbl_cols = mysql_fetch_assoc($result);
}
}
$uri_hash = wp_hash($_SERVER['REQUEST_URI']);
do_action('pods_showform_pre', $pod_id, $public_columns, $label, $this);
foreach ($fields as $key => $field) {
// Replace field attributes with public form attributes
if (!empty($attributes) && is_array($attributes[$key])) {
$field = array_merge($field, $attributes[$key]);
}
if (empty($field['label'])) {
$field['label'] = ucwords($key);
}
if (1 == $field['required']) {
$field['label'] .= ' <span class="red">*</span>';
}
if (!empty($field['pickval'])) {
$val = array();
$tbl_row_ids = array();
$table = $field['pickval'];
$result = pod_query("SELECT `id` FROM `@wp_pod_fields` WHERE `datatype` = {$datatype_id} AND `name` = '{$key}' LIMIT 1");
$field_id = (int) mysql_result($result, 0);
$result = pod_query("SELECT `tbl_row_id` FROM `@wp_pod_rel` WHERE `field_id` = {$field_id} AND `pod_id` = {$pod_id}");
while ($row = mysql_fetch_assoc($result)) {
$tbl_row_ids[] = (int) $row['tbl_row_id'];
}
// Use default values for public forms
if (empty($tbl_row_ids) && !empty($field['default'])) {
$tbl_row_ids = $field['default'];
if (!is_array($field['default'])) {
$tbl_row_ids = explode(',', $tbl_row_ids);
foreach ($tbl_row_ids as $row_key => $row_val) {
$tbl_row_ids[$row_key] = (int) trim($row_val);
}
}
}
// If the PICK column is unique, get values already chosen
$unique_vals = false;
if (1 == $field['unique']) {
$exclude = empty($pod_id) ? '' : "AND `pod_id` != {$pod_id}";
$result = pod_query("SELECT `tbl_row_id` FROM `@wp_pod_rel` WHERE `field_id` = {$field_id} {$exclude}");
if (0 < mysql_num_rows($result)) {
$unique_vals = array();
while ($row = mysql_fetch_assoc($result)) {
$unique_vals[] = (int) $row['tbl_row_id'];
}
$unique_vals = implode(',', $unique_vals);
}
}
$params = array('table' => $table, 'field_name' => null, 'tbl_row_ids' => $tbl_row_ids, 'unique_vals' => $unique_vals, 'pick_filter' => $field['pick_filter'], 'pick_orderby' => $field['pick_orderby']);
$this->data[$key] = $this->get_dropdown_values($params);
//.........这里部分代码省略.........
开发者ID:bidhanbaral,项目名称:fotodep_store,代码行数:101,代码来源:Pod.php
示例17: oo_get_distribution_map
function oo_get_distribution_map()
{
$result = pod_query("SELECT * FROM ao_dist_locations");
while ($row = mysql_fetch_assoc($result)) {
$row['dist_location'] = htmlentities($row['dist_location'], ENT_QUOTES);
$row['dist_address1'] = htmlentities($row['dist_address1'], ENT_QUOTES);
$row['dist_address2'] = htmlentities($row['dist_address2'], ENT_QUOTES);
$map_items[$row['dist_id']] = $row;
}
ob_start();
show_distributionmap($map_items, -1, 6, true, false);
return ob_get_clean();
}
开发者ID:heathervreeland,项目名称:Occasions-Online-WP-Theme,代码行数:13,代码来源:functions.php
示例18: header
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
// use the Content-Disposition header to supply a recommended filename and
// force the browser to display the save dialog.
$dtmarker = date('Ymd');
header("Content-Disposition: attachment; filename=occasions_subscriptions_{$dtmarker}.csv;");
/*
The Content-transfer-encoding header should be binary, since the file will be read
directly from the disk and the raw bytes passed to the downloading computer.
The Content-length header is useful to set for downloads. The browser will be able to
show a progress meter as a file downloads. The content-lenght can be determines by
filesize function returns the size of a file.
*/
header("Content-Transfer-Encoding: binary");
//header("Content-Length: ".strlen($csv_data));
$result = pod_query("SELECT subscription_id, subscription_stamp, subscription_name, subscription_total, subscription_descriptions, subscription_cart, subscription_transaction FROM ao_subscriptions ORDER BY subscription_stamp");
$out = fopen('php://output', 'w');
// get our field information
//$i = 0;
//$aFields = array();
//while ($i < mysql_num_fields($result)) {
// $meta = mysql_fetch_field($result, $i);
// $aFields[] = $meta->name;
// $i++;
//}
$aFields[] = 'SubscriberID';
$aFields[] = 'Date';
$aFields[] = 'Name';
$aFields[] = 'Address';
$aFields[] = 'City';
$aFields[] = 'State';
开发者ID:heathervreeland,项目名称:Occasions-Online-WP-Theme,代码行数:31,代码来源:subscribers.php
示例19: pods_version_notice_mysql
function pods_version_notice_mysql()
{
?>
<div class="error fade">
<p><strong>NOTICE:</strong> Pods <?php
echo PODS_VERSION_FULL;
?>
requires a minimum of <strong>MySQL <?php
echo PODS_MYSQL_VERSION_MINIMUM;
?>
+</strong> to function. You are currently running <strong>MySQL <?php
echo @mysql_result(pod_query("SELECT VERSION()"), 0);
?>
</strong> - Please upgrade (or have your Hosting Provider upgrade it for you) your MySQL version to continue.</p>
</div>
<?php
}
开发者ID:natduffy,项目名称:gicinema,代码行数:17,代码来源:functions.php
示例20: date
$comment_data['rating'] = $rdo_rating;
$comment_data['comment'] = $txt_comments;
$comment_data['comment_date'] = date("Y-m-d H:i:s");
$comment_data['hide'] = 0;
// safety cleansing
pods_sanitize($comment_data);
$params = array('datatype' => 'comments', 'columns' => $comment_data);
// create the item
$api->save_pod_item($params);
// set these to NULL so the fields will not be pre-filled below.
$txt_name = NULL;
$txt_email = NULL;
$txt_comments = NULL;
$rdo_rating = NULL;
// now recalc the average rating...
pod_query("UPDATE wp_pod_tbl_vendor_profiles SET rating = (SELECT AVG(rating) FROM wp_pod_tbl_comments WHERE vendor='" . $a['id'] . "' AND hide=0) WHERE id = " . $a['id']);
$err[] = "Your review has been submitted.";
}
}
get_header();
$s = <<<HEREDOC
<div class="post">
<div class="oo-sidebar-zone" id="pro_details">
<!-- <div id="pro_image"><img src="{$a['imag']}" /></div> -->
HEREDOC;
$travelpolicy = '';
if (!in_array($a['trav'], array('NA', ''))) {
$travelpolicy .= '</p><p>** Will Travel ' . $a['trav'] . '';
}
if ($a['showadd'] == '1' || $travelpolicy != '') {
$s .= '<div class="head3 oo-color-brown centered">Address</div><p>';
开发者ID:heathervreeland,项目名称:Occasions-Online-WP-Theme,代码行数:31,代码来源:profile.20110707.php
注:本文中的pod_query函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论