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


PHP pod_query函数代码示例

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


在下文中一共展示了pod_query函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 '>&lt;none&gt;</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>&nbsp;&nbsp;&nbsp;<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


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