Ejemplo n.º 1
0
 /**
  * FUNCTION USED TO LOAD DATE AND LOCATION OPTION OF UPLOAD FORM
  * - day - month - year
  * - country
  * - city
  */
 function loadLocationFields($default = NULL)
 {
     global $LANG, $LocationFieldsArray, $CBucket;
     if ($default == NULL) {
         $default = $_POST;
     }
     $dcountry = $default['country'];
     $location = $default['location'];
     $date_recorded = $default['datecreated'];
     $date_recorded = $date_recorded ? date(config("date_format"), strtotime($date_recorded)) : date(config("date_format"), time());
     $country_array = array("");
     $country_array = @array_merge($country_array, ClipBucket::get_countries());
     $LocationFieldsArray = array('country' => array('title' => lang('country'), 'type' => 'dropdown', 'name' => 'country', 'id' => 'country', 'value' => $country_array, 'checked' => $dcountry, 'db_field' => 'country', 'required' => 'no', 'default_value' => ''), 'location' => array('title' => lang('location'), 'type' => 'textfield', 'name' => 'location', 'id' => 'location', 'value' => $location, 'hint_2' => lang('vdo_add_eg'), 'db_field' => 'location', 'required' => 'no', 'default_value' => ''), 'date_recorded' => array('title' => 'Date Recorded', 'type' => 'textfield', 'name' => 'datecreated', 'id' => 'datecreated', 'class' => 'date_field', 'anchor_after' => 'date_picker', 'value' => $date_recorded, 'db_field' => 'datecreated', 'required' => 'no', 'default_value' => '', 'use_func_val' => true, 'validate_function' => 'datecreated', 'hint_2' => config("date_format")));
     return $LocationFieldsArray;
 }
Ejemplo n.º 2
0
    case 1:
        error_reporting(E_ALL ^ E_NOTICE);
        ini_set('display_errors', 'on');
        break;
    case 2:
    default:
        if (phpversion() >= '5.3.0') {
            error_reporting(E_ALL & ~(E_NOTICE | E_DEPRECATED | E_STRICT | E_WARNING));
            ini_set('display_errors', 'on');
        } else {
            error_reporting(E_ALL ^ E_NOTICE);
            ini_set('display_errors', 'on');
        }
}
$pages = new pages();
$ClipBucket = $Cbucket = new ClipBucket();
define('BASEDIR', $Cbucket->BASEDIR);
if (!file_exists(BASEDIR . '/index.php')) {
    die('Basedir is incorrect, please set the correct basedir value in \'config\' table');
}
$baseurl = $row['baseurl'];
//Removing www. as it effects SEO and updating Config
$wwwcheck = preg_match('/:\\/\\/www\\./', $baseurl, $matches);
if (count($matches) > 0) {
    $baseurl = preg_replace('/:\\/\\/www\\./', '://', $baseurl);
}
//define('BASEURL',baseurl(BACK_END));
$clean_base = false;
if (defined("CLEAN_BASEURL")) {
    $clean_base = CLEAN_BASEURL;
}