• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_misc_data函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: upload_1

function upload_1()
{
    global $upload_dir, $db, $current_user;
    //save upload file
    if ($_FILES['upload_file']['error'] > 0) {
        $error = "ERROR: " . get_file_err($_FILES['upload_file']['error']) . "</br>";
        $_SESSION['upload_file'] = array('error' => $error);
    } else {
        // the file name that should be uploaded
        $file_tmp = $_FILES['upload_file']['tmp_name'];
        $file_name = $_FILES['upload_file']['name'];
        $unique_file_name = $current_user->user_login . "_" . $file_name;
        $upload_dir = get_misc_data('raw_data_directory');
        $upload_path = mnmpath . $upload_dir . $unique_file_name;
        if (file_exists($upload_path)) {
            $error = "ERROR: Already exits.</br>";
            $_SESSION['upload_file'] = array('error' => $error);
        } else {
            $upload = move_uploaded_file($file_tmp, $upload_path);
            echo $upload;
            // check upload status
            if (!$upload) {
                $error = "ERROR:failed to save. </br>";
                $_SESSION['upload_file'] = array('error' => $error);
            } else {
                $sql = "INSERT INTO " . table_prefix . "files \r\n\t\t\t\t\t\t\t\tSET file_user_id={$current_user->user_id},\r\n\t\t\t\t\t\t\t    file_real_size='{$_FILES['upload_file']['size']}',\r\n\t\t\t\t\t\t    \tfile_name='" . $db->escape("{$upload_path}") . "'";
                $db->query($sql);
                $loc_msg = my_base_url . my_pligg_base . $upload_dir . $unique_file_name;
                $_SESSION['upload_file'] = array('loc' => $loc_msg);
            }
        }
    }
}
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:33,代码来源:upload_file.php


示例2: captcha_configure

function captcha_configure()
{
    global $main_smarty, $the_template;
    $q_1_low = isset($_REQUEST['q_1_low']) ? $_REQUEST['q_1_low'] : '';
    $q_1_high = isset($_REQUEST['q_1_high']) ? $_REQUEST['q_1_high'] : '';
    $q_2_low = isset($_REQUEST['q_2_low']) ? $_REQUEST['q_2_low'] : '';
    $q_2_high = isset($_REQUEST['q_2_high']) ? $_REQUEST['q_2_high'] : '';
    if ($q_1_low != '') {
        misc_data_update('captcha_math_q1low', $q_1_low);
    } else {
        $q_1_low = get_misc_data('captcha_math_q1low') == '' ? 1 : get_misc_data('captcha_math_q1low');
    }
    if ($q_1_high != '') {
        misc_data_update('captcha_math_q1high', $q_1_high);
    } else {
        $q_1_high = get_misc_data('captcha_math_q1high') == '' ? 5 : get_misc_data('captcha_math_q1high');
    }
    if ($q_2_low != '') {
        misc_data_update('captcha_math_q2low', $q_2_low);
    } else {
        $q_2_low = get_misc_data('captcha_math_q2low') == '' ? 1 : get_misc_data('captcha_math_q2low');
    }
    if ($q_2_high != '') {
        misc_data_update('captcha_math_q2high', $q_2_high);
    } else {
        $q_2_high = get_misc_data('captcha_math_q2high') == '' ? 5 : get_misc_data('captcha_math_q2high');
    }
    $main_smarty->assign('q_1_low', sanitize($q_1_low, 2));
    $main_smarty->assign('q_1_high', sanitize($q_1_high, 2));
    $main_smarty->assign('q_2_low', sanitize($q_2_low, 2));
    $main_smarty->assign('q_2_high', sanitize($q_2_high, 2));
}
开发者ID:bklein01,项目名称:pligg-cms,代码行数:32,代码来源:main.php


示例3: hc_register

function hc_register(&$vars)
{
    global $main_smarty, $the_template, $hc_registered;
    if ($hc_registered) {
        return;
    }
    $hc_registered = true;
    if (!isset($_SESSION)) {
        session_start();
    }
    $_SESSION['hc_math_answer'] == '';
    $q_1_low = get_misc_data('hc_math_q1low') == '' ? 1 : get_misc_data('hc_math_q1low');
    $q_1_high = get_misc_data('hc_math_q1high') == '' ? 5 : get_misc_data('hc_math_q1high');
    $q_2_low = get_misc_data('hc_math_q2low') == '' ? 1 : get_misc_data('hc_math_q2low');
    $q_2_high = get_misc_data('hc_math_q2high') == '' ? 5 : get_misc_data('hc_math_q2high');
    $number1 = md5(mt_rand($q_1_low, $q_1_high));
    do {
        $number2 = md5(mt_rand($q_2_low, $q_2_high));
    } while ($number2 == $number1);
    $number3 = md5(mt_rand($q_2_low, $q_2_high));
    $_SESSION['titlename'] = $number1;
    $_SESSION['bodyname'] = $number2;
    $_SESSION['commentname'] = $number3;
    $main_smarty->assign('name', $_SESSION['hc_math_answer_name']);
    // smarty prefilter
    $main_smarty->register_prefilter('add_header_comment');
}
开发者ID:bendroid,项目名称:pligg-cms,代码行数:27,代码来源:hc_main.php


示例4: captcha_can_we_use

function captcha_can_we_use()
{
    global $main_smarty;
    $pubkey = get_misc_data('reCaptcha_pubkey');
    $prikey = get_misc_data('reCaptcha_prikey');
    if ($pubkey == '' || $prikey == '') {
        $main_smarty->assign('msg', 'reCaptcha needs to be configured before it can be used.');
        return false;
    } else {
        return true;
    }
}
开发者ID:bendroid,项目名称:pligg-cms,代码行数:12,代码来源:main.php


示例5: captcha_register_check_errors

function captcha_register_check_errors(&$vars)
{
    if (captcha_reg_enabled == true) {
        global $main_smarty, $the_template;
        $captcha = get_misc_data('captcha_method');
        if ($captcha == '') {
            $captcha = 'recaptcha';
        }
        $username = $vars['username'];
        $email = $vars['email'];
        $password = $vars['password'];
        $main_smarty->assign('username', $username);
        $main_smarty->assign('email', $email);
        $main_smarty->assign('password', $password);
        include_once captcha_captchas_path . '/' . $captcha . '/main.php';
        if (captcha_check($vars, 2)) {
        } else {
            $vars['error'] = true;
        }
    }
}
开发者ID:pantofla,项目名称:waterfan,代码行数:21,代码来源:captcha_main.php


示例6: TINYINT

$module_info['db_sql'][] = "ALTER TABLE " . table_users . " ADD  `status_switch` TINYINT(1) DEFAULT '1'";
$module_info['db_sql'][] = "ALTER TABLE " . table_users . " ADD  `status_friends` TINYINT(1) DEFAULT '1'";
$module_info['db_sql'][] = "ALTER TABLE " . table_users . " ADD  `status_story` TINYINT(1) DEFAULT '1'";
$module_info['db_sql'][] = "ALTER TABLE " . table_users . " ADD  `status_comment` TINYINT(1) DEFAULT '1'";
$module_info['db_sql'][] = "ALTER TABLE " . table_users . " ADD  `status_email` TINYINT(1) DEFAULT '1'";
$module_info['db_sql'][] = "ALTER TABLE " . table_users . " ADD  `status_group` TINYINT(1) DEFAULT '1'";
$module_info['db_sql'][] = "ALTER TABLE " . table_users . " ADD  `status_all_friends` TINYINT(1) DEFAULT '1'";
$module_info['db_sql'][] = "ALTER TABLE " . table_users . " ADD  `status_friend_list` TEXT";
$module_info['db_sql'][] = "ALTER TABLE " . table_users . " ADD  `status_excludes` TEXT";
// Set default values
$module_info['db_sql'][] = "UPDATE " . table_users . " SET status_switch=1, status_friends=1, status_story=1, status_comment=1, status_email=1, status_all_friends=1";
// Add new table
$module_info['db_add_table'][] = array('name' => table_prefix . "updates", 'sql' => "CREATE TABLE `" . table_prefix . "updates` (\n\t  `update_id` int(11) NOT NULL auto_increment,\n\t  `update_time` int(11) default NULL,\n\t  `update_type` char(1) NOT NULL,\n\t  `update_link_id` int(11) NOT NULL,\n\t  `update_user_id` int(11) NOT NULL,\n\t  `update_group_id` int(11) NOT NULL,\n\t  `update_likes` int(11) NOT NULL,\n\t  `update_level` varchar(25),\n\t  `update_text` text NOT NULL,\n\t  PRIMARY KEY  (`update_id`),\n\t  FULLTEXT KEY `update_text` (`update_text`)\n\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci");
$module_info['db_add_table'][] = array('name' => table_prefix . "likes", 'sql' => "CREATE TABLE `" . table_prefix . "likes` (\n\t  `like_update_id` int(11) NOT NULL,\n\t  `like_user_id` int(11) NOT NULL,\n\t  PRIMARY KEY  (`like_update_id`, `like_user_id`)\n\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci");
// Set default module settings
if (get_misc_data('status_switch') == '') {
    misc_data_update('status_switch', '0');
    misc_data_update('status_show_permalin', '1');
    misc_data_update('status_permalinks', '1');
    misc_data_update('status_inputonother', '1');
    misc_data_update('status_place', 'tpl_pligg_profile_tab_insert');
    misc_data_update('status_clock', '12');
    misc_data_update('status_results', '10');
    misc_data_update('status_max_chars', '1200');
    misc_data_update('status_avatar', 'small');
    misc_data_update('status_profile_level', 'admin,moderator,normal');
    misc_data_update('status_level', 'admin,moderator,normal');
    misc_data_update('status_user_email', '1');
    misc_data_update('status_user_comment', '1');
    misc_data_update('status_user_story', '1');
    misc_data_update('status_user_friends', '1');
开发者ID:hyrmedia,项目名称:pligg-cms,代码行数:31,代码来源:status_install.php


示例7: get_spam_trigger_settings

function get_spam_trigger_settings()
{
    return array('spam_light' => get_misc_data('spam_trigger_light'), 'spam_medium' => get_misc_data('spam_trigger_medium'), 'spam_hard' => get_misc_data('spam_trigger_hard'));
}
开发者ID:bendroid,项目名称:pligg-cms,代码行数:4,代码来源:spam_trigger_main.php


示例8: array

 if (!$fieldexists) {
     // DB 04/13/09
     $categories = $db->get_results("SELECT category_id FROM `" . table_categories . "` WHERE category_id>0", ARRAY_A);
     $cats = array();
     if ($categories) {
         foreach ($categories as $cat) {
             $cats[] = $cat['category_id'];
         }
     }
     $sql = "ALTER TABLE `" . table_users . "` ADD `user_categories` VARCHAR(255) NOT NULL default '' AFTER `user_occupation`;";
     $db->query($sql);
     /////
 } else {
     $sql = "CHANGE  `user_categories`  `user_categories` VARCHAR( 255 ) DEFAULT  ''";
     $db->query($sql);
     if (get_misc_data('user_cat') == '' && $db->get_var("SELECT user_categories FROM " . table_users . " WHERE user_level='admin' LIMIT 1")) {
         $sqlGetiCategory = "SELECT category__auto_id from " . table_categories . " where category__auto_id!= 0;";
         $sqlGetiCategoryQ = mysql_query($sqlGetiCategory);
         $arr = array();
         while ($row = mysql_fetch_array($sqlGetiCategoryQ, MYSQL_NUM)) {
             $arr[] = $row[0];
         }
         $result = mysql_query("SELECT * FROM " . table_users);
         while ($row = mysql_fetch_array($result)) {
             $cats = split(',', $row['user_categories']);
             $diff = array_diff($arr, $cats);
             mysql_query($sql = "UPDATE " . table_users . " SET user_categories='" . join(',', $diff) . "' WHERE user_id='{$row['user_id']}'");
         }
         misc_data_update('user_cat', 'changed');
     }
 }
开发者ID:hyrmedia,项目名称:pligg-cms,代码行数:31,代码来源:1.x.php


示例9: get_misc_data

<?php

$widget['widget_title'] = "Akismet Anti-Spam";
$widget['widget_has_settings'] = 1;
$widget['widget_shrink_icon'] = 1;
$widget['widget_uninstall_icon'] = 0;
$widget['name'] = 'Akismet';
$widget['desc'] = 'Akismet Anti-Spam Module';
$widget['version'] = 0.1;
$wordpress_key = get_misc_data('wordpress_key');
if ($_REQUEST['widget'] == 'akismet') {
    if (isset($_REQUEST['key'])) {
        $wordpress_key = sanitize($_REQUEST['key'], 3);
    } else {
        $wordpress_key = '';
    }
    misc_data_update('wordpress_key', $wordpress_key);
}
if ($main_smarty) {
    $main_smarty->assign('wordpress_key', $wordpress_key);
    if (function_exists('akismet_get_link_count')) {
        $count1 = akismet_get_link_count();
        $count2 = akismet_get_comment_count();
        $main_smarty->assign('spam_links_count', $count1);
        $main_smarty->assign('spam_comments_count', $count2);
        if ($count1 == 0 && $count2 == 0) {
            $widget['column'] = '';
        }
    } else {
        $widget['column'] = '';
    }
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:31,代码来源:init.php


示例10: Smarty

// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
// 		http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
include_once 'Smarty.class.php';
$main_smarty = new Smarty();
include 'config.php';
include mnminclude . 'html1.php';
include mnminclude . 'link.php';
include mnminclude . 'tags.php';
include mnminclude . 'search.php';
include mnminclude . 'smartyvariables.php';
$spam_links = get_misc_data('spam_links');
if ($spam_links != '') {
    $spam_links = unserialize(get_misc_data('spam_links'));
} else {
    $spam_links = array();
}
//print_r($spam_links);
if (count($spam_links) > 0) {
    foreach ($spam_links as $link_id) {
        $link = new Link();
        $link->id = $link_id;
        $link->read(FALSE);
        $link->status = 'discard';
        $link->store();
        echo 'Discarding link_id: ' . $link_id . '<br />';
    }
}
开发者ID:pantofla,项目名称:waterfan,代码行数:31,代码来源:akismet_cron.php


示例11: get_settings

function get_settings()
{
    return array('group_id' => get_misc_data('phpbb_group'), 'db' => get_misc_data('phpbb_db'), 'user' => get_misc_data('phpbb_user'), 'pass' => get_misc_data('phpbb_pass'), 'host' => get_misc_data('phpbb_host'), 'cookie_name' => get_misc_data('phpbb_cookie_name'), 'cookie_path' => get_misc_data('phpbb_cookie_path'), 'cookie_domain' => get_misc_data('phpbb_cookie_domain'), 'cookie_secure' => get_misc_data('phpbb_cookie_secure'));
}
开发者ID:hyrmedia,项目名称:modules,代码行数:4,代码来源:phpbb_main.php


示例12: get_misc_data

<?php

global $db, $main_smarty, $the_template;
include_once '../../config.php';
$contactable_mail = get_misc_data('contactable_mail');
// Assign contact email
// Assign contact info
$name = stripcslashes($_POST['name']);
$emailAddr = stripcslashes($_POST['email']);
$issue = stripcslashes($_POST['issue']);
$comment = stripcslashes($_POST['message']);
$subject = stripcslashes($_POST['subject']);
// Set headers
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Format message
$contactMessage = "<div>\n\t<p><strong>Name:</strong> {$name} <br />\n\t<strong>E-mail:</strong> {$emailAddr} <br />\n\t<strong>Issue:</strong> {$issue} </p>\n\n\t<p><strong>Message:</strong> {$comment} </p>\n\n\t<p><strong>Sending IP:</strong> {$_SERVER['REMOTE_ADDR']}<br />\n\t<strong>Sent via:</strong> {$_SERVER['HTTP_HOST']}</p>\n\t</div>";
// Send and check the message status
$response = mail($contactable_mail, $subject, $contactMessage, $headers) ? "success" : "failure";
$output = json_encode(array("response" => $response));
header('content-type: application/json; charset=utf-8');
echo $output;
开发者ID:hyrmedia,项目名称:modules,代码行数:22,代码来源:mail.php


示例13: get_misc_data

if ($sw_comments == '') {
    $sw_comments = '1';
}
$sw_newuser = get_misc_data('sw_newuser');
if ($sw_newuser == '') {
    $sw_newuser = '1';
}
$phpver = get_misc_data('phpver');
if ($phpver == '') {
    $phpver = '1';
}
$mysqlver = get_misc_data('mysqlver');
if ($mysqlver == '') {
    $mysqlver = '1';
}
$sw_dbsize = get_misc_data('sw_dbsize');
if ($sw_dbsize == '') {
    $sw_dbsize = '1';
}
if ($_REQUEST['widget'] == 'statistics') {
    if (isset($_REQUEST['version'])) {
        $sw_version = sanitize($_REQUEST['version'], 3);
    }
    misc_data_update('sw_version', $sw_version);
    if (isset($_REQUEST['members'])) {
        $sw_members = sanitize($_REQUEST['members'], 3);
    }
    misc_data_update('sw_members', $sw_members);
    if (isset($_REQUEST['groups'])) {
        $sw_groups = sanitize($_REQUEST['groups'], 3);
    }
开发者ID:bendroid,项目名称:pligg-cms,代码行数:31,代码来源:init.php


示例14: define

         // pagename
         define('pagename', 'admin_users');
         $main_smarty->assign('pagename', pagename);
         // show the template
         $main_smarty->assign('tpl_center', '/admin/user_listall_center');
         $main_smarty->display($template_dir . '/admin/admin.tpl');
     }
 } else {
     // No options are selected, so show the list of users.
     $CSRF->create('admin_users_list', true, true);
     global $offset, $top_users_size;
     // Items per page drop-down
     if (isset($_GET["pagesize"]) && is_numeric($_GET["pagesize"])) {
         misc_data_update('pagesize', $_GET["pagesize"]);
     }
     $pagesize = get_misc_data('pagesize');
     if ($pagesize <= 0) {
         $pagesize = 30;
     }
     $main_smarty->assign('pagesize', $pagesize);
     if ($_GET["filter"]) {
         $filter_sql = "WHERE user_level='" . sanitize($_GET["filter"], 3) . "'";
     } else {
         $filter_sql = "WHERE user_level!='Spammer'";
     }
     // figure out what "page" of the results we're on
     $offset = (get_current_page() - 1) * $pagesize;
     $users = mysql_query("SELECT SQL_CALC_FOUND_ROWS * FROM " . table_users . " {$filter_sql} ORDER BY `user_date` LIMIT {$offset},{$pagesize}");
     $rows = $db->get_var("SELECT FOUND_ROWS()");
     $userlist = array();
     while ($row = mysql_fetch_array($users, MYSQL_ASSOC)) {
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:31,代码来源:admin_users.php


示例15: pligg_hash

function pligg_hash()
{
    // returns the version of Pligg that's installed
    $hash = get_misc_data('hash');
    return $hash;
}
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:6,代码来源:utils.php


示例16: define

// the path to the modules libraries. the probably shouldn't be changed unless you rename the hc folder(s)
define('hc_lib_path', './modules/hc/libs/');
// the path to the hcs. the probably shouldn't be changed unless you rename the hc folder(s)
define('hc_hcs_path', './modules/hc/');
// the path to the images. the probably shouldn't be changed unless you rename the hc folder(s)
define('hc_img_path', my_pligg_base . '/modules/hc/images/');
$hc_single_step = get_misc_data('reg_single_step') == '' ? false : get_misc_data('reg_single_step');
$hc_single_step = $hc_single_step == 'true' ? true : false;
define('hc_single_step', $hc_single_step);
$hc_reg_enabled = get_misc_data('hc_reg_en') == '' ? true : get_misc_data('hc_reg_en');
$hc_reg_enabled = $hc_reg_enabled == 'true' ? true : false;
define('hc_reg_enabled', $hc_reg_enabled);
$hc_story_enabled = get_misc_data('hc_story_en') == '' ? true : get_misc_data('hc_story_en');
$hc_story_enabled = $hc_story_enabled == 'true' ? true : false;
define('hc_story_enabled', $hc_story_enabled);
$hc_comment_enabled = get_misc_data('hc_comment_en') == '' ? true : get_misc_data('hc_comment_en');
$hc_comment_enabled = $hc_comment_enabled == 'true' ? true : false;
define('hc_comment_enabled', $hc_comment_enabled);
define('URL_hc', './module.php?module=hc');
$hc_registered = false;
$hc_checked = false;
// don't touch anything past this line.
if (isset($main_smarty) && is_object($main_smarty)) {
    $main_smarty->assign('hc_path', hc_path);
    $main_smarty->assign('hc_pligg_lang_conf', hc_pligg_lang_conf);
    $main_smarty->assign('hc_lang_conf', hc_lang_conf);
    $main_smarty->assign('hc_tpl_path', hc_tpl_path);
    $main_smarty->assign('hc_lib_path', hc_lib_path);
    $main_smarty->assign('hc_img_path', hc_img_path);
    $main_smarty->assign('hc_hcs_path', hc_hcs_path);
    $main_smarty->assign('hc_single_step_reg', hc_single_step);
开发者ID:bklein01,项目名称:pligg-cms,代码行数:31,代码来源:hc_settings.php


示例17: array

$module_info['name'] = 'Upload';
$module_info['desc'] = 'Attach images and files to an article';
$module_info['version'] = 2.0;
$module_info['update_url'] = 'http://pligg.com/downloads/module/upload-module/version/';
$module_info['homepage_url'] = 'http://pligg.com/downloads/module/upload-module/';
$module_info['settings_url'] = '../module.php?module=upload';
// this is where you set the modules "name" and "version" that is required
// if more that one module is required then just make a copy of that line
$module_info['db_add_table'][] = array('name' => table_prefix . "files", 'sql' => "CREATE TABLE `" . table_prefix . "files` (\n\t  `file_id` int(11) NOT NULL auto_increment,\n\t  `file_name` varchar(255) default NULL,\n\t  `file_size` varchar(20) default NULL,\n\t  `file_user_id` int(11) NOT NULL,\n\t  `file_link_id` int(11) NOT NULL,\n\t  `file_orig_id` int(11) NOT NULL,\n\t  `file_real_size` int(11) NOT NULL,\n\t  `file_number` tinyint(4) NOT NULL,\n\t  `file_ispicture` tinyint(4) NOT NULL,\n\t  PRIMARY KEY  (`file_id`)\n\t) ENGINE=MyISAM ");
// these are seperate because most people will have the tables already
// created from a previous install
$module_info['db_add_field'][] = array(table_prefix . 'files', 'file_fields', 'TEXT', '', '', 0, '');
$module_info['db_add_field'][] = array(table_prefix . 'files', 'file_hide_thumb', 'TINYINT', 1, "UNSIGNED", 0, '0');
$module_info['db_add_field'][] = array(table_prefix . 'files', 'file_hide_file', 'TINYINT', 1, "UNSIGNED", 0, '0');
$module_info['db_add_field'][] = array(table_prefix . 'files', 'file_comment_id', 'INT', 11, '', 0, '0');
if (get_misc_data('upload_thumb') == '') {
    misc_data_update('upload_thumb', '1');
    misc_data_update('upload_sizes', 'a:1:{i:0;s:7:"200x200";}');
    misc_data_update('upload_display', 'a:1:{s:7:"150x150";s:1:"1";}');
    misc_data_update('upload_fields', 'YTowOnt9');
    misc_data_update('upload_alternates', 'YToxOntpOjE7czowOiIiO30=');
    misc_data_update('upload_mandatory', 'a:0:{}');
    misc_data_update('upload_place', 'tpl_link_summary_pre_story_content');
    misc_data_update('upload_external', 'file,url');
    misc_data_update('upload_link', 'orig');
    misc_data_update('upload_quality', '80');
    misc_data_update('upload_directory', '/modules/upload/attachments');
    misc_data_update('upload_thdirectory', '/modules/upload/attachments/thumbs');
    misc_data_update('upload_filesize', '200');
    misc_data_update('upload_maxnumber', '1');
    misc_data_update('upload_extensions', 'jpg jpeg png gif');
开发者ID:bendroid,项目名称:pligg-cms,代码行数:31,代码来源:upload_install.php


示例18: get_misc_data

<?php

/* V2.10 Template Lite 4 January 2007  (c) 2005-2007 Mark Dickenson. All rights reserved. Released LGPL. 2009-08-09 07:12:32 CDT */
?>

<?php 
$this->config_load(upload_lang_conf, null, null);
?>

<?php 
global $db;
$this->_vars['upload_directory'] = $upload_directory = get_misc_data('upload_directory');
$sql = "SELECT * FROM " . table_prefix . "files where file_link_id='{$this->_vars['link_id']}' AND file_size='orig'";
$images = $db->get_results($sql, ARRAY_A);
if ($images) {
    $this->_vars['images'] = $images;
}
?>
                                                          

<?php 
if (sizeof($this->_vars['images'])) {
    ?>
<h3><?php 
    echo $this->_confs['PLIGG_Upload_Attached'];
    ?>
</h3><?php 
}
if (count((array) $this->_vars['images'])) {
    foreach ((array) $this->_vars['images'] as $this->_vars['image']) {
        ?>
开发者ID:pantofla,项目名称:geez,代码行数:31,代码来源:c_5b051d955e0ac34d7d4b5aea387f76f3.php


示例19: generate

function generate()
{
    global $upload_dir, $db, $current_user, $main_smarty, $the_template;
    // the file name that should be uploaded
    $file_tmp = $_FILES['upload_file']['tmp_name'];
    $file_name = $_FILES['upload_file']['name'];
    $unique_file_name = "tingtest1.ktr";
    $upload_dir = get_misc_data('upload_directory');
    $upload_path = mnmpath . $upload_dir . $unique_file_name;
    $upload = move_uploaded_file($file_tmp, $upload_path);
    /*create new ktr file*/
    $tmpDir = 'excel-to-target_schema.ktr';
    $newDir = '0.ktr';
    copy($tmpDir, $newDir);
    $a1 = $_POST["sheet"];
    $b1 = $_POST["row"];
    $c1 = $_POST["col"];
    $a = array($a1, "", "");
    $b = array($b1, "", "");
    $c = array($c1, "", "");
    $sheets = array($a, $b, $c);
    $spd = $_POST["spd"];
    $drd = $_POST["drd"];
    $start = $_POST["start"];
    $end = $_POST["end"];
    $start2 = $_POST["start2"];
    $end2 = $_POST["end2"];
    $location = $_POST["location"];
    $aggrtype = $_POST["aggrtype"];
    $location2 = $_POST["location2"];
    $aggrtype2 = $_POST["aggrtype2"];
    $process = new Process_excel();
    $arr_Sheet_name = $process->getSheetName('census.xls');
    $arr_Header = $process->getHeader('dataverse_census.xls', 0, 11, 'A');
    //print_r ($process->getHeader('tradestatistics.xls', 1, 23, 'A'));
    echo $start;
    /* adding url*/
    add_url(0, 'http://colfusion.exp.sis.pitt.edu/colfusion/upload_raw_data/irule_dataverse_census.xls');
    echo "hello";
    //add_sheets(0, $sheets);
    addSheets(0, "Table HH-1", 10, 0);
    addConstants('Spd', $spd, 'Date', 'yyyyMMdd');
    addConstants('Drd', $drd, 'Date', 'yyyyMMdd');
    add_excel_input_fields($arr_Header);
    add_sample_target();
    //$arr_Header - $array_no_need_normalize
    $no_need_Array = array($start, $end, $location, $aggrtype);
    //print_r ($no_need_Array);
    //print_r($arr_Header);
    $result = array_diff($arr_Header, $no_need_Array);
    //	print_r($result);
    /*--------------------the second $result are from user , the first $result need to use AJAX to present to user------*/
    add_normalizer($result, $result);
    //for variable of star
    if ($start != "") {
        //$start from excel
        update_target('Start', $start);
    } else {
        //$start from user input
        addConstants('Start_from_input', $start2, 'Date', 'yyyyMMdd');
        update_target('Start', 'Start_from_input');
    }
    //for variable of end
    if ($end != "") {
        //$start from excel
        update_target('End', $end);
    } else {
        //$start from user input
        addConstants('End_from_input', $end2, 'Date', 'yyyyMMdd');
        update_target('End', 'End_from_input');
    }
    //for variable of location
    if ($location != "") {
        echo $location;
        //$start from excel
        update_target('Location', $location);
    } else {
        //$start from user input
        echo $location2;
        addConstants('Location_from_input', $location2, 'String', '');
        update_target('Location', 'Location_from_input');
    }
    //for variable of aggrType
    if ($aggrtype != "") {
        //$start from excel
        update_target('AggrType', $aggrtype);
    } else {
        //$start from user input
        addConstants('AggrType_from_input', $aggrtype2, 'String', '');
        update_target('AggrType', 'AggrType_from_input');
    }
    //add_normalize($ArrayKey,$ArrayValue);
    echo $start;
    echo "........1<br/>";
    echo $start2;
    echo ".......2<br/>";
    echo $end;
    echo "..........3<br/>";
    echo $end2;
    echo "...........4<br/>";
//.........这里部分代码省略.........
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:101,代码来源:startWizard.php


示例20: links_settings

function links_settings()
{
    return array('comments' => get_misc_data('links_comments'), 'stories' => get_misc_data('links_stories'), 'nofollow' => get_misc_data('links_nofollow'));
}
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:4,代码来源:links_main.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_mnet_environment函数代码示例发布时间:2022-05-15
下一篇:
PHP get_mimetypes_array函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap