本文整理汇总了PHP中del_pconfig函数的典型用法代码示例。如果您正苦于以下问题:PHP del_pconfig函数的具体用法?PHP del_pconfig怎么用?PHP del_pconfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了del_pconfig函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ifttt_settings_post
function ifttt_settings_post(&$a, &$b)
{
if (x($_POST, 'ifttt-submit')) {
if (isset($_POST['ifttt-rekey'])) {
del_pconfig(local_user(), 'ifttt', 'key');
}
}
}
示例2: widgets_settings_post
function widgets_settings_post()
{
if (!local_user()) {
return;
}
if (isset($_POST['widgets-submit'])) {
del_pconfig(local_user(), 'widgets', 'key');
}
}
示例3: ostatus_subscribe_content
function ostatus_subscribe_content(&$a)
{
if (!local_user()) {
notice(t('Permission denied.') . EOL);
goaway($_SESSION['return_url']);
// NOTREACHED
}
$o = "<h2>" . t("Subsribing to OStatus contacts") . "</h2>";
$uid = local_user();
$a = get_app();
$counter = intval($_REQUEST['counter']);
if (get_pconfig($uid, "ostatus", "legacy_friends") == "") {
if ($_REQUEST["url"] == "") {
return $o . t("No contact provided.");
}
$contact = probe_url($_REQUEST["url"]);
if (!$contact) {
return $o . t("Couldn't fetch information for contact.");
}
$api = $contact["baseurl"] . "/api/";
// Fetching friends
$data = z_fetch_url($api . "statuses/friends.json?screen_name=" . $contact["nick"]);
if (!$data["success"]) {
return $o . t("Couldn't fetch friends for contact.");
}
set_pconfig($uid, "ostatus", "legacy_friends", $data["body"]);
}
$friends = json_decode(get_pconfig($uid, "ostatus", "legacy_friends"));
$total = sizeof($friends);
if ($counter >= $total) {
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL=' . $a->get_baseurl() . '/settings/connectors">';
del_pconfig($uid, "ostatus", "legacy_friends");
del_pconfig($uid, "ostatus", "legacy_contact");
$o .= t("Done");
return $o;
}
$friend = $friends[$counter++];
$url = $friend->statusnet_profile_url;
$o .= "<p>" . $counter . "/" . $total . ": " . $url;
$data = probe_url($url);
if ($data["network"] == NETWORK_OSTATUS) {
$result = new_contact($uid, $url, true);
if ($result["success"]) {
$o .= " - " . t("success");
} else {
$o .= " - " . t("failed");
}
} else {
$o .= " - " . t("ignored");
}
$o .= "</p>";
$o .= "<p>" . t("Keep this window open until done.") . "</p>";
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL=' . $a->get_baseurl() . '/ostatus_subscribe?counter=' . $counter . '">';
return $o;
}
示例4: fromgplus_addon_settings_post
function fromgplus_addon_settings_post(&$a, &$b)
{
if (!local_user()) {
return;
}
if ($_POST['fromgplus-submit']) {
set_pconfig(local_user(), 'fromgplus', 'account', trim($_POST['fromgplus-account']));
$enable = x($_POST, 'fromgplus-enable') ? intval($_POST['fromgplus-enable']) : 0;
set_pconfig(local_user(), 'fromgplus', 'enable', $enable);
if (!$enable) {
del_pconfig(local_user(), 'fromgplus', 'lastdate');
}
info(t('Google+ Import Settings saved.') . EOL);
}
}
示例5: pdledit_post
function pdledit_post(&$a)
{
if (!local_user()) {
return;
}
if (!$_REQUEST['module']) {
return;
}
if (!trim($_REQUEST['content'])) {
del_pconfig(local_user(), 'system', 'mod_' . $_REQUEST['module'] . '.pdl');
goaway(z_root() . '/pdledit/' . $_REQUEST['module']);
}
set_pconfig(local_user(), 'system', 'mod_' . $_REQUEST['module'] . '.pdl', escape_tags($_REQUEST['content']));
info(t('Layout updated.') . EOL);
goaway(z_root() . '/pdledit/' . $_REQUEST['module']);
}
示例6: post
function post()
{
if (!local_channel()) {
return;
}
if (!$_REQUEST['module']) {
return;
}
if (!feature_enabled(local_channel(), 'advanced_theming')) {
return;
}
if (!trim($_REQUEST['content'])) {
del_pconfig(local_channel(), 'system', 'mod_' . $_REQUEST['module'] . '.pdl');
goaway(z_root() . '/pdledit/' . $_REQUEST['module']);
}
set_pconfig(local_channel(), 'system', 'mod_' . $_REQUEST['module'] . '.pdl', escape_tags($_REQUEST['content']));
build_sync_packet();
info(t('Layout updated.') . EOL);
goaway(z_root() . '/pdledit/' . $_REQUEST['module']);
}
示例7: fbpost_content
/**
* @param App $a
* @return string
*/
function fbpost_content(&$a)
{
if (!local_user()) {
notice(t('Permission denied.') . EOL);
return '';
}
if (!service_class_allows(local_user(), 'facebook_connect')) {
notice(t('Permission denied.') . EOL);
return upgrade_bool_message();
}
if ($a->argc > 1 && $a->argv[1] === 'remove') {
del_pconfig(local_user(), 'facebook', 'post');
info(t('Facebook Post disabled') . EOL);
}
require_once "mod/settings.php";
settings_init($a);
$o = '';
$accounts = array();
$fb_installed = false;
if (get_pconfig(local_user(), 'facebook', 'post')) {
$access_token = get_pconfig(local_user(), 'facebook', 'access_token');
if ($access_token) {
// fetching the list of accounts to check, if facebook is working
// The value is needed several lines below.
$url = 'https://graph.facebook.com/me/accounts';
$s = fetch_url($url . "?access_token=" . $access_token, false, $redirects, 10);
if ($s) {
$accounts = json_decode($s);
if (isset($accounts->data)) {
$fb_installed = true;
}
}
// I'm not totally sure, if this above will work in every situation,
// So this old code will be called as well.
if (!$fb_installed) {
$url = "https://graph.facebook.com/me/feed";
$s = fetch_url($url . "?access_token=" . $access_token . "&limit=1", false, $redirects, 10);
if ($s) {
$j = json_decode($s);
if (isset($j->data)) {
$fb_installed = true;
}
}
}
}
}
$appid = get_config('facebook', 'appid');
if (!$appid) {
notice(t('Facebook API key is missing.') . EOL);
return '';
}
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/fbpost/fbpost.css' . '" media="all" />' . "\r\n";
$result = q("SELECT `installed` FROM `addon` WHERE `name` = 'fbsync' AND `installed`");
$fbsync = count($result) > 0;
if ($fbsync) {
$title = t('Facebook Import/Export/Mirror');
} else {
$title = t('Facebook Export/Mirror');
}
$o .= '<img class="connector" src="images/facebook.png" /><h3 class="connector">' . $title . '</h3>';
if (!$fb_installed) {
$o .= '<div id="fbpost-enable-wrapper">';
//read_stream,publish_stream,manage_pages,photo_upload,user_groups,offline_access
//export_stream,read_stream,publish_stream,manage_pages,photo_upload,user_groups,publish_actions,user_friends,share_item,video_upload,status_update
$o .= '<a href="https://www.facebook.com/dialog/oauth?client_id=' . $appid . '&redirect_uri=' . $a->get_baseurl() . '/fbpost/' . $a->user['nickname'] . '&scope=publish_actions,publish_pages,user_posts,user_photos,user_status,user_videos,manage_pages,user_managed_groups">' . t('Install Facebook Post connector for this account.') . '</a>';
$o .= '</div>';
}
if ($fb_installed) {
$o .= '<div id="fbpost-disable-wrapper">';
$o .= '<a href="' . $a->get_baseurl() . '/fbpost/remove' . '">' . t('Remove Facebook Post connector') . '</a></div>';
$o .= '<div id="fbpost-enable-wrapper">';
//export_stream,read_stream,publish_stream,manage_pages,photo_upload,user_groups,publish_actions,user_friends,share_item,video_upload,status_update
$o .= '<a href="https://www.facebook.com/dialog/oauth?client_id=' . $appid . '&redirect_uri=' . $a->get_baseurl() . '/fbpost/' . $a->user['nickname'] . '&scope=publish_actions,publish_pages,user_posts,user_photos,user_status,user_videos,manage_pages,user_managed_groups">' . t('Re-authenticate [This is necessary whenever your Facebook password is changed.]') . '</a>';
$o .= '</div>';
$o .= '<div id="fbpost-post-default-form">';
$o .= '<form action="fbpost" method="post" >';
$post_by_default = get_pconfig(local_user(), 'facebook', 'post_by_default');
$checked = $post_by_default ? ' checked="checked" ' : '';
$o .= '<input type="checkbox" name="post_by_default" value="1"' . $checked . '/>' . ' ' . t('Post to Facebook by default') . EOL;
$suppress_view_on_friendica = get_pconfig(local_user(), 'facebook', 'suppress_view_on_friendica');
$checked = $suppress_view_on_friendica ? ' checked="checked" ' : '';
$o .= '<input type="checkbox" name="suppress_view_on_friendica" value="1"' . $checked . '/>' . ' ' . t('Suppress "View on friendica"') . EOL;
$mirror_posts = get_pconfig(local_user(), 'facebook', 'mirror_posts');
$checked = $mirror_posts ? ' checked="checked" ' : '';
$o .= '<input type="checkbox" name="mirror_posts" value="1"' . $checked . '/>' . ' ' . t('Mirror wall posts from facebook to friendica.') . EOL;
// List all pages
$post_to_page = get_pconfig(local_user(), 'facebook', 'post_to_page');
$page_access_token = get_pconfig(local_user(), 'facebook', 'page_access_token');
$fb_token = get_pconfig($a->user['uid'], 'facebook', 'access_token');
//$url = 'https://graph.facebook.com/me/accounts';
//$x = fetch_url($url."?access_token=".$fb_token, false, $redirects, 10);
//$accounts = json_decode($x);
$o .= t("Post to page/group:") . "<select name='post_to_page'>";
if (intval($post_to_page) == 0) {
$o .= "<option value='0-0' selected>" . t('None') . "</option>";
} else {
//.........这里部分代码省略.........
示例8: pumpio_settings_post
function pumpio_settings_post(&$a, &$b)
{
if (x($_POST, 'pumpio-submit')) {
if (x($_POST, 'pumpio_delete')) {
set_pconfig(local_user(), 'pumpio', 'consumer_key', '');
set_pconfig(local_user(), 'pumpio', 'consumer_secret', '');
set_pconfig(local_user(), 'pumpio', 'oauth_token', '');
set_pconfig(local_user(), 'pumpio', 'oauth_token_secret', '');
set_pconfig(local_user(), 'pumpio', 'post', false);
set_pconfig(local_user(), 'pumpio', 'import', false);
set_pconfig(local_user(), 'pumpio', 'host', '');
set_pconfig(local_user(), 'pumpio', 'user', '');
set_pconfig(local_user(), 'pumpio', 'public', false);
set_pconfig(local_user(), 'pumpio', 'mirror', false);
set_pconfig(local_user(), 'pumpio', 'post_by_default', false);
set_pconfig(local_user(), 'pumpio', 'lastdate', 0);
set_pconfig(local_user(), 'pumpio', 'last_id', '');
} else {
// filtering the username if it is filled wrong
$user = $_POST['pumpio_user'];
if (strstr($user, "@")) {
$pos = strpos($user, "@");
if ($pos > 0) {
$user = substr($user, 0, $pos);
}
}
// Filtering the hostname if someone is entering it with "http"
$host = $_POST['pumpio_host'];
$host = trim($host);
$host = str_replace(array("https://", "http://"), array("", ""), $host);
set_pconfig(local_user(), 'pumpio', 'post', intval($_POST['pumpio']));
set_pconfig(local_user(), 'pumpio', 'import', $_POST['pumpio_import']);
set_pconfig(local_user(), 'pumpio', 'host', $host);
set_pconfig(local_user(), 'pumpio', 'user', $user);
set_pconfig(local_user(), 'pumpio', 'public', $_POST['pumpio_public']);
set_pconfig(local_user(), 'pumpio', 'mirror', $_POST['pumpio_mirror']);
set_pconfig(local_user(), 'pumpio', 'post_by_default', intval($_POST['pumpio_bydefault']));
if (!$_POST['pumpio_mirror']) {
del_pconfig(local_user(), 'pumpio', 'lastdate');
}
//header("Location: ".$a->get_baseurl()."/pumpio/connect");
}
}
}
示例9: twitter_settings_post
function twitter_settings_post($a, $post)
{
if (!local_channel()) {
return;
}
// don't check twitter settings if twitter submit button is not clicked
if (!x($_POST, 'twitter-submit')) {
return;
}
if (isset($_POST['twitter-disconnect'])) {
/***
* if the twitter-disconnect checkbox is set, clear the OAuth key/secret pair
* from the user configuration
*/
del_pconfig(local_channel(), 'twitter', 'consumerkey');
del_pconfig(local_channel(), 'twitter', 'consumersecret');
del_pconfig(local_channel(), 'twitter', 'oauthtoken');
del_pconfig(local_channel(), 'twitter', 'oauthsecret');
del_pconfig(local_channel(), 'twitter', 'post');
del_pconfig(local_channel(), 'twitter', 'post_by_default');
del_pconfig(local_channel(), 'twitter', 'post_taglinks');
del_pconfig(local_channel(), 'twitter', 'lastid');
del_pconfig(local_channel(), 'twitter', 'intelligent_shortening');
del_pconfig(local_channel(), 'twitter', 'own_id');
} else {
if (isset($_POST['twitter-pin'])) {
// if the user supplied us with a PIN from Twitter, let the magic of OAuth happen
logger('got a Twitter PIN');
require_once 'library/twitteroauth.php';
$ckey = get_config('twitter', 'consumerkey');
$csecret = get_config('twitter', 'consumersecret');
// the token and secret for which the PIN was generated were hidden in the settings
// form as token and token2, we need a new connection to Twitter using these token
// and secret to request a Access Token with the PIN
$connection = new TwitterOAuth($ckey, $csecret, $_POST['twitter-token'], $_POST['twitter-token2']);
$token = $connection->getAccessToken($_POST['twitter-pin']);
// ok, now that we have the Access Token, save them in the user config
set_pconfig(local_channel(), 'twitter', 'oauthtoken', $token['oauth_token']);
set_pconfig(local_channel(), 'twitter', 'oauthsecret', $token['oauth_token_secret']);
set_pconfig(local_channel(), 'twitter', 'post', 1);
set_pconfig(local_channel(), 'twitter', 'post_taglinks', 1);
// reload the Addon Settings page, if we don't do it see Friendica Bug #42
goaway($a->get_baseurl() . '/settings/featured');
} else {
// if no PIN is supplied in the POST variables, the user has changed the setting
// to post a tweet for every new __public__ posting to the wall
set_pconfig(local_channel(), 'twitter', 'post', intval($_POST['twitter-enable']));
set_pconfig(local_channel(), 'twitter', 'post_by_default', intval($_POST['twitter-default']));
set_pconfig(local_channel(), 'twitter', 'post_taglinks', intval($_POST['twitter-sendtaglinks']));
set_pconfig(local_channel(), 'twitter', 'mirror_posts', intval($_POST['twitter-mirror']));
set_pconfig(local_channel(), 'twitter', 'intelligent_shortening', intval($_POST['twitter-shortening']));
set_pconfig(local_channel(), 'twitter', 'import', intval($_POST['twitter-import']));
set_pconfig(local_channel(), 'twitter', 'create_user', intval($_POST['twitter-create_user']));
info(t('Twitter settings updated.') . EOL);
}
}
}
示例10: appnet_settings_post
function appnet_settings_post(&$a, &$b)
{
if (x($_POST, 'appnet-submit')) {
if (isset($_POST['appnet-disconnect'])) {
del_pconfig(local_user(), 'appnet', 'clientsecret');
del_pconfig(local_user(), 'appnet', 'clientid');
del_pconfig(local_user(), 'appnet', 'token');
del_pconfig(local_user(), 'appnet', 'post');
del_pconfig(local_user(), 'appnet', 'post_by_default');
del_pconfig(local_user(), 'appnet', 'import');
}
if (isset($_POST["clientsecret"])) {
set_pconfig(local_user(), 'appnet', 'clientsecret', $_POST['clientsecret']);
}
if (isset($_POST["clientid"])) {
set_pconfig(local_user(), 'appnet', 'clientid', $_POST['clientid']);
}
if (isset($_POST["token"]) and $_POST["token"] != "") {
set_pconfig(local_user(), 'appnet', 'token', $_POST['token']);
}
set_pconfig(local_user(), 'appnet', 'post', intval($_POST['appnet']));
set_pconfig(local_user(), 'appnet', 'post_by_default', intval($_POST['appnet_bydefault']));
set_pconfig(local_user(), 'appnet', 'import', intval($_POST['appnet_import']));
}
}
示例11: twitter_fetch_own_contact
function twitter_fetch_own_contact($a, $uid)
{
$ckey = get_config('twitter', 'consumerkey');
$csecret = get_config('twitter', 'consumersecret');
$otoken = get_pconfig($uid, 'twitter', 'oauthtoken');
$osecret = get_pconfig($uid, 'twitter', 'oauthsecret');
$own_id = get_pconfig($uid, 'twitter', 'own_id');
$contact_id = 0;
if ($own_id == "") {
require_once 'library/twitteroauth.php';
$connection = new TwitterOAuth($ckey, $csecret, $otoken, $osecret);
// Fetching user data
$user = $connection->get('account/verify_credentials');
set_pconfig($uid, 'twitter', 'own_id', $user->id_str);
$contact_id = twitter_fetch_contact($uid, $user, true);
} else {
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `alias` = '%s' LIMIT 1", intval($uid), dbesc("twitter::" . $own_id));
if (count($r)) {
$contact_id = $r[0]["id"];
} else {
del_pconfig($uid, 'twitter', 'own_id');
}
}
return $contact_id;
}
示例12: update_1190
function update_1190()
{
require_once 'include/plugin.php';
set_config('system', 'maintenance', 1);
if (plugin_enabled('forumlist')) {
$plugin = 'forumlist';
$plugins = get_config('system', 'addon');
$plugins_arr = array();
if ($plugins) {
$plugins_arr = explode(",", str_replace(" ", "", $plugins));
$idx = array_search($plugin, $plugins_arr);
if ($idx !== false) {
unset($plugins_arr[$idx]);
//delete forumlist manually from addon and hook table
// since uninstall_plugin() don't work here
q("DELETE FROM `addon` WHERE `name` = 'forumlist' ");
q("DELETE FROM `hook` WHERE `file` = 'addon/forumlist/forumlist.php' ");
set_config('system', 'addon', implode(", ", $plugins_arr));
}
}
}
// select old formlist addon entries
$r = q("SELECT `uid`, `cat`, `k`, `v` FROM `pconfig` WHERE `cat` = '%s' ", dbesc('forumlist'));
// convert old forumlist addon entries in new config entries
if (count($r)) {
foreach ($r as $rr) {
$uid = $rr['uid'];
$family = $rr['cat'];
$key = $rr['k'];
$value = $rr['v'];
if ($key === 'randomise') {
del_pconfig($uid, $family, $key);
}
if ($key === 'show_on_profile') {
if ($value) {
set_pconfig($uid, feature, forumlist_profile, $value);
}
del_pconfig($uid, $family, $key);
}
if ($key === 'show_on_network') {
if ($value) {
set_pconfig($uid, feature, forumlist_widget, $value);
}
del_pconfig($uid, $family, $key);
}
}
}
set_config('system', 'maintenance', 0);
return UPDATE_SUCCESS;
}
示例13: delAssoc
function delAssoc($handle)
{
logger('delAssoc');
$channel = channelx_by_nick(basename($handle));
if ($channel) {
return del_pconfig($channel['channel_id'], 'openid', 'associate');
}
}
示例14: settings_post
function settings_post(&$a)
{
if (!local_channel()) {
return;
}
if ($_SESSION['delegate']) {
return;
}
$channel = $a->get_channel();
logger('mod_settings: ' . print_r($_REQUEST, true));
if (argc() > 1 && argv(1) === 'oauth' && x($_POST, 'remove')) {
check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth');
$key = $_POST['remove'];
q("DELETE FROM tokens WHERE id='%s' AND uid=%d", dbesc($key), local_channel());
goaway($a->get_baseurl(true) . "/settings/oauth/");
return;
}
if (argc() > 2 && argv(1) === 'oauth' && (argv(2) === 'edit' || argv(2) === 'add') && x($_POST, 'submit')) {
check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth');
$name = x($_POST, 'name') ? $_POST['name'] : '';
$key = x($_POST, 'key') ? $_POST['key'] : '';
$secret = x($_POST, 'secret') ? $_POST['secret'] : '';
$redirect = x($_POST, 'redirect') ? $_POST['redirect'] : '';
$icon = x($_POST, 'icon') ? $_POST['icon'] : '';
$ok = true;
if ($name == '') {
$ok = false;
notice(t('Name is required') . EOL);
}
if ($key == '' || $secret == '') {
$ok = false;
notice(t('Key and Secret are required') . EOL);
}
if ($ok) {
if ($_POST['submit'] == t("Update")) {
$r = q("UPDATE clients SET\n\t\t\t\t\t\t\tclient_id='%s',\n\t\t\t\t\t\t\tpw='%s',\n\t\t\t\t\t\t\tname='%s',\n\t\t\t\t\t\t\tredirect_uri='%s',\n\t\t\t\t\t\t\ticon='%s',\n\t\t\t\t\t\t\tuid=%d\n\t\t\t\t\t\tWHERE client_id='%s'", dbesc($key), dbesc($secret), dbesc($name), dbesc($redirect), dbesc($icon), intval(local_channel()), dbesc($key));
} else {
$r = q("INSERT INTO clients (client_id, pw, name, redirect_uri, icon, uid)\n\t\t\t\t\tVALUES ('%s','%s','%s','%s','%s',%d)", dbesc($key), dbesc($secret), dbesc($name), dbesc($redirect), dbesc($icon), intval(local_channel()));
$r = q("INSERT INTO xperm (xp_client, xp_channel, xp_perm) VALUES ('%s', %d, '%s') ", dbesc($key), intval(local_channel()), dbesc('all'));
}
}
goaway($a->get_baseurl(true) . "/settings/oauth/");
return;
}
if (argc() > 1 && argv(1) == 'featured') {
check_form_security_token_redirectOnErr('/settings/featured', 'settings_featured');
call_hooks('feature_settings_post', $_POST);
build_sync_packet();
return;
}
if (argc() > 1 && argv(1) === 'features') {
check_form_security_token_redirectOnErr('/settings/features', 'settings_features');
// Build list of features and check which are set
$features = get_features();
$all_features = array();
foreach ($features as $k => $v) {
foreach ($v as $f) {
$all_features[] = $f[0];
}
}
foreach ($all_features as $k) {
if (x($_POST, "feature_{$k}")) {
set_pconfig(local_channel(), 'feature', $k, 1);
} else {
set_pconfig(local_channel(), 'feature', $k, 0);
}
}
build_sync_packet();
return;
}
if (argc() > 1 && argv(1) == 'display') {
check_form_security_token_redirectOnErr('/settings/display', 'settings_display');
$theme = x($_POST, 'theme') ? notags(trim($_POST['theme'])) : $a->channel['channel_theme'];
$mobile_theme = x($_POST, 'mobile_theme') ? notags(trim($_POST['mobile_theme'])) : '';
$user_scalable = x($_POST, 'user_scalable') ? intval($_POST['user_scalable']) : 0;
$nosmile = x($_POST, 'nosmile') ? intval($_POST['nosmile']) : 0;
$title_tosource = x($_POST, 'title_tosource') ? intval($_POST['title_tosource']) : 0;
$channel_list_mode = x($_POST, 'channel_list_mode') ? intval($_POST['channel_list_mode']) : 0;
$network_list_mode = x($_POST, 'network_list_mode') ? intval($_POST['network_list_mode']) : 0;
$channel_divmore_height = x($_POST, 'channel_divmore_height') ? intval($_POST['channel_divmore_height']) : 400;
if ($channel_divmore_height < 50) {
$channel_divmore_height = 50;
}
$network_divmore_height = x($_POST, 'network_divmore_height') ? intval($_POST['network_divmore_height']) : 400;
if ($network_divmore_height < 50) {
$network_divmore_height = 50;
}
$browser_update = x($_POST, 'browser_update') ? intval($_POST['browser_update']) : 0;
$browser_update = $browser_update * 1000;
if ($browser_update < 10000) {
$browser_update = 10000;
}
$itemspage = x($_POST, 'itemspage') ? intval($_POST['itemspage']) : 20;
if ($itemspage > 100) {
$itemspage = 100;
}
if ($mobile_theme == "---") {
del_pconfig(local_channel(), 'system', 'mobile_theme');
} else {
set_pconfig(local_channel(), 'system', 'mobile_theme', $mobile_theme);
//.........这里部分代码省略.........
示例15: retriever_plugin_settings_post
function retriever_plugin_settings_post($a, $post)
{
if ($_POST['all_photos']) {
set_pconfig(local_user(), 'retriever', 'all_photos', $_POST['all_photos']);
} else {
del_pconfig(local_user(), 'retriever', 'all_photos');
}
}