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

PHP get_my_skin函数代码示例

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

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



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

示例1: __construct

 function __construct($skin = '')
 {
     if (empty($skin)) {
         $skin = get_my_skin();
     }
     $this->skin = $skin;
     $this->cache = new Cache_Lite($GLOBALS['_cache_config']);
 }
开发者ID:babae,项目名称:etano,代码行数:8,代码来源:user_cache.class.php


示例2: __construct

 function __construct()
 {
     require_once _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/photos.inc.php';
     $this->_init();
     if (func_num_args() == 1) {
         $more_args = func_get_arg(0);
         $this->config = array_merge($this->config, $more_args);
     }
 }
开发者ID:babae,项目名称:etano,代码行数:9,代码来源:photos.class.php


示例3: DateMill

<?php

/******************************************************************************
Etano
===============================================================================
File:                       processors/ipn.php
$Revision$
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
require '../includes/common.inc.php';
require _BASEPATH_ . '/includes/user_functions.inc.php';
require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/payment.inc.php';
$module_code = preg_replace('[^a-zA-Z0-9_]', '', sanitize_and_format_gpc($_REQUEST, 'p', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], ''));
if (!empty($module_code)) {
    if (is_file(_BASEPATH_ . '/plugins/payment/' . $module_code . '/' . $module_code . '.class.php')) {
        include _BASEPATH_ . '/plugins/payment/' . $module_code . '/' . $module_code . '.class.php';
        $class = 'payment_' . $module_code;
        $pay = new $class();
        $pay->ipn();
    } else {
        require _BASEPATH_ . '/includes/classes/log_error.class.php';
        new log_error(array('module_name' => 'ipn', 'text' => 'Received a payment IPN for unexisting module: $_REQUEST:' . var_export($_REQUEST, true)));
    }
} else {
    require _BASEPATH_ . '/includes/classes/log_error.class.php';
    new log_error(array('module_name' => 'ipn', 'text' => 'Received a payment IPN without module code: $_REQUEST:' . var_export($_REQUEST, true)));
}
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:ipn.php


示例4: DateMill

<?php

/******************************************************************************
Etano
===============================================================================
File:                       processors/comment_delete.php
$Revision$
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
require '../includes/common.inc.php';
require _BASEPATH_ . '/includes/user_functions.inc.php';
require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/comments.inc.php';
check_login_member('auth');
if (is_file(_BASEPATH_ . '/events/processors/comment_delete.php')) {
    include _BASEPATH_ . '/events/processors/comment_delete.php';
}
$topass = array();
$comment_id = isset($_GET['comment_id']) ? (int) $_GET['comment_id'] : 0;
if (!empty($comment_id)) {
    $comment_type = isset($_GET['comment_type']) ? $_GET['comment_type'] : '';
    switch ($comment_type) {
        case 'blog':
            $table = "{$dbtable_prefix}comments_blog";
            $parent_table = "{$dbtable_prefix}blog_posts";
            $parent_key = "post_id";
            break;
        case 'photo':
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:comment_delete.php


示例5: DateMill

<?php

/******************************************************************************
Etano
===============================================================================
File:                       processors/search_delete.php
$Revision$
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
require '../includes/common.inc.php';
require _BASEPATH_ . '/includes/user_functions.inc.php';
require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/my_searches.inc.php';
check_login_member('save_searches');
$topass = array();
$search_id = isset($_GET['sid']) ? (int) $_GET['sid'] : 0;
$query = "DELETE FROM `{$dbtable_prefix}user_searches` WHERE `search_id`={$search_id} AND `fk_user_id`='" . $_SESSION[_LICENSE_KEY_]['user']['user_id'] . "'";
if (!($res = @mysql_query($query))) {
    trigger_error(mysql_error(), E_USER_ERROR);
}
$topass['message']['type'] = MESSAGE_INFO;
$topass['message']['text'] = $GLOBALS['_lang'][101];
$nextpage = 'my_searches.php';
if (!empty($_GET['return'])) {
    $input['return'] = sanitize_and_format_gpc($_GET, 'return', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], '');
    $nextpage = $input['return'];
}
$nextpage = _BASEURL_ . '/' . $nextpage;
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:search_delete.php


示例6: save_thumbnail

function save_thumbnail($image, $size, $save_path, $save_name, $config = array())
{
    $myreturn = false;
    $size = array($size, $size);
    if (empty($config['padding_type'])) {
        $config['padding_type'] = PAD_1SIDE;
    }
    if (empty($config['quality'])) {
        $config['quality'] = 90;
    }
    if ($imginfo = getimagesize($image)) {
        $orig_size = array($imginfo[0], $imginfo[1]);
        if ($orig_size[0] / $size[0] < $orig_size[1] / $size[1]) {
            $relevant_length = 1;
        } else {
            $relevant_length = 0;
        }
        if ($imginfo[2] == IMAGETYPE_GIF && function_exists('imagecreatefromgif')) {
            //gif
            $myimg = @imagecreatefromgif($image);
        } elseif ($imginfo[2] == IMAGETYPE_JPEG && function_exists('imagecreatefromjpeg')) {
            //jpg
            ob_start();
            $myimg = @imagecreatefromjpeg($image);
            ob_end_flush();
        } elseif ($imginfo[2] == IMAGETYPE_PNG && function_exists('imagecreatefrompng')) {
            //png
            $myimg = @imagecreatefrompng($image);
        }
        if (!empty($myimg)) {
            $new_size = array();
            $mynewimg = '';
            if ($orig_size[$relevant_length] > $size[$relevant_length]) {
                // scale down
                $new_size[$relevant_length] = $size[$relevant_length];
                $new_size[1 - $relevant_length] = (int) ($orig_size[1 - $relevant_length] * ($size[$relevant_length] / $orig_size[$relevant_length]));
                if ($config['padding_type'] == PAD_1SIDE || $config['padding_type'] == PAD_2SIDES) {
                    //					$size=$size;	// this is actually just PAD_1SIDE and the photo will be square
                } else {
                    $size = $new_size;
                    // no padding here, photo has original proportions
                }
            } else {
                // picture is smaller than the needed size
                $new_size = $orig_size;
                if ($config['padding_type'] == PAD_2SIDES) {
                    //pad in both directions. square and big
                    //					$size=array($size,$size);
                } elseif ($config['padding_type'] == PAD_1SIDE) {
                    // padding in one direction only. square but smaller
                    $size = $orig_size[$relevant_length];
                    $size = array($size, $size);
                } else {
                    // no padding. original proportions
                    $size = $orig_size;
                }
            }
            $mynewimg = @imagecreatetruecolor($size[0], $size[1]);
            imagefilledrectangle($mynewimg, 0, 0, $size[0], $size[1], 0xffffff);
            $x = (int) (($size[0] - $new_size[0]) / 2);
            $y = (int) (($size[1] - $new_size[1]) / 2);
            if (defined('BICUBIC_RESAMPLE')) {
                imagecopyresamplebicubic($mynewimg, $myimg, $x, $y, 0, 0, $new_size[0], $new_size[1], $orig_size[0], $orig_size[1]);
            } else {
                fastimagecopyresampled($mynewimg, $myimg, $x, $y, 0, 0, $new_size[0], $new_size[1], $orig_size[0], $orig_size[1]);
            }
            if (!empty($config['watermark_text']) && function_exists('imagettftext')) {
                $config['watermark_text_color'] = str_pad($config['watermark_text_color'], 6, '0', STR_PAD_RIGHT);
                $text_color = imagecolorallocate($mynewimg, hexdec(substr($config['watermark_text_color'], 0, 2)), hexdec(substr($config['watermark_text_color'], 2, 2)), hexdec(substr($config['watermark_text_color'], 4, 2)));
                $text_color2 = imagecolorallocate($mynewimg, 255 - hexdec(substr($config['watermark_text_color'], 0, 2)), 255 - hexdec(substr($config['watermark_text_color'], 2, 2)), 255 - hexdec(substr($config['watermark_text_color'], 4, 2)));
                $font_size = 15;
                do {
                    --$font_size;
                    $text_box = imagettfbbox($font_size, 0, _BASEPATH_ . '/includes/fonts/arial.ttf', $config['watermark_text']);
                    $textlen = $text_box[2] - $text_box[0] + 5;
                } while ($textlen > $new_size[0]);
                $watermark_x = (int) (($size[0] - $new_size[0]) / 2) + 5;
                $watermark_y = $new_size[1] + (int) (($size[1] - $new_size[1]) / 2) - 20;
                //shadow first
                imagettftext($mynewimg, $font_size, 0, $watermark_x, $watermark_y, $text_color2, _BASEPATH_ . '/includes/fonts/arial.ttf', $config['watermark_text']);
                //text second
                imagettftext($mynewimg, $font_size, 0, $watermark_x + 1, $watermark_y + 1, $text_color, _BASEPATH_ . '/includes/fonts/arial.ttf', $config['watermark_text']);
            }
            if (!empty($config['watermark_image']) && is_file($config['watermark_image'])) {
                $wm_image = @imagecreatefrompng($config['watermark_image']);
                $wm_image_width = imagesx($wm_image);
                $wm_image_height = imagesy($wm_image);
                $wm_image_x = (int) (($size[0] - $new_size[0]) / 2) + 5;
                $wm_image_y = $new_size[1] + (int) (($size[1] - $new_size[1]) / 2) - $wm_image_height;
                if (defined('BICUBIC_RESAMPLE')) {
                    imagecopyresamplebicubic($mynewimg, $wm_image, $wm_image_x, $wm_image_y, 0, 0, $wm_image_width, $wm_image_height, $wm_image_width, $wm_image_height);
                } else {
                    fastimagecopyresampled($mynewimg, $wm_image, $wm_image_x, $wm_image_y, 0, 0, $wm_image_width, $wm_image_height, $wm_image_width, $wm_image_height);
                }
            }
            if (!empty($config['round_corners'])) {
                $skin = get_my_skin();
                imagealphablending($mynewimg, true);
                // put the corners
                $corner = @imagecreatefrompng(_BASEPATH_ . '/skins_site/' . $skin . '/images/corner_tl.png');
//.........这里部分代码省略.........
开发者ID:babae,项目名称:etano,代码行数:101,代码来源:img_functions.inc.php


示例7: DateMill

File:                       my_networks.php
$Revision$
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
require 'includes/common.inc.php';
require _BASEPATH_ . '/includes/user_functions.inc.php';
require _BASEPATH_ . '/includes/network_functions.inc.php';
require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/net.inc.php';
check_login_member('manage_networks');
$tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs');
require _BASEPATH_ . '/includes/classes/user_cache.class.php';
$user_cache = new user_cache(get_my_skin());
$query = "SELECT `net_id`,`network` FROM `{$dbtable_prefix}networks`";
if (!($res = @mysql_query($query))) {
    trigger_error(mysql_error(), E_USER_ERROR);
}
$networks = array();
$i = 0;
while ($rsrow = mysql_fetch_assoc($res)) {
    $rsrow['network'] = sanitize_and_format($rsrow['network'], TYPE_STRING, $__field2format[TEXT_DB2DISPLAY]);
    $net_members = get_network_members($_SESSION[_LICENSE_KEY_]['user']['user_id'], $rsrow['net_id'], 4);
    if (!empty($net_members)) {
        $rsrow['members'] = $user_cache->get_cache_tpl($net_members, 'result_user');
    }
    if (!empty($rsrow['members'])) {
        $rsrow['see_all'] = true;
        $networks[] = $rsrow;
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:my_networks.php


示例8: trigger_error

        $input['error_email'] = 'red_border';
    }
    if (!$error) {
        $query = "SELECT `" . USER_ACCOUNT_ID . "` FROM `" . USER_ACCOUNTS_TABLE . "` WHERE `email`='" . $input['email'] . "' LIMIT 1";
        if (!($res = @mysql_query($query))) {
            trigger_error(mysql_error(), E_USER_ERROR);
        }
        if (mysql_num_rows($res)) {
            $error = true;
            $topass['message']['type'] = MESSAGE_ERROR;
            $topass['message']['text'][] = sprintf($GLOBALS['_lang'][204], $input['email']);
            $input['error_email'] = 'red_border';
        }
    }
    if (!$error) {
        $query = "REPLACE INTO `{$dbtable_prefix}user_settings2` SET `fk_user_id`='" . $_SESSION[_LICENSE_KEY_]['user']['user_id'] . "',`config_option`='new_email',`config_value`='" . $input['email'] . "'";
        if (!($res = @mysql_query($query))) {
            trigger_error(mysql_error(), E_USER_ERROR);
        }
        $input['email2'] = rawurlencode($input['email']);
        send_template_email($input['email'], sprintf($GLOBALS['_lang'][40], _SITENAME_), 'email_change_confirm.html', get_my_skin(), $input);
        $topass['message']['type'] = MESSAGE_INFO;
        $topass['message']['text'][] = $GLOBALS['_lang'][39];
    } else {
        // 		you must re-read all textareas from $_POST like this:
        //		$input['x']=addslashes_mq($_POST['x']);
        $input = sanitize_and_format($input, TYPE_STRING, FORMAT_HTML2TEXT_FULL | FORMAT_STRIPSLASH);
        $topass['input'] = $input;
    }
}
redirect2page($nextpage, $topass, $qs);
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:email_change.php


示例9: DateMill

<?php

/******************************************************************************
Etano
===============================================================================
File:                       processors/login.php
$Revision$
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
require '../includes/common.inc.php';
require _BASEPATH_ . '/includes/user_functions.inc.php';
require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/login.inc.php';
if (is_file(_BASEPATH_ . '/events/processors/login.php')) {
    include _BASEPATH_ . '/events/processors/login.php';
}
$score_threshold = 600;
// seconds
$error = false;
$topass = array();
$nextpage = 'login.php';
$qs = '';
$qssep = '';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $user = strtolower(sanitize_and_format_gpc($_POST, 'user', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], ''));
    $pass = sanitize_and_format_gpc($_POST, 'pass', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], '');
    if (!empty($user) && !empty($pass)) {
        $log['level'] = 'login';
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:login.php


示例10: md5

     }
 }
 if (!$error) {
     if ($input['page'] == 1) {
         $input['temp_pass'] = md5(gen_pass(6));
         $query = "INSERT IGNORE INTO `" . USER_ACCOUNTS_TABLE . "` SET `" . USER_ACCOUNT_USER . "`='" . $input['user'] . "',`" . USER_ACCOUNT_PASS . "`=md5('" . $input['pass'] . "'),`email`='" . $input['email'] . "',`membership`=2,`status`=" . ASTAT_UNVERIFIED . ",`temp_pass`='" . $input['temp_pass'] . "'";
         if (!($res = @mysql_query($query))) {
             trigger_error(mysql_error(), E_USER_ERROR);
         }
         $_SESSION[_LICENSE_KEY_]['user']['reg_id'] = mysql_insert_id();
         $_SESSION[_LICENSE_KEY_]['user']['user'] = $input['user'];
         // for `dsb_payments`
         $_SESSION[_LICENSE_KEY_]['user']['email'] = $input['email'];
         // for info_signup.html
         $input['uid'] = $_SESSION[_LICENSE_KEY_]['user']['reg_id'];
         send_template_email($input['email'], sprintf($GLOBALS['_lang'][70], _SITENAME_), 'confirm_reg.html', get_my_skin(), $input);
     }
     $query = "SELECT `fk_user_id` FROM `{$dbtable_prefix}user_profiles` WHERE `fk_user_id`=" . $_SESSION[_LICENSE_KEY_]['user']['reg_id'];
     if (!($res = @mysql_query($query))) {
         trigger_error(mysql_error(), E_USER_ERROR);
     }
     $is_update = false;
     if (mysql_num_rows($res)) {
         $is_update = true;
     }
     $now = gmdate('YmdHis');
     if ($is_update) {
         $query = "UPDATE `{$dbtable_prefix}user_profiles` SET `last_changed`='{$now}'";
     } else {
         $query = "INSERT INTO `{$dbtable_prefix}user_profiles` SET `fk_user_id`='" . $_SESSION[_LICENSE_KEY_]['user']['reg_id'] . "',`last_changed`='{$now}',`date_added`='{$now}',`score`='" . add_member_score(0, 'join', 1, true) . "'";
     }
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:join.php


示例11: DateMill

Etano
===============================================================================
File:                       profile.php
$Revision$
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
//define('CACHE_LIMITER','private');
require_once 'includes/common.inc.php';
require_once 'includes/user_functions.inc.php';
require_once 'includes/network_functions.inc.php';
check_login_member('profile_view');
$tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs');
$uid = 0;
if (!empty($_GET['uid'])) {
    $uid = (string) (int) $_GET['uid'];
} elseif (isset($_GET['user'])) {
    $user = sanitize_and_format($_GET['user'], TYPE_STRING, $__field2format[FIELD_TEXTFIELD]);
    $uid = get_userid_by_user($user);
} elseif (!empty($_SESSION[_LICENSE_KEY_]['user']['user_id'])) {
    $uid = (string) $_SESSION[_LICENSE_KEY_]['user']['user_id'];
} else {
    redirect2page('index.php');
}
if (!empty($_SESSION[_LICENSE_KEY_]['user']['user_id']) && $_SESSION[_LICENSE_KEY_]['user']['user_id'] == $uid) {
    redirect2page('my_profile.php');
}
$output = array();
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:profile.php


示例12: DateMill

<?php

/******************************************************************************
Etano
===============================================================================
File:                       processors/contact.php
$Revision$
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
require '../includes/common.inc.php';
require _BASEPATH_ . '/includes/user_functions.inc.php';
require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/contact.inc.php';
check_login_member('contact');
if (is_file(_BASEPATH_ . '/events/processors/contact.php')) {
    include _BASEPATH_ . '/events/processors/contact.php';
}
$error = false;
$qs = '';
$qs_sep = '';
$topass = array();
$nextpage = 'contact.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $input = array();
    // get the input we need and sanitize it
    $input['fk_user_id'] = !empty($_SESSION[_LICENSE_KEY_]['user']['user_id']) ? $_SESSION[_LICENSE_KEY_]['user']['user_id'] : 0;
    $input['subject'] = sanitize_and_format_gpc($_POST, 'subject', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], '');
    $input['name'] = sanitize_and_format_gpc($_POST, 'name', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], '');
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:contact.php


示例13: die

Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
if (!defined('_LICENSE_KEY_')) {
    die('Hacking attempt');
}
include _BASEPATH_ . '/includes/logs.inc.php';
include _BASEPATH_ . '/includes/site_bans.inc.php';
$_access_level = array();
require _BASEPATH_ . '/includes/access_levels.inc.php';
require_once _BASEPATH_ . '/includes/general_functions.inc.php';
$tplvars['tplurl'] = _BASEURL_ . '/skins_site/' . get_my_skin();
$tplvars['tplrelpath'] = $GLOBALS['relative_path'] . 'skins_site/' . get_my_skin();
$GLOBALS['_lang'] = array();
require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/global.inc.php';
$accepted_months = array($GLOBALS['_lang'][166], $GLOBALS['_lang'][167], $GLOBALS['_lang'][168], $GLOBALS['_lang'][169], $GLOBALS['_lang'][170], $GLOBALS['_lang'][171], $GLOBALS['_lang'][172], $GLOBALS['_lang'][173], $GLOBALS['_lang'][174], $GLOBALS['_lang'][175], $GLOBALS['_lang'][176], $GLOBALS['_lang'][177], $GLOBALS['_lang'][178]);
$_pfields = array();
$_pcats = array();
require _BASEPATH_ . '/includes/fields.inc.php';
if (!empty($_SESSION[_LICENSE_KEY_]['user']['user_id'])) {
    $_SESSION[_LICENSE_KEY_]['user']['user_id'] = (int) $_SESSION[_LICENSE_KEY_]['user']['user_id'];
    $tplvars['user_logged'] = true;
} else {
    $_SESSION[_LICENSE_KEY_]['user']['user'] = 'guest';
    $_SESSION[_LICENSE_KEY_]['user']['membership'] = 1;
}
$tplvars['myself'] = $_SESSION[_LICENSE_KEY_]['user'];
$GLOBALS['_list_of_online_members'] = get_online_ids();
$GLOBALS['page_last_modified_time'] = isset($_SESSION[_LICENSE_KEY_]['user']['loginout']) ? $_SESSION[_LICENSE_KEY_]['user']['loginout'] : 0;
// need this for cache control - the Last-Modified header
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:user_functions.inc.php


示例14: DateMill

<?php

/******************************************************************************
Etano
===============================================================================
File:                       processors/pass_change.php
$Revision$
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
require '../includes/common.inc.php';
require _BASEPATH_ . '/includes/user_functions.inc.php';
require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/pass_change.inc.php';
if (is_file(_BASEPATH_ . '/events/processors/pass_change.php')) {
    include _BASEPATH_ . '/events/processors/pass_change.php';
}
$error = false;
$qs = '';
$qs_sep = '';
$topass = array();
$nextpage = 'my_settings.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $input = array();
    // get the input we need and sanitize it
    $input['pass'] = sanitize_and_format_gpc($_POST, 'pass', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], '');
    $input['pass2'] = sanitize_and_format_gpc($_POST, 'pass2', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], '');
    if ($input['pass'] != $input['pass2']) {
        $error = true;
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:pass_change.php


示例15: DateMill

<?php

/******************************************************************************
Etano
===============================================================================
File:                       ajax/rate_item.php
$Revision: 610 $
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
require_once dirname(__FILE__) . '/../includes/common.inc.php';
require_once dirname(__FILE__) . '/../includes/user_functions.inc.php';
require_once _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/rating.inc.php';
$output = '';
$error = false;
$id = 0;
$qs = '';
$vote_type = '';
$topass = array();
if (!empty($_SESSION[_LICENSE_KEY_]['user']['user_id'])) {
    if (!empty($_REQUEST['t']) && !empty($_REQUEST['id']) && !empty($_REQUEST['vote'])) {
        $vote_type = $_REQUEST['t'];
        $id = (int) $_REQUEST['id'];
        $vote = (int) $_REQUEST['vote'];
        if ($vote_type == 'photo') {
            $parent_field = "photo_id";
            $parent_table = "{$dbtable_prefix}user_photos";
            $table = "{$dbtable_prefix}rating_photo";
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:rate_item.php


示例16: __construct

 function __construct()
 {
     require_once _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/payment.inc.php';
     $this->_init();
 }
开发者ID:babae,项目名称:etano,代码行数:5,代码来源:twocheckout.class.php


示例17: DateMill

/******************************************************************************
Etano
===============================================================================
File:                       processors/filters_addedit.php
$Revision$
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
require '../includes/common.inc.php';
require _BASEPATH_ . '/includes/user_functions.inc.php';
require _BASEPATH_ . '/includes/tables/message_filters.inc.php';
require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/mailbox.inc.php';
check_login_member('manage_folders');
if (is_file(_BASEPATH_ . '/events/processors/filters_addedit.php')) {
    include _BASEPATH_ . '/events/processors/filters_addedit.php';
}
$error = false;
$qs = '';
$qs_sep = '';
$topass = array();
$nextpage = 'filters.php';
$input = array();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    // get the input we need and sanitize it
    foreach ($message_filters_default['types'] as $k => $v) {
        $input[$k] = sanitize_and_format_gpc($_POST, $k, $__field2type[$v], $__field2format[$v], $message_filters_default['defaults'][$k]);
    }
开发者ID:babae,项目名称:etano,代码行数:30,代码来源:filters_addedit.php


示例18: unset

        }
    }
    unset($_SESSION['captcha_word']);
    if (!$error) {
        $query = "SELECT `" . USER_ACCOUNT_ID . "` as `uid`,`" . USER_ACCOUNT_USER . "` as `user`,`email` FROM `" . USER_ACCOUNTS_TABLE . "` WHERE `email`='" . $input['email'] . "' LIMIT 1";
        if (!($res = @mysql_query($query))) {
            trigger_error(mysql_error(), E_USER_ERROR);
        }
        if (mysql_num_rows($res)) {
            $input = mysql_fetch_assoc($res);
            $input['temp_pass'] = md5(gen_pass(6));
            $input['ipaddr'] = $_SERVER['REMOTE_ADDR'];
            $query = "UPDATE `" . USER_ACCOUNTS_TABLE . "` SET `temp_pass`='" . $input['temp_pass'] . "' WHERE `" . USER_ACCOUNT_ID . "`=" . $input['uid'];
            if (!($res = @mysql_query($query))) {
                trigger_error(mysql_error(), E_USER_ERROR);
            }
            send_template_email($input['email'], sprintf($GLOBALS['_lang'][225], _SITENAME_), 'pass_reset.html', get_my_skin(), $input);
            $topass['message']['type'] = MESSAGE_INFO;
            $topass['message']['text'] = $GLOBALS['_lang'][89];
        } else {
            $topass['message']['type'] = MESSAGE_ERROR;
            $topass['message']['text'] = $GLOBALS['_lang'][90];
        }
    } else {
        // 		you must re-read all textareas from $_POST like this:
        //		$input['x']=addslashes_mq($_POST['x']);
        $input = sanitize_and_format($input, TYPE_STRING, FORMAT_HTML2TEXT_FULL | FORMAT_STRIPSLASH);
        $topass['input'] = $input;
    }
}
redirect2page($nextpage, $topass, $qs);
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:pass_lost.php


示例19: DateMill

/******************************************************************************
Etano
===============================================================================
File:                       processors/photo_settings.php
$Revision$
Software by:                DateMill (http://www.datemill.com)
Copyright by:               DateMill (http://www.datemill.com)
Support at:                 http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license.                         *
******************************************************************************/
require '../includes/common.inc.php';
require _BASEPATH_ . '/includes/user_functions.inc.php';
require _BASEPATH_ . '/includes/tables/user_photos.inc.php';
require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/photos.inc.php';
check_login_member('upload_photos');
if (is_file(_BASEPATH_ . '/events/processors/photo_settings.php')) {
    include _BASEPATH_ . '/events/processors/photo_settings.php';
}
$error = false;
$qs = '';
$qs_sep = '';
$topass = array();
$nextpage = 'my_photos.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $input = array();
    // get the input we need and sanitize it
    foreach ($user_photos_default['types'] as $k => $v) {
        $input[$k] = sanitize_and_format_gpc($_POST, $k, $__field2type[$v], $__field2format[$v], array());
    }
开发者ID:babae,项目名称:etano,代码行数:30,代码来源:photo_settings.php


示例20: process

 function process(&$input, $type)
 {
     global $dbtable_prefix, $tpl;
     if (!isset($tpl)) {
         $tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs');
     }
     //		require_once _BASEPATH_.'/includes/classes/log_error.class.php';
     //		new log_error(array('module_name'=>get_class($this),'text'=>$type.': new notif from paypal: $_POST:'.var_export($_POST,true).' $_GET:'.var_export($_GET,true).' $input:'.var_export($input,true)));
     if (strcasecmp($input['business'], $this->config['paypal_email']) == 0 || strcasecmp($input['receiver_email'], $this->config['paypal_email']) == 0) {
         // some transformations
         parse_str($input['custom'], $temp);
         if (!empty($temp['uid'])) {
             $input['user_id'] = $temp['uid'];
         }
         $input['dm_item_type'] = $temp['dit'];
         $input['business'] = strtolower($input['business']);
         $input['receiver_email'] = strtolower($input['receiver_email']);
         $input['first_name'] = ucwords(strtolower($input['first_name']));
         $input['last_name'] = ucwords(strtolower($input['last_name']));
         $query = "SELECT get_lock('" . $input['txn_id'] . "',10)";
         if (!($res = @mysql_query($query))) {
             trigger_error(mysql_error(), E_USER_ERROR);
         }
         if (mysql_result($res, 0, 0) == 1) {
             $query = "SELECT `payment_id`,`is_subscr`,`name`,`is_suspect` FROM `{$dbtable_prefix}payments` WHERE `gw_txn`='" . $input['txn_id'] . "' AND `date`>=now()-INTERVAL 1 DAY";
             if (!($res = @mysql_query($query))) {
                 trigger_error(mysql_error(), E_USER_ERROR);
             }
             if (mysql_num_rows($res)) {
                 // the other process already did the job. Let's release the lock
                 if ($type == 'pdt') {
                     $output = mysql_fetch_assoc($res);
                     // tell member that he will receive everything by email
                     if ($output['is_subscr']) {
                         if ($output['is_suspect']) {
                             $tpl->set_file('gateway_text', 'thankyou_subscr_nok.html');
                         } else {
                             $tpl->set_file('gateway_text', 'thankyou_subscr_ok.html');
                         }
                     } else {
                         $tpl->set_file('gateway_text', 'thankyou_prod_nok.html');
                     }
                     $tpl->set_var('output', $output);
                     $tpl->process('gateway_text', 'gateway_text', TPL_OPTIONAL);
                 }
                 $query = "SELECT release_lock('" . $input['txn_id'] . "')";
                 if (!($res = @mysql_query($query))) {
                     trigger_error(mysql_error(), E_USER_ERROR);
                 }
             } else {
                 // we arrived before the other process, let's do the dirty work...
                 if ($input['dm_item_type'] == 'subscr') {
                     $query = "SELECT `" . USER_ACCOUNT_ID . "` as `user_id`,`" . USER_ACCOUNT_USER . "` as `user` FROM `" . USER_ACCOUNTS_TABLE . "` WHERE `" . USER_ACCOUNT_ID . "`=" . $input['user_id'];
                     if (!($res = @mysql_query($query))) {
                         trigger_error(mysql_error(), E_USER_ERROR);
                     }
                     if (mysql_num_rows($res)) {
                         $real_user = mysql_fetch_assoc($res);
                         if (strcasecmp($input['txn_type'], 'web_accept') == 0 || strcasecmp($input['txn_type'], 'send_money') == 0 || strcasecmp($input['txn_type'], 'subscr_payment') == 0) {
                             if (strcasecmp($input['payment_status'], 'Completed') == 0) {
                                 $query = "SELECT `subscr_id`,`price`,`m_value_to`,`duration` FROM `{$dbtable_prefix}subscriptions` WHERE `subscr_id`=" . $input['item_number'] . " AND `is_visible`=1";
                                 if (!($res = @mysql_query($query))) {
                                     trigger_error(mysql_error(), E_USER_ERROR);
                                 }
                                 if (mysql_num_rows($res)) {
                                     $real_subscr = mysql_fetch_assoc($res);
                                     if (number_format($real_subscr['price'], 2) == number_format($input['mc_gross'], 2)) {
                                         if ($input['test_ipn'] != 1 || $this->config['demo_mode'] == 1 && $input['test_ipn'] == 1) {
                                             require_once _BASEPATH_ . '/includes/iso31661a2.inc.php';
                                             if (isset($GLOBALS['iso31661a2'][$input['residence_country']])) {
                                                 $input['country'] = $GLOBALS['iso31661a2'][$input['residence_country']];
                                                 $input['email'] = $input['payer_email'];
                                                 $this->check_fraud($input);
                                             } else {
                                                 $this->is_fraud = true;
                                                 $this->fraud_reason = 'Invalid country code received from paypal. Please contact administrator.';
                                                 require_once _BASEPATH_ . '/includes/classes/log_error.class.php';
                                                 new log_error(array('module_name' => get_class($this), 'text' => 'country code received from paypal not found in iso31661a2.inc.php file' . array2qs($_POST)));
                                             }
                                             if (!empty($real_subscr['duration'])) {
                                                 // if the old subscription is not over yet, we need to extend the new one with some days
                                                 $query = "SELECT a.`payment_id`,UNIX_TIMESTAMP(a.`paid_until`) as `paid_until`,b.`price`,b.`duration` FROM `{$dbtable_prefix}payments` a LEFT JOIN `{$dbtable_prefix}subscriptions` b ON a.`fk_subscr_id`=b.`subscr_id` WHERE a.`fk_user_id`=" . $real_user['user_id'] . " AND a.`refunded`=0 AND a.`is_active`=1 AND a.`is_subsc 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_my_url函数代码示例发布时间:2022-05-15
下一篇:
PHP get_my_remotehosts函数代码示例发布时间: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