コード例 #1
0
if (!defined('TGPX')) {
    die("Access denied");
}
$defaults = array('status' => 'active', 'type' => 'regular');
if (!isset($_REQUEST['analyzed'])) {
    $_REQUEST = array_merge($_REQUEST, $defaults);
}
// Get settings from last import
if (!is_array($_REQUEST['fields'])) {
    $last_import = GetValue('last_import');
    if ($last_import != null) {
        $_REQUEST['fields'] = unserialize($last_import);
    }
}
$fields = explode('|', FileReadLine("{$GLOBALS['BASE_DIR']}/data/{$filename}"));
$user_fields =& GetUserGalleryFields();
$field_options = array('IGNORE' => 'IGNORE', 'gallery_url' => 'Gallery URL', 'description' => 'Description', 'keywords' => 'Keywords', 'tags' => 'Tags', 'categories' => 'Categories', 'thumbnails' => 'Thumbnails', 'email' => 'E-mail Address', 'nickname' => 'Nickname', 'weight' => 'Weight', 'clicks' => 'Clicks', 'submit_ip' => 'Submit IP', 'sponsor_id' => 'Sponsor', 'type' => 'Type', 'format' => 'Format', 'date_scheduled' => 'Date Scheduled', 'date_deletion' => 'Date of Deletion', 'partner' => 'Partner', 'icons' => 'Icons', 'preview_url' => 'Preview URL', 'dimensions' => 'Preview Size');
foreach ($user_fields as $user_field) {
    $field_options[$user_field['name']] = StringChop($user_field['label'], 25);
}
include_once 'includes/header.php';
include_once 'includes/menu.php';
?>

<script language="JavaScript">
$(function()
  {
      $('#bad_category').bind('change', function()
                                        {
                                            if( this.options[this.selectedIndex].value == 'force' )
コード例 #2
0
ファイル: init.config.php プロジェクト: moimz/MiniTalk.Client
<?php

error_reporting(E_ALL);
ini_set('display_errors', true);
define('__MINITALK__', true);
define('__MINITALK_VERSION__', '7.0.0');
define('__MINITALK_DB_PREFIX__', 'minitalk_');
if (defined('__MINITALK_PATH__') == false) {
    define('__MINITALK_PATH__', str_replace(DIRECTORY_SEPARATOR . 'configs', '', __DIR__));
}
if (defined('__MINITALK_DIR__') == false) {
    define('__MINITALK_DIR__', str_replace($_SERVER['DOCUMENT_ROOT'], '', __MINITALK_PATH__));
}
$domain = isset($_SERVER['HTTPS']) == true ? 'https://' : 'http://';
$domain .= $_SERVER['HTTP_HOST'] . __MINITALK_DIR__;
define('__MINITALK_DOMAIN__', $domain);
require_once __MINITALK_PATH__ . '/classes/functions.php';
$_CONFIGS = new stdClass();
$_ENV = new stdClass();
try {
    $_CONFIGS->key = isset($_CONFIGS->key) == true ? $_CONFIGS->key : FileReadLine(__MINITALK_PATH__ . '/configs/key.config.php', 1);
    $_CONFIGS->db = isset($_CONFIGS->db) == true ? $_CONFIGS->db : json_decode(Decoder(FileReadLine(__MINITALK_PATH__ . '/configs/db.config.php', 1)));
} catch (Exception $e) {
}
function __autoload($class)
{
    if (file_exists(__MINITALK_PATH__ . '/classes/' . $class . '.class.php') == true) {
        require_once __MINITALK_PATH__ . '/classes/' . $class . '.class.php';
    }
}
session_start();