Merge branch 'ci' of https://github.com/FH-Complete/FHC-Core into ci
@@ -1,4 +1,5 @@
|
||||
.htaccess
|
||||
.htaccessbak
|
||||
bin
|
||||
/nbproject/
|
||||
/vendor/*
|
||||
@@ -8,3 +9,10 @@ documents/
|
||||
.settings
|
||||
.project
|
||||
.buildpath
|
||||
tests/codeception.yml
|
||||
tests/codeception/api.suite.yml
|
||||
tests/codeception/functional.suite.yml
|
||||
tests/codeception/acceptance.suite.yml
|
||||
tests/codeception/_output/*
|
||||
!/tests/codeception/_output/.placeholder
|
||||
/submodules/d3
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
CodeIgniter - FHComplete -> Hybrid Cyborg
|
||||
=========================================
|
||||
|
||||
== CodeIgniter Basics
|
||||
|
||||
https://codeigniter.com/user_guide/
|
||||
|
||||
=== wichtige Pfadkonstanten
|
||||
|
||||
* FCPATH -> dort wo die index.php liegt -> Bspl: /var/www/html/
|
||||
* BASEPATH -> Pfad zum CodeIgniter-Framework -> Bspl: '..../vendor/codeingiter/framework/system/'
|
||||
* APPPATH -> Pfad zur Application-Folder '/var/www/html/application/'
|
||||
|
||||
@@ -58,8 +58,13 @@ $autoload['packages'] = array();
|
||||
|
|
||||
| $autoload['libraries'] = array('user_agent' => 'ua');
|
||||
*/
|
||||
$autoload['libraries'] = array();
|
||||
//$autoload['libraries'] = array('session');
|
||||
|
||||
//$autoload['libraries'] = array();
|
||||
$autoload['libraries'] = array('session', 'FHC_Auth');
|
||||
|
||||
//$autoload['libraries'] = array();
|
||||
$autoload['libraries'] = array('session');
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
|
||||
@@ -508,7 +508,7 @@ $config['proxy_ips'] = '';
|
||||
| Autoload Custom Controllers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
Don't work so sometime delete this*/
|
||||
function __autoload($class)
|
||||
{
|
||||
if (substr($class,0,3) !== 'CI_' && substr($class,0,4) !== 'FHC_')
|
||||
|
||||
@@ -110,7 +110,7 @@ $config['rest_realm'] = 'FHC REST API';
|
||||
| authorization key
|
||||
|
|
||||
*/
|
||||
$config['rest_auth'] = ' basic';
|
||||
$config['rest_auth'] = 'basic';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
if (! defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Database Class
|
||||
@@ -15,28 +16,27 @@ class DBTools extends FHC_Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_seed_path = APPPATH.'seeds/';
|
||||
protected $seed_path = APPPATH.'seeds/';
|
||||
|
||||
/**
|
||||
* Seed basename regex
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_seed_regex = '/^\d{3}_(\w+)$/';
|
||||
protected $seed_regex = '/^\d{3}_(\w+)$/';
|
||||
|
||||
/**
|
||||
* Initialize DB-Tools Class
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function __construct()
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if ($this->input->is_cli_request())
|
||||
{
|
||||
$cli=true;
|
||||
$cli = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -45,16 +45,15 @@ class DBTools extends FHC_Controller
|
||||
}
|
||||
|
||||
// can only be run in the development environment
|
||||
if (ENVIRONMENT !== 'development') {
|
||||
if (ENVIRONMENT !== 'development')
|
||||
exit('Wowsers! You don\'t want to do that!');
|
||||
}
|
||||
$this->load->database('system'); //Use the system-Connection for DB-Manipulation
|
||||
$this->load->library('migration');
|
||||
|
||||
// If not set, set it
|
||||
//$this->_seed_path !== '' OR $this->_seed_path = APPPATH.'seeds/';
|
||||
//$this->seed_path !== '' OR $this->seed_path = APPPATH.'seeds/';
|
||||
// Add trailing slash if not set
|
||||
//$this->_seed_path = rtrim($this->_seed_path, '/').'/';
|
||||
//$this->seed_path = rtrim($this->seed_path, '/').'/';
|
||||
|
||||
// Load seed language
|
||||
$this->lang->load('seed');
|
||||
@@ -68,43 +67,51 @@ class DBTools extends FHC_Controller
|
||||
log_message('info', 'DB-Tools Controller Initialized');
|
||||
}
|
||||
|
||||
public function index()
|
||||
/**
|
||||
* Main function index as help
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$result = "The following are the available command line interface commands\n\n";
|
||||
$result .= "php index.ci.php DBTools migrate [\"version_number\"] Run all migrations. The version number is optional.\n";
|
||||
$result .= "php index.ci.php DBTools migrate [\"version_number\"] Run all migrations. ";
|
||||
$result .= "The version number is optional.\n";
|
||||
$result .= "php index.ci.php DBTools seed \"file_name\" Run the specified seed file.\n";
|
||||
|
||||
echo $result . PHP_EOL;
|
||||
echo $result.PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrate to latest or current version
|
||||
*
|
||||
* @param string $version One of either "latest" or "current"
|
||||
* @param string $version [optional] One of either "latest" or "current"
|
||||
* @return void
|
||||
*/
|
||||
public function migrate($version = 'latest')
|
||||
{
|
||||
|
||||
if ($this->cli && $this->migration->current() === FALSE)
|
||||
if ($this->cli && $this->migration->current() === false)
|
||||
{
|
||||
show_error($this->migration->error_string());
|
||||
}
|
||||
elseif ($version != 'latest' && $version != 'current')
|
||||
{
|
||||
$this->_failed('Migration version must be either latest or current');
|
||||
$this->__failed('Migration version must be either latest or current');
|
||||
}
|
||||
|
||||
if (!$this->migration->$version())
|
||||
{
|
||||
$this->_failed();
|
||||
$this->__failed();
|
||||
}
|
||||
|
||||
$this->_succeeded();
|
||||
$this->__succeeded();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Migrate to a specific version
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function version()
|
||||
{
|
||||
@@ -116,36 +123,39 @@ class DBTools extends FHC_Controller
|
||||
|
||||
if (!$this->migrate->version($version))
|
||||
{
|
||||
$this->_failed();
|
||||
$this->__failed();
|
||||
}
|
||||
|
||||
$this->_succeeded();
|
||||
$this->__succeeded();
|
||||
}
|
||||
|
||||
/**
|
||||
* Roll-back to the last version before current
|
||||
*
|
||||
* @param int $version The migration to rollback to, defaults to previous
|
||||
* @return void
|
||||
*/
|
||||
public function rollback($version = null)
|
||||
{
|
||||
if (is_null($version))
|
||||
{
|
||||
$version = $this->_get_version() ?: 1;
|
||||
$version = $this->__getVersion() ?: 1;
|
||||
$version--;
|
||||
}
|
||||
|
||||
// Check it's definitely false, we could be rolling back to v0
|
||||
if (false === $this->migration->version($version))
|
||||
{
|
||||
$this->_failed();
|
||||
$this->__failed();
|
||||
}
|
||||
|
||||
$this->_succeeded('rolled back');
|
||||
$this->__succeeded('rolled back');
|
||||
}
|
||||
|
||||
/**
|
||||
* ROLLBACK ALL THE THINGS!
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function uninstall()
|
||||
{
|
||||
@@ -155,17 +165,17 @@ class DBTools extends FHC_Controller
|
||||
/**
|
||||
* Seeds DB with Testdata
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $name Name of the seed file.
|
||||
* @return bool
|
||||
*/
|
||||
function seed($name = null)
|
||||
public function seed($name = null)
|
||||
{
|
||||
$seeds = $this->find_seeds();
|
||||
$seeds = $this->findSeeds();
|
||||
|
||||
if (empty($seeds))
|
||||
{
|
||||
$this->_error_string = $this->lang->line('seed_none_found');
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
$method = 'seed';
|
||||
@@ -173,21 +183,21 @@ class DBTools extends FHC_Controller
|
||||
foreach ($seeds as $number => $file)
|
||||
{
|
||||
include_once($file);
|
||||
$class = 'Seed_'.ucfirst(strtolower($this->_get_seed_name(basename($file, '.php'))));
|
||||
$class = 'Seed_'.ucfirst(strtolower($this->_getSeedName(basename($file, '.php'))));
|
||||
|
||||
// Validate the seed file structure
|
||||
if ( ! class_exists($class, FALSE))
|
||||
if (! class_exists($class, false))
|
||||
{
|
||||
$this->_error_string = sprintf($this->lang->line('seed_class_doesnt_exist'), $class);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
// method_exists() returns true for non-public methods,
|
||||
// while is_callable() can't be used without instantiating.
|
||||
// Only get_class_methods() satisfies both conditions.
|
||||
elseif ( ! in_array($method, array_map('strtolower', get_class_methods($class))))
|
||||
elseif (! in_array($method, array_map('strtolower', get_class_methods($class))))
|
||||
{
|
||||
$this->_error_string = sprintf($this->lang->line('seed_missing_'.$method.'_method'), $class);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
$pending[$number] = array($class, $method);
|
||||
@@ -207,19 +217,19 @@ class DBTools extends FHC_Controller
|
||||
*
|
||||
* @return array list of seed file paths sorted by version
|
||||
*/
|
||||
public function find_seeds()
|
||||
public function findSeeds()
|
||||
{
|
||||
$seeds = array();
|
||||
|
||||
// Load all *_*.php files in the seeds path
|
||||
foreach (glob($this->_seed_path.'*_*.php') as $file)
|
||||
foreach (glob($this->seed_path.'*_*.php') as $file)
|
||||
{
|
||||
$name = basename($file, '.php');
|
||||
|
||||
// Filter out non-seed files
|
||||
if (preg_match($this->_seed_regex, $name))
|
||||
if (preg_match($this->seed_regex, $name))
|
||||
{
|
||||
$number = $this->_get_seed_number($name);
|
||||
$number = $this->_getSeedNumber($name);
|
||||
|
||||
// There cannot be duplicate seed numbers
|
||||
if (isset($seeds[$number]))
|
||||
@@ -239,10 +249,10 @@ class DBTools extends FHC_Controller
|
||||
/**
|
||||
* Extracts the seed number from a filename
|
||||
*
|
||||
* @param string $seed
|
||||
* @param string $seed Filename of the seed.
|
||||
* @return string Numeric portion of a seed filename
|
||||
*/
|
||||
protected function _get_seed_number($seed)
|
||||
protected function _getSeedNumber($seed)
|
||||
{
|
||||
return sscanf($seed, '%[0-9]+', $number)
|
||||
? $number : '0';
|
||||
@@ -250,10 +260,10 @@ class DBTools extends FHC_Controller
|
||||
/**
|
||||
* Extracts the seed class name from a filename
|
||||
*
|
||||
* @param string $seed
|
||||
* @param string $seed Filename of the seed.
|
||||
* @return string text portion of a migration filename
|
||||
*/
|
||||
protected function _get_seed_name($seed)
|
||||
protected function _getSeedName($seed)
|
||||
{
|
||||
$parts = explode('_', $seed);
|
||||
array_shift($parts);
|
||||
@@ -264,10 +274,11 @@ class DBTools extends FHC_Controller
|
||||
* Yay, it worked! Tell the user.
|
||||
*
|
||||
* @param string $task What did we just do? We...
|
||||
* @return void
|
||||
*/
|
||||
private function _succeeded($task = 'migrated')
|
||||
private function __succeeded($task = 'migrated')
|
||||
{
|
||||
$version = $this->_get_version();
|
||||
$version = $this->__getVersion();
|
||||
exit('Successfully '.$task.' to version '.$version);
|
||||
}
|
||||
|
||||
@@ -275,19 +286,20 @@ class DBTools extends FHC_Controller
|
||||
* Output an error message when it all goes tits up
|
||||
*
|
||||
* @param string $message Error to output (default to CI's migration error)
|
||||
* @return void
|
||||
*/
|
||||
private function _failed($message = null)
|
||||
private function __failed($message = null)
|
||||
{
|
||||
$message = $message ?: $this->migration->error_string();
|
||||
show_error($message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Carbon copy of parent::_get_version, but that's protected.
|
||||
* Carbon copy of parent::__getVersion, but that's protected.
|
||||
*
|
||||
* @return int Currently installed migration number
|
||||
*/
|
||||
private function _get_version()
|
||||
private function __getVersion()
|
||||
{
|
||||
$row = $this->db->get('ci_migrations')->row();
|
||||
return $row ? $row->version : 0;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Examples extends CI_Controller {
|
||||
class Examples extends CI_Controller
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -14,7 +15,7 @@ class Examples extends CI_Controller {
|
||||
|
||||
public function _example_output($output = null)
|
||||
{
|
||||
$this->load->view('example.php',$output);
|
||||
$this->load->view('example.php', $output);
|
||||
}
|
||||
|
||||
public function offices()
|
||||
@@ -38,12 +39,11 @@ class Examples extends CI_Controller {
|
||||
$crud->set_table('offices');
|
||||
$crud->set_subject('Office');
|
||||
$crud->required_fields('city');
|
||||
$crud->columns('city','country','phone','addressLine1','postalCode');
|
||||
$crud->columns('city', 'country', 'phone', 'addressLine1', 'postalCode');
|
||||
|
||||
$output = $crud->render();
|
||||
|
||||
$this->_example_output($output);
|
||||
|
||||
}catch(Exception $e){
|
||||
show_error($e->getMessage().' --- '.$e->getTraceAsString());
|
||||
}
|
||||
@@ -55,13 +55,13 @@ class Examples extends CI_Controller {
|
||||
|
||||
$crud->set_theme('datatables');
|
||||
$crud->set_table('employees');
|
||||
$crud->set_relation('officeCode','offices','city');
|
||||
$crud->display_as('officeCode','Office City');
|
||||
$crud->set_relation('officeCode', 'offices', 'city');
|
||||
$crud->display_as('officeCode', 'Office City');
|
||||
$crud->set_subject('Employee');
|
||||
|
||||
$crud->required_fields('lastName');
|
||||
|
||||
$crud->set_field_upload('file_url','assets/uploads/files');
|
||||
$crud->set_field_upload('file_url', 'assets/uploads/files');
|
||||
|
||||
$output = $crud->render();
|
||||
|
||||
@@ -73,12 +73,12 @@ class Examples extends CI_Controller {
|
||||
$crud = new grocery_CRUD();
|
||||
|
||||
$crud->set_table('customers');
|
||||
$crud->columns('customername','contactlastname','phone','city','country','salesrepemployeenumber','creditlimit');
|
||||
$crud->display_as('salesrepemployeenumber','from Employeer')
|
||||
->display_as('customername','Name')
|
||||
->display_as('contactlastname','Last Name');
|
||||
$crud->columns('customername', 'contactlastname', 'phone', 'city', 'country', 'salesrepemployeenumber', 'creditlimit');
|
||||
$crud->display_as('salesrepemployeenumber', 'from Employeer')
|
||||
->display_as('customername', 'Name')
|
||||
->display_as('contactlastname', 'Last Name');
|
||||
$crud->set_subject('Customer');
|
||||
$crud->set_relation('salesrepemployeenumber','employees','lastname');
|
||||
$crud->set_relation('salesrepemployeenumber', 'employees', 'lastname');
|
||||
|
||||
$output = $crud->render();
|
||||
|
||||
@@ -89,8 +89,8 @@ class Examples extends CI_Controller {
|
||||
{
|
||||
$crud = new grocery_CRUD();
|
||||
|
||||
$crud->set_relation('customerNumber','customers','{contactLastName} {contactFirstName}');
|
||||
$crud->display_as('customerNumber','Customer');
|
||||
$crud->set_relation('customerNumber', 'customers', '{contactLastName} {contactFirstName}');
|
||||
$crud->display_as('customerNumber', 'Customer');
|
||||
$crud->set_table('orders');
|
||||
$crud->set_subject('Order');
|
||||
$crud->unset_add();
|
||||
@@ -108,7 +108,7 @@ class Examples extends CI_Controller {
|
||||
$crud->set_table('products');
|
||||
$crud->set_subject('Product');
|
||||
$crud->unset_columns('productDescription');
|
||||
$crud->callback_column('buyPrice',array($this,'valueToEuro'));
|
||||
$crud->callback_column('buyPrice', array($this,'valueToEuro'));
|
||||
|
||||
$output = $crud->render();
|
||||
|
||||
@@ -125,11 +125,11 @@ class Examples extends CI_Controller {
|
||||
$crud = new grocery_CRUD();
|
||||
|
||||
$crud->set_table('film');
|
||||
$crud->set_relation_n_n('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname','priority');
|
||||
$crud->set_relation_n_n('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname', 'priority');
|
||||
$crud->set_relation_n_n('category', 'film_category', 'category', 'film_id', 'category_id', 'name');
|
||||
$crud->unset_columns('special_features','description','actors');
|
||||
$crud->unset_columns('special_features', 'description', 'actors');
|
||||
|
||||
$crud->fields('title', 'description', 'actors' , 'category' ,'release_year', 'rental_duration', 'rental_rate', 'length', 'replacement_cost', 'rating', 'special_features');
|
||||
$crud->fields('title', 'description', 'actors', 'category', 'release_year', 'rental_duration', 'rental_rate', 'length', 'replacement_cost', 'rating', 'special_features');
|
||||
|
||||
$output = $crud->render();
|
||||
|
||||
@@ -143,15 +143,14 @@ class Examples extends CI_Controller {
|
||||
|
||||
$crud->set_theme('twitter-bootstrap');
|
||||
$crud->set_table('film');
|
||||
$crud->set_relation_n_n('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname','priority');
|
||||
$crud->set_relation_n_n('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname', 'priority');
|
||||
$crud->set_relation_n_n('category', 'film_category', 'category', 'film_id', 'category_id', 'name');
|
||||
$crud->unset_columns('special_features','description','actors');
|
||||
$crud->unset_columns('special_features', 'description', 'actors');
|
||||
|
||||
$crud->fields('title', 'description', 'actors' , 'category' ,'release_year', 'rental_duration', 'rental_rate', 'length', 'replacement_cost', 'rating', 'special_features');
|
||||
$crud->fields('title', 'description', 'actors', 'category', 'release_year', 'rental_duration', 'rental_rate', 'length', 'replacement_cost', 'rating', 'special_features');
|
||||
|
||||
$output = $crud->render();
|
||||
$this->_example_output($output);
|
||||
|
||||
}catch(Exception $e){
|
||||
show_error($e->getMessage().' --- '.$e->getTraceAsString());
|
||||
}
|
||||
@@ -160,8 +159,8 @@ class Examples extends CI_Controller {
|
||||
function multigrids()
|
||||
{
|
||||
$this->config->load('grocery_crud');
|
||||
$this->config->set_item('grocery_crud_dialog_forms',true);
|
||||
$this->config->set_item('grocery_crud_default_per_page',10);
|
||||
$this->config->set_item('grocery_crud_dialog_forms', true);
|
||||
$this->config->set_item('grocery_crud_default_per_page', 10);
|
||||
|
||||
$output1 = $this->offices_management2();
|
||||
|
||||
@@ -186,7 +185,7 @@ class Examples extends CI_Controller {
|
||||
$crud->set_table('offices');
|
||||
$crud->set_subject('Office');
|
||||
|
||||
$crud->set_crud_url_path(site_url(strtolower(__CLASS__."/".__FUNCTION__)),site_url(strtolower(__CLASS__."/multigrids")));
|
||||
$crud->set_crud_url_path(site_url(strtolower(__CLASS__."/".__FUNCTION__)), site_url(strtolower(__CLASS__."/multigrids")));
|
||||
|
||||
$output = $crud->render();
|
||||
|
||||
@@ -203,15 +202,15 @@ class Examples extends CI_Controller {
|
||||
|
||||
$crud->set_theme('datatables');
|
||||
$crud->set_table('employees');
|
||||
$crud->set_relation('officeCode','offices','city');
|
||||
$crud->display_as('officeCode','Office City');
|
||||
$crud->set_relation('officeCode', 'offices', 'city');
|
||||
$crud->display_as('officeCode', 'Office City');
|
||||
$crud->set_subject('Employee');
|
||||
|
||||
$crud->required_fields('lastName');
|
||||
|
||||
$crud->set_field_upload('file_url','assets/uploads/files');
|
||||
$crud->set_field_upload('file_url', 'assets/uploads/files');
|
||||
|
||||
$crud->set_crud_url_path(site_url(strtolower(__CLASS__."/".__FUNCTION__)),site_url(strtolower(__CLASS__."/multigrids")));
|
||||
$crud->set_crud_url_path(site_url(strtolower(__CLASS__."/".__FUNCTION__)), site_url(strtolower(__CLASS__."/multigrids")));
|
||||
|
||||
$output = $crud->render();
|
||||
|
||||
@@ -227,14 +226,14 @@ class Examples extends CI_Controller {
|
||||
$crud = new grocery_CRUD();
|
||||
|
||||
$crud->set_table('customers');
|
||||
$crud->columns('customerName','contactLastName','phone','city','country','salesRepEmployeeNumber','creditLimit');
|
||||
$crud->display_as('salesRepEmployeeNumber','from Employeer')
|
||||
->display_as('customerName','Name')
|
||||
->display_as('contactLastName','Last Name');
|
||||
$crud->columns('customerName', 'contactLastName', 'phone', 'city', 'country', 'salesRepEmployeeNumber', 'creditLimit');
|
||||
$crud->display_as('salesRepEmployeeNumber', 'from Employeer')
|
||||
->display_as('customerName', 'Name')
|
||||
->display_as('contactLastName', 'Last Name');
|
||||
$crud->set_subject('Customer');
|
||||
$crud->set_relation('salesRepEmployeeNumber','employees','lastName');
|
||||
$crud->set_relation('salesRepEmployeeNumber', 'employees', 'lastName');
|
||||
|
||||
$crud->set_crud_url_path(site_url(strtolower(__CLASS__."/".__FUNCTION__)),site_url(strtolower(__CLASS__."/multigrids")));
|
||||
$crud->set_crud_url_path(site_url(strtolower(__CLASS__."/".__FUNCTION__)), site_url(strtolower(__CLASS__."/multigrids")));
|
||||
|
||||
$output = $crud->render();
|
||||
|
||||
@@ -244,5 +243,4 @@ class Examples extends CI_Controller {
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,160 +0,0 @@
|
||||
<?php
|
||||
|
||||
class Migrate extends FHC_Controller
|
||||
{
|
||||
private $class_version = '1.0';
|
||||
private $cli = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if ($this->input->is_cli_request())
|
||||
{
|
||||
$cli=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//$this->output->set_status_header(403, 'Migrations must be run from the CLI');
|
||||
//exit;
|
||||
}
|
||||
$this->load->database('system'); //Use the system-Connection for DB-Manipulation
|
||||
$this->load->library('migration');
|
||||
$this->load->library('FHC_Seed');
|
||||
}
|
||||
|
||||
|
||||
public function help() {
|
||||
$result = "The following are the available command line interface commands\n\n";
|
||||
$result .= "php index.ci.php db migrate [\"version_number\"] Run all migrations. The version number is optional.\n";
|
||||
$result .= "php index.ci.php db seed \"file_name\" Run the specified seed file. Filename is optional.\n";
|
||||
|
||||
echo $result . PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrate to latest or current version
|
||||
*
|
||||
* @param string $version One of either "latest" or "current"
|
||||
*/
|
||||
public function migrate($version = 'latest')
|
||||
{
|
||||
|
||||
if ($this->cli && $this->migration->current() === FALSE)
|
||||
{
|
||||
show_error($this->migration->error_string());
|
||||
}
|
||||
elseif ($version != 'latest' && $version != 'current')
|
||||
{
|
||||
$this->_failed('Migration version must be either latest or current');
|
||||
}
|
||||
|
||||
if (!$this->migration->version())
|
||||
{
|
||||
$this->_failed();
|
||||
}
|
||||
|
||||
$this->_succeeded();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Migrate to a specific version
|
||||
*/
|
||||
public function version()
|
||||
{
|
||||
if ($version == 'latest' || $version == 'current')
|
||||
{
|
||||
$this->index($version);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!$this->migrate->version($version))
|
||||
{
|
||||
$this->_failed();
|
||||
}
|
||||
|
||||
$this->_succeeded();
|
||||
}
|
||||
|
||||
/**
|
||||
* Roll-back to the last version before current
|
||||
*
|
||||
* @param int $version The migration to rollback to, defaults to previous
|
||||
*/
|
||||
public function rollback($version = null)
|
||||
{
|
||||
if (is_null($version))
|
||||
{
|
||||
$version = $this->_get_version() ?: 1;
|
||||
$version--;
|
||||
}
|
||||
|
||||
// Check it's definitely false, we could be rolling back to v0
|
||||
if (false === $this->migration->version($version))
|
||||
{
|
||||
$this->_failed();
|
||||
}
|
||||
|
||||
$this->_succeeded('rolled back');
|
||||
}
|
||||
|
||||
/**
|
||||
* ROLLBACK ALL THE THINGS!
|
||||
*/
|
||||
public function uninstall()
|
||||
{
|
||||
$this->rollback(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Seed DB with TestData
|
||||
*
|
||||
* @param string $name Name of the SeedFile
|
||||
*/
|
||||
|
||||
public function seed($name = null)
|
||||
{
|
||||
$this->fhc_seed->seed($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Yay, it worked! Tell the user.
|
||||
*
|
||||
* @param string $task What did we just do? We...
|
||||
*/
|
||||
private function _succeeded($task = 'migrated')
|
||||
{
|
||||
$version = $this->_get_version();
|
||||
exit('Successfully '.$task.' to version '.$version);
|
||||
}
|
||||
|
||||
/**
|
||||
* Output an error message when it all goes tits up
|
||||
*
|
||||
* @param string $message Error to output (default to CI's migration error)
|
||||
*/
|
||||
private function _failed($message = null)
|
||||
{
|
||||
$message = $message ?: $this->migration->error_string();
|
||||
show_error($message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Carbon copy of parent::_get_version, but that's protected.
|
||||
*
|
||||
* @return int Currently installed migration number
|
||||
*/
|
||||
private function _get_version()
|
||||
{
|
||||
$row = $this->db->get('ci_migrations')->row();
|
||||
return $row ? $row->version : 0;
|
||||
}
|
||||
|
||||
public function about()
|
||||
{
|
||||
echo "CI-Migrate_CLI v".$this->class_version;
|
||||
echo "\nCheck http://github.com/dshoreman/ci-migrate_cli/ for updates";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -21,20 +21,25 @@
|
||||
* @return some value on success.
|
||||
*/
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
defined('BASEPATH') || exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
/**
|
||||
* @class Rest_server
|
||||
* @brief Rest Server Controller
|
||||
*
|
||||
* A more detailed class description.
|
||||
*/
|
||||
class Rest_server extends MY_Controller {
|
||||
|
||||
public function index()
|
||||
*/
|
||||
class Rest_server extends FHC_Controller
|
||||
{
|
||||
/**
|
||||
* Index Method for default function.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->helper('url');
|
||||
|
||||
$this->load->view('rest_server');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
defined('BASEPATH') || exit('No direct script access allowed');
|
||||
|
||||
class Vilesci extends CI_Controller {
|
||||
class Vilesci extends CI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Index Page for this controller.
|
||||
@@ -17,10 +18,12 @@ class Vilesci extends CI_Controller {
|
||||
* So any other public methods not prefixed with an underscore will
|
||||
* map to /index.php/welcome/<method_name>
|
||||
* @see http://codeigniter.com/user_guide/general/urls.html
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (false)//$this->dbupdate())
|
||||
// ToDo: check if update is needed
|
||||
if (false && $this->dbupdate())
|
||||
echo 'System-DB needs update!';
|
||||
else
|
||||
{
|
||||
@@ -30,11 +33,15 @@ class Vilesci extends CI_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
private function dbupdate()
|
||||
/**
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function __dbupdate()
|
||||
{
|
||||
// Check for update (codeigniter migration)
|
||||
$this->load->library('migration');
|
||||
if ($this->migration->current() === FALSE)
|
||||
if ($this->migration->current() === false)
|
||||
show_error($this->migration->error_string());
|
||||
if ($this->migration->current() != $this->migration->latest())
|
||||
return true;
|
||||
|
||||
@@ -14,22 +14,23 @@
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if (! defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
|
||||
require APPPATH . '/libraries/REST_Controller.php';
|
||||
//require APPPATH . '/libraries/REST_Controller.php';
|
||||
|
||||
/**
|
||||
* Handles user authentication and registration process
|
||||
*/
|
||||
class AuthAPI extends REST_Controller {
|
||||
|
||||
class AuthAPI extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Userauth-Controller constructor.
|
||||
* A more elaborate description of the constructor.
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
function __construct()
|
||||
public function __construct()
|
||||
{
|
||||
// Construct the parent class
|
||||
parent::__construct();
|
||||
@@ -39,16 +40,18 @@ class AuthAPI extends REST_Controller {
|
||||
$this->methods['login_get']['limit'] = 500; // 500 requests per hour per user/key
|
||||
|
||||
// Load helper
|
||||
$this->load->helper('fhcauth');
|
||||
//$this->load->helper('fhcauth');
|
||||
$this->load->library('session');
|
||||
$this->load->library('FHC_Auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks user credentials and creates a new session
|
||||
* @return string JSON that indicates success/failure of login
|
||||
*
|
||||
* @example normal account: http://wsp.fortyseeds.at/backend/api/userauth/login/username/foo%40bar.at/password/secret/device_id/abcdef123
|
||||
* @example OAuth Google: http://wsp.fortyseeds.at/backend/api/userauth/login/username/foo%40bar.at/device_id/abcdef123/google_token/qwert321
|
||||
* @example OAuth Facebook: http://wsp.fortyseeds.at/backend/api/userauth/login/username/foo%40bar.at/device_id/abcdef123/fb_token/qwert321
|
||||
* @return void JSON that indicates success/failure of login.
|
||||
*/
|
||||
public function login_get()
|
||||
{
|
||||
@@ -57,8 +60,8 @@ class AuthAPI extends REST_Controller {
|
||||
$httpstatus = null;
|
||||
$username = urldecode($this->get('username'));
|
||||
$password = urldecode($this->get('password'));
|
||||
|
||||
$account = auth($username,$password);
|
||||
|
||||
$account = $this->FHCAuth->auth($username, $password);
|
||||
|
||||
// perform login checks
|
||||
if (!$account)
|
||||
@@ -92,8 +95,9 @@ class AuthAPI extends REST_Controller {
|
||||
|
||||
/**
|
||||
* Logs out user by destroying session
|
||||
* @return string JSON that indicates success/failure of logout
|
||||
*
|
||||
* @example http://wsp.fortyseeds.at/backend/api/userauth/logout/username/foo%40bar.at/session_id/55afab8ba6f1b/device_id/abcdef123
|
||||
* @return void JSON that indicates success/failure of logout
|
||||
*/
|
||||
public function logout_get()
|
||||
{
|
||||
@@ -125,6 +129,4 @@ class AuthAPI extends REST_Controller {
|
||||
// Set the response and exit
|
||||
$this->response($payload, $httpstatus);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if (! defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
|
||||
require APPPATH . '/libraries/REST_Controller.php';
|
||||
require APPPATH.'/libraries/REST_Controller.php';
|
||||
|
||||
/**
|
||||
* Keys Controller
|
||||
@@ -16,8 +17,8 @@ require APPPATH . '/libraries/REST_Controller.php';
|
||||
* @license MIT
|
||||
* @link https://github.com/chriskacerguis/codeigniter-restserver
|
||||
*/
|
||||
class Key extends REST_Controller {
|
||||
|
||||
class APIKey extends REST_Controller
|
||||
{
|
||||
protected $methods = [
|
||||
'index_put' => ['level' => 10, 'limit' => 10],
|
||||
'index_delete' => ['level' => 10],
|
||||
@@ -34,24 +35,24 @@ class Key extends REST_Controller {
|
||||
public function index_put()
|
||||
{
|
||||
// Build a new key
|
||||
$key = $this->_generate_key();
|
||||
$key = $this->__generateKey();
|
||||
|
||||
// If no key level provided, provide a generic key
|
||||
$level = $this->put('level') ? $this->put('level') : 1;
|
||||
$ignore_limits = ctype_digit($this->put('ignore_limits')) ? (int) $this->put('ignore_limits') : 1;
|
||||
$ignore_limits = ctype_digit($this->put('ignore_limits')) ? (int)$this->put('ignore_limits') : 1;
|
||||
|
||||
// Insert the new key
|
||||
if ($this->_insert_key($key, ['level' => $level, 'ignore_limits' => $ignore_limits]))
|
||||
{
|
||||
$this->response([
|
||||
'status' => TRUE,
|
||||
'status' => true,
|
||||
'key' => $key
|
||||
], REST_Controller::HTTP_CREATED); // CREATED (201) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response([
|
||||
'status' => FALSE,
|
||||
'status' => false,
|
||||
'message' => 'Could not save the key'
|
||||
], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); // INTERNAL_SERVER_ERROR (500) being the HTTP response code
|
||||
}
|
||||
@@ -72,7 +73,7 @@ class Key extends REST_Controller {
|
||||
{
|
||||
// It doesn't appear the key exists
|
||||
$this->response([
|
||||
'status' => FALSE,
|
||||
'status' => false,
|
||||
'message' => 'Invalid API key'
|
||||
], REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code
|
||||
}
|
||||
@@ -82,7 +83,7 @@ class Key extends REST_Controller {
|
||||
|
||||
// Respond that the key was destroyed
|
||||
$this->response([
|
||||
'status' => TRUE,
|
||||
'status' => true,
|
||||
'message' => 'API key was deleted'
|
||||
], REST_Controller::HTTP_NO_CONTENT); // NO_CONTENT (204) being the HTTP response code
|
||||
}
|
||||
@@ -103,7 +104,7 @@ class Key extends REST_Controller {
|
||||
{
|
||||
// It doesn't appear the key exists
|
||||
$this->response([
|
||||
'status' => FALSE,
|
||||
'status' => false,
|
||||
'message' => 'Invalid API key'
|
||||
], REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code
|
||||
}
|
||||
@@ -112,14 +113,14 @@ class Key extends REST_Controller {
|
||||
if ($this->_update_key($key, ['level' => $new_level]))
|
||||
{
|
||||
$this->response([
|
||||
'status' => TRUE,
|
||||
'status' => true,
|
||||
'message' => 'API key was updated'
|
||||
], REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response([
|
||||
'status' => FALSE,
|
||||
'status' => false,
|
||||
'message' => 'Could not update the key level'
|
||||
], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); // INTERNAL_SERVER_ERROR (500) being the HTTP response code
|
||||
}
|
||||
@@ -140,7 +141,7 @@ class Key extends REST_Controller {
|
||||
{
|
||||
// It doesn't appear the key exists
|
||||
$this->response([
|
||||
'status' => FALSE,
|
||||
'status' => false,
|
||||
'message' => 'Invalid API key'
|
||||
], REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code
|
||||
}
|
||||
@@ -149,14 +150,14 @@ class Key extends REST_Controller {
|
||||
if ($this->_update_key($key, ['level' => 0]))
|
||||
{
|
||||
$this->response([
|
||||
'status' => TRUE,
|
||||
'status' => true,
|
||||
'message' => 'Key was suspended'
|
||||
], REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response([
|
||||
'status' => FALSE,
|
||||
'status' => false,
|
||||
'message' => 'Could not suspend the user'
|
||||
], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); // INTERNAL_SERVER_ERROR (500) being the HTTP response code
|
||||
}
|
||||
@@ -171,20 +172,20 @@ class Key extends REST_Controller {
|
||||
public function regenerate_post()
|
||||
{
|
||||
$old_key = $this->post('key');
|
||||
$key_details = $this->_get_key($old_key);
|
||||
$key_details = $this->__getKey($old_key);
|
||||
|
||||
// Does this key exist?
|
||||
if (!$key_details)
|
||||
{
|
||||
// It doesn't appear the key exists
|
||||
$this->response([
|
||||
'status' => FALSE,
|
||||
'status' => false,
|
||||
'message' => 'Invalid API key'
|
||||
], REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code
|
||||
}
|
||||
|
||||
// Build a new key
|
||||
$new_key = $this->_generate_key();
|
||||
$new_key = $this->__generateKey();
|
||||
|
||||
// Insert the new key
|
||||
if ($this->_insert_key($new_key, ['level' => $key_details->level, 'ignore_limits' => $key_details->ignore_limits]))
|
||||
@@ -193,14 +194,14 @@ class Key extends REST_Controller {
|
||||
$this->_update_key($old_key, ['level' => 0]);
|
||||
|
||||
$this->response([
|
||||
'status' => TRUE,
|
||||
'status' => true,
|
||||
'key' => $new_key
|
||||
], REST_Controller::HTTP_CREATED); // CREATED (201) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response([
|
||||
'status' => FALSE,
|
||||
'status' => false,
|
||||
'message' => 'Could not save the key'
|
||||
], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); // INTERNAL_SERVER_ERROR (500) being the HTTP response code
|
||||
}
|
||||
@@ -208,7 +209,13 @@ class Key extends REST_Controller {
|
||||
|
||||
/* Helper Methods */
|
||||
|
||||
private function _generate_key()
|
||||
/**
|
||||
* Generate a key
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
private function __generateKey()
|
||||
{
|
||||
do
|
||||
{
|
||||
@@ -216,9 +223,9 @@ class Key extends REST_Controller {
|
||||
$salt = base_convert(bin2hex($this->security->get_random_bytes(64)), 16, 36);
|
||||
|
||||
// If an error occurred, then fall back to the previous method
|
||||
if ($salt === FALSE)
|
||||
if ($salt === false)
|
||||
{
|
||||
$salt = hash('sha256', time() . mt_rand());
|
||||
$salt = hash('sha256', time().mt_rand());
|
||||
}
|
||||
|
||||
$new_key = substr($salt, 0, config_item('rest_key_length'));
|
||||
@@ -230,7 +237,14 @@ class Key extends REST_Controller {
|
||||
|
||||
/* Private Data Methods */
|
||||
|
||||
private function _get_key($key)
|
||||
/**
|
||||
* Get a key
|
||||
*
|
||||
* @access private
|
||||
* @param string $key The API-Key.
|
||||
* @return array
|
||||
*/
|
||||
private function __getKey($key)
|
||||
{
|
||||
return $this->db
|
||||
->where(config_item('rest_key_column'), $key)
|
||||
@@ -238,6 +252,13 @@ class Key extends REST_Controller {
|
||||
->row();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if key exists
|
||||
*
|
||||
* @access private
|
||||
* @param string $key The API-Key.
|
||||
* @return bool
|
||||
*/
|
||||
private function _key_exists($key)
|
||||
{
|
||||
return $this->db
|
||||
@@ -245,6 +266,14 @@ class Key extends REST_Controller {
|
||||
->count_all_results(config_item('rest_keys_table')) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a key
|
||||
*
|
||||
* @access private
|
||||
* @param string $key The API-Key.
|
||||
* @param array $data The API-Key-Data.
|
||||
* @return bool
|
||||
*/
|
||||
private function _insert_key($key, $data)
|
||||
{
|
||||
$data[config_item('rest_key_column')] = $key;
|
||||
@@ -255,6 +284,14 @@ class Key extends REST_Controller {
|
||||
->insert(config_item('rest_keys_table'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a key
|
||||
*
|
||||
* @access private
|
||||
* @param string $key The API-Key.
|
||||
* @param array $data The API-Key-Data.
|
||||
* @return bool
|
||||
*/
|
||||
private function _update_key($key, $data)
|
||||
{
|
||||
return $this->db
|
||||
@@ -262,6 +299,13 @@ class Key extends REST_Controller {
|
||||
->update(config_item('rest_keys_table'), $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a key
|
||||
*
|
||||
* @access private
|
||||
* @param string $key The API-Key.
|
||||
* @return bool
|
||||
*/
|
||||
private function _delete_key($key)
|
||||
{
|
||||
return $this->db
|
||||
@@ -11,17 +11,18 @@
|
||||
* @license MIT
|
||||
* @link https://github.com/chriskacerguis/codeigniter-restserver
|
||||
*/
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if (! defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
|
||||
require APPPATH . '/libraries/REST_Controller.php';
|
||||
require APPPATH.'/libraries/REST_Controller.php';
|
||||
|
||||
class Example extends REST_Controller {
|
||||
|
||||
/**
|
||||
* @copydoc REST_Controller::__construct()
|
||||
*/
|
||||
function __construct()
|
||||
class Example extends REST_Controller
|
||||
{
|
||||
/**
|
||||
* @copydoc REST_Controller::__construct()
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// Construct the parent class
|
||||
parent::__construct();
|
||||
@@ -33,6 +34,9 @@ class Example extends REST_Controller {
|
||||
$this->methods['user_delete']['limit'] = 50; // 50 requests per hour per user/key
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function users_get()
|
||||
{
|
||||
// Users from a data store e.g. database
|
||||
@@ -46,9 +50,9 @@ class Example extends REST_Controller {
|
||||
|
||||
// If the id parameter doesn't exist return all the users
|
||||
|
||||
if ($id === NULL)
|
||||
if ($id === null)
|
||||
{
|
||||
// Check if the users data store contains users (in case the database result returns NULL)
|
||||
// Check if the users data store contains users (in case the database result returns null)
|
||||
if ($users)
|
||||
{
|
||||
// Set the response and exit
|
||||
@@ -58,7 +62,7 @@ class Example extends REST_Controller {
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'status' => FALSE,
|
||||
'status' => false,
|
||||
'message' => 'No users were found'
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
@@ -66,19 +70,19 @@ class Example extends REST_Controller {
|
||||
|
||||
// Find and return a single record for a particular user.
|
||||
|
||||
$id = (int) $id;
|
||||
$id = (int)$id;
|
||||
|
||||
// Validate the id.
|
||||
if ($id <= 0)
|
||||
{
|
||||
// Invalid id, set the response and exit.
|
||||
$this->response(NULL, REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code
|
||||
$this->response(null, REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code
|
||||
}
|
||||
|
||||
// Get the user from the array, using the id as key for retreival.
|
||||
// Usually a model is to be used for this.
|
||||
|
||||
$user = NULL;
|
||||
$user = null;
|
||||
|
||||
if (!empty($users))
|
||||
{
|
||||
@@ -98,12 +102,15 @@ class Example extends REST_Controller {
|
||||
else
|
||||
{
|
||||
$this->set_response([
|
||||
'status' => FALSE,
|
||||
'status' => false,
|
||||
'message' => 'User could not be found'
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function users_post()
|
||||
{
|
||||
// $this->some_model->update_user( ... );
|
||||
@@ -117,15 +124,18 @@ class Example extends REST_Controller {
|
||||
$this->set_response($message, REST_Controller::HTTP_CREATED); // CREATED (201) being the HTTP response code
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function users_delete()
|
||||
{
|
||||
$id = (int) $this->get('id');
|
||||
$id = (int)$this->get('id');
|
||||
|
||||
// Validate the id.
|
||||
if ($id <= 0)
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response(NULL, REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code
|
||||
$this->response(null, REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code
|
||||
}
|
||||
|
||||
// $this->some_model->delete_something($id);
|
||||
@@ -134,7 +144,7 @@ class Example extends REST_Controller {
|
||||
'message' => 'Deleted the resource'
|
||||
];
|
||||
|
||||
$this->set_response($message, REST_Controller::HTTP_NO_CONTENT); // NO_CONTENT (204) being the HTTP response code
|
||||
// NO_CONTENT (204) being the HTTP response code
|
||||
$this->set_response($message, REST_Controller::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (! defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class Person extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Person API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('person/person_model');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function person_get()
|
||||
{
|
||||
//if(!$this->session_model->validate($this->get('session_id'), $this->get('device_id')))
|
||||
// $this->response(array(['success' => false, 'message' => 'access denied']), REST_Controller::HTTP_UNAUTHORIZED);
|
||||
|
||||
$code = $this->get('code');
|
||||
$person_id = $this->get('person_id');
|
||||
|
||||
if (! is_null($code))
|
||||
{
|
||||
$result = $this->person_model->getPersonByCode($code);
|
||||
}
|
||||
elseif (! is_null($person_id))
|
||||
{
|
||||
$result = $this->person_model->getPerson($person_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->person_model->getPerson();
|
||||
}
|
||||
|
||||
if ($result['err'])
|
||||
{
|
||||
$payload = [
|
||||
'success' => false,
|
||||
'message' => $result['msg'].': '.$result['retval']
|
||||
];
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
// return all available persons
|
||||
$payload = [
|
||||
'success' => true,
|
||||
'message' => 'Persons found'
|
||||
];
|
||||
$payload['data'] = $result;
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
}
|
||||
|
||||
if (empty($result))
|
||||
{
|
||||
$payload = [
|
||||
'success' => false,
|
||||
'message' => 'Person not found'
|
||||
];
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
// return all available persons
|
||||
$payload = [
|
||||
'success' => true,
|
||||
'message' => 'Persons found'
|
||||
];
|
||||
$payload['data'] = $result;
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
}
|
||||
// Set the response and exit
|
||||
$this->response($payload, $httpstatus);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function person_post()
|
||||
{
|
||||
$result = $this->person_model->savePerson($this->post());
|
||||
if ($result != false)
|
||||
{
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
$payload = [
|
||||
'success' => true,
|
||||
'message' => 'Person saved.'
|
||||
];
|
||||
$payload['data'] = $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
$payload = [
|
||||
'success' => false,
|
||||
'message' => 'Could not save person.'
|
||||
];
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
}
|
||||
$this->response($payload, $httpstatus);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function personUpdate_post()
|
||||
{
|
||||
$result = $this->person_model->updatePerson($this->post());
|
||||
if ($result != false)
|
||||
{
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
$payload = [
|
||||
'success' => true,
|
||||
'message' => 'Person updated.'
|
||||
];
|
||||
$payload['data'] = $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
$payload = [
|
||||
'success' => false,
|
||||
'message' => 'Could not update person.'
|
||||
];
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
}
|
||||
$this->response($payload, $httpstatus);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function checkBewerbung_get()
|
||||
{
|
||||
$result = $this->person_model->checkBewerbung($this->get("email"), $this->get("studiensemester_kurzbz"));
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
$payload = [
|
||||
'success' => true,
|
||||
'message' => 'Bewerbung exists.'
|
||||
];
|
||||
$payload['data'] = $result;
|
||||
$this->response($payload, $httpstatus);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function checkZugangscodePerson_get()
|
||||
{
|
||||
$result = $this->person_model->checkZugangscodePerson($this->get("code"));
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
if (!empty($result))
|
||||
{
|
||||
$payload = [
|
||||
'success' => true,
|
||||
'message' => 'Zugangscode exists.'
|
||||
];
|
||||
$payload['data'] = $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
$payload = [
|
||||
'success' => false,
|
||||
'message' => 'Zugangscode does not exist.'
|
||||
];
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
}
|
||||
|
||||
$this->response($payload, $httpstatus);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
|
||||
//require APPPATH . '/libraries/REST_Controller.php';
|
||||
|
||||
class API_Controller extends REST_Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
//$this->load->library('session'); -> autoload
|
||||
//$this->load->library('database'); -> autoload
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,7 +12,7 @@ class FHC_Controller extends CI_Controller
|
||||
|
||||
require_once APPPATH . '/libraries/REST_Controller.php';
|
||||
|
||||
class API_Controller extends REST_Controller
|
||||
class APIv1_Controller extends REST_Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class FHC_Model extends CI_Model
|
||||
{
|
||||
//protected errormsg;
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
@@ -31,12 +32,13 @@ class FHC_Model extends CI_Model
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function _general_error()
|
||||
protected function _general_error($retval = '', $message = FHC_ERR_GENERAL)
|
||||
{
|
||||
return array(
|
||||
'err' => 1,
|
||||
'code' => FHC_ERR_GENERAL,
|
||||
'msg' => lang('fhc_'.FHC_ERR_GENERAL)
|
||||
'msg' => lang('fhc_'.$message),
|
||||
'retval' => $retval
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,430 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-Helper
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016 fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link https://fhcomplete.org
|
||||
* @since Version 1.0.0
|
||||
* @filesource
|
||||
*/
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
//require_once 'include/basis.class.php';
|
||||
|
||||
/**
|
||||
* FHC-Auth Helpers
|
||||
*
|
||||
* @package FH-Complete
|
||||
* @subpackage Helpers
|
||||
* @category Helpers
|
||||
* @author FHC-Team
|
||||
* @link http://fhcomplete.org/user_guide/helpers/fhcauth_helper.html
|
||||
*/
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
//require_once('include/sprache.class.php');
|
||||
|
||||
class basis_db
|
||||
{
|
||||
protected $ci=null;
|
||||
protected $db_result=null;
|
||||
protected $errormsg=null;
|
||||
|
||||
public function __construct($ci)
|
||||
{
|
||||
$this->ci=$ci;
|
||||
}
|
||||
|
||||
public function db_connect()
|
||||
{
|
||||
$conn_str='host='.DB_HOST.' port='.DB_PORT.' dbname='.DB_NAME.' user='.DB_USER.' password='.DB_PASSWORD;
|
||||
//Connection Herstellen
|
||||
if (DB_CONNECT_PERSISTENT)
|
||||
{
|
||||
if(!basis_db::$db_conn = pg_pconnect($conn_str))
|
||||
die('Fehler beim Oeffnen der Datenbankverbindung');
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!basis_db::$db_conn = pg_connect($conn_str))
|
||||
die('Fehler beim Oeffnen der Datenbankverbindung');
|
||||
}
|
||||
}
|
||||
|
||||
public function db_query($sql)
|
||||
{
|
||||
if ($this->db_result=$this->ci->db->simple_query($sql))
|
||||
return $this->db_result;
|
||||
else
|
||||
{
|
||||
$this->errormsg.='Abfrage in Datenbank fehlgeschlagen! '.$this->db_last_error();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function db_num_rows($result=null)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_num_rows($this->db_result);
|
||||
else
|
||||
return pg_num_rows($result);
|
||||
}
|
||||
|
||||
public function db_fetch_object($result = null, $i=null)
|
||||
{
|
||||
if(is_null($result))
|
||||
{
|
||||
if(is_null($i))
|
||||
return pg_fetch_object($this->db_result);
|
||||
else
|
||||
return pg_fetch_object($this->db_result, $i);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(is_null($i))
|
||||
return pg_fetch_object($result);
|
||||
else
|
||||
return pg_fetch_object($result, $i);
|
||||
}
|
||||
}
|
||||
|
||||
public function db_fetch_row($result = null, $i=null)
|
||||
{
|
||||
if(is_null($result))
|
||||
{
|
||||
if(is_null($i))
|
||||
return pg_fetch_row($this->db_result);
|
||||
else
|
||||
return pg_fetch_row($this->db_result, $i);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(is_null($i))
|
||||
return pg_fetch_row($result);
|
||||
else
|
||||
return pg_fetch_row($result, $i);
|
||||
}
|
||||
}
|
||||
|
||||
public function db_fetch_assoc($result = null, $i=null)
|
||||
{
|
||||
if(is_null($result))
|
||||
{
|
||||
if(is_null($i))
|
||||
return pg_fetch_assoc($this->db_result);
|
||||
else
|
||||
return pg_fetch_assoc($this->db_result, $i);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(is_null($i))
|
||||
return pg_fetch_row($result);
|
||||
else
|
||||
return pg_fetch_row($result, $i);
|
||||
}
|
||||
}
|
||||
|
||||
public function db_result($result = null, $i,$item)
|
||||
{
|
||||
if(is_null($result))
|
||||
{
|
||||
return pg_result($this->db_result, $i,$item);
|
||||
}
|
||||
else
|
||||
{
|
||||
return pg_result($result, $i,$item);
|
||||
}
|
||||
}
|
||||
|
||||
public function db_getResultJSON($result = null)
|
||||
{
|
||||
$rows=array();
|
||||
if(is_null($result))
|
||||
{
|
||||
while($r = pg_fetch_assoc($this->db_result))
|
||||
$rows[] = $r;
|
||||
|
||||
//print json_encode($rows);
|
||||
}
|
||||
else
|
||||
{
|
||||
pg_result_seek($result, 0);
|
||||
//var_dump($result);
|
||||
while($r = pg_fetch_assoc($result))
|
||||
{
|
||||
$rows[] = $r;
|
||||
}
|
||||
|
||||
//print json_encode($rows);
|
||||
}
|
||||
return json_encode($rows);
|
||||
}
|
||||
|
||||
public function db_last_error()
|
||||
{
|
||||
return pg_last_error();
|
||||
}
|
||||
|
||||
public function db_affected_rows($result=null)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_affected_rows($this->db_result);
|
||||
else
|
||||
return pg_affected_rows($result);
|
||||
}
|
||||
|
||||
public function db_result_seek($result=null, $offset)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_result_seek($this->db_result, $offset);
|
||||
else
|
||||
return pg_result_seek($result, $offset);
|
||||
}
|
||||
|
||||
public function db_fetch_array($result=null)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_fetch_array($this->db_result);
|
||||
else
|
||||
return pg_fetch_array($result);
|
||||
}
|
||||
|
||||
public function db_num_fields($result=null)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_num_fields($this->db_result);
|
||||
else
|
||||
return pg_num_fields($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert den Feldnamen mit index i
|
||||
*/
|
||||
public function db_field_name($result=null, $i)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_field_name($this->db_result, $i);
|
||||
else
|
||||
return pg_field_name($result, $i);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gibt den Speicher wieder Frei.
|
||||
* (ist das sinnvoll wenn es per Value uebergeben wird??)
|
||||
*/
|
||||
public function db_free_result($result = null)
|
||||
{
|
||||
if(is_null($result))
|
||||
{
|
||||
return pg_free_result($this->db_result);
|
||||
}
|
||||
else
|
||||
{
|
||||
return pg_free_result($result);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert die aktuelle Datenbankversion
|
||||
*/
|
||||
public function db_version()
|
||||
{
|
||||
return pg_version(basis_db::$db_conn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Escaped Sonderzeichen in Variablen vor der Verwendung in SQL Statements
|
||||
* um SQL Injections zu verhindern
|
||||
*
|
||||
*/
|
||||
public function db_escape($var)
|
||||
{
|
||||
return pg_escape_string($var);
|
||||
}
|
||||
|
||||
/**
|
||||
* Null Value Handling und Hochkomma für Inserts / Updates
|
||||
* Wenn die Uebergebe Variable leer ist, wird ein String mit null
|
||||
* zurueckgeliefert, wenn nicht dann wird der string unter Hochkomma zurueckgeliefert
|
||||
* es sei denn qoute=false dann wird nur der String zurueckgeliefert
|
||||
*
|
||||
* @param $var String-Value fuer SQL Request
|
||||
* @return string
|
||||
*/
|
||||
public function db_null_value($var, $qoute=true)
|
||||
{
|
||||
if($qoute)
|
||||
return ($var!==''?$this->db_qoute($var):'null');
|
||||
else
|
||||
return ($var!==''?$var:'null');
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt einen String unter Hochkomma
|
||||
* @param $var Value fuer Insert/Update
|
||||
* @return value unter Hochkomma
|
||||
*/
|
||||
public function db_qoute($var)
|
||||
{
|
||||
return "'".$var."'";
|
||||
}
|
||||
|
||||
/**
|
||||
* Escaped einen Parameter fuer die Verwendung in Insert/Update SQL Befehlen
|
||||
* Es werden abhaengig vom Typ Hochkomma oder Null hinzugefuegt
|
||||
* @param $var Value der gesetzt werden soll
|
||||
* @param $type Typ des Values (FHC_STRING | FHC_BOOLEAN | FHC_INTEGER | ...)
|
||||
* @param $nullable boolean gibt an ob das Feld NULL sein darf. Wenn true wird
|
||||
* NULL statt einem Leerstring zurueckgeliefert
|
||||
* @return Escapter Value inklusive Hochkomma wenn noetig
|
||||
*
|
||||
* Verwendungsbeispiel:
|
||||
* Update tbl_person set nachname=$this->db_add_param($var)
|
||||
* Update tbl_person set aktiv=$this->db_add_param($var, FHC_BOOL, false)
|
||||
* Update tbl_person set anzahlkinder=$this->db_add_param($var, FHC_INT)
|
||||
*/
|
||||
public function db_add_param($var, $type=FHC_STRING, $nullable=true)
|
||||
{
|
||||
if(($var==='' || is_null($var)) && $type!=FHC_BOOLEAN)
|
||||
{
|
||||
if($nullable)
|
||||
return 'null';
|
||||
else
|
||||
return "''";
|
||||
}
|
||||
|
||||
switch($type)
|
||||
{
|
||||
case FHC_INTEGER:
|
||||
$var = $this->db_escape($var);
|
||||
if(!is_numeric($var) && $var!=='')
|
||||
die('Invalid Integer Parameter detected:'.$var);
|
||||
$var = $this->db_null_value($var, false);
|
||||
break;
|
||||
|
||||
case FHC_LANG_ARRAY:
|
||||
|
||||
$sprache = new sprache();
|
||||
$sprache->getAll(true);
|
||||
$buf = $var;
|
||||
$var = array();
|
||||
$languages = $sprache->getAllIndexesSorted();
|
||||
|
||||
foreach($languages as $sk => $sp)
|
||||
{
|
||||
if(!$sp || !isset($buf[$sp]))
|
||||
$var[$sk] = "";
|
||||
else
|
||||
$var[$sk] = $this->db_escape($buf[$sp]);
|
||||
}
|
||||
$var = str_replace('\\', '\\\\', $var);
|
||||
$var = str_replace('"', '\\\"', $var);
|
||||
$var = '\'{"' . join('","', $var) . '"}\'';
|
||||
|
||||
break;
|
||||
|
||||
case FHC_BOOLEAN:
|
||||
if($var===true)
|
||||
$var='true';
|
||||
elseif($var===false)
|
||||
$var='false';
|
||||
elseif($var=='' && $nullable)
|
||||
$var = 'null';
|
||||
else
|
||||
die('Invalid Boolean Parameter detected');
|
||||
break;
|
||||
|
||||
case FHC_STRING:
|
||||
default:
|
||||
$var = $this->db_escape($var);
|
||||
$var = $this->db_null_value($var);
|
||||
break;
|
||||
}
|
||||
return $var;
|
||||
}
|
||||
|
||||
/**
|
||||
* Erzeugt aus einem DB-Result-Boolean einen PHP Boolean
|
||||
*/
|
||||
public function db_parse_bool($var)
|
||||
{
|
||||
if($var=='t')
|
||||
return true;
|
||||
elseif($var=='f')
|
||||
return false;
|
||||
elseif($var=='')
|
||||
return '';
|
||||
else
|
||||
die('Invalid DB Boolean. Wrong DB-Engine?');
|
||||
}
|
||||
|
||||
/**
|
||||
* Bereitet ein Array von Elementen auf, damit es in der IN-Klausel eines
|
||||
* Select Befehls verwendet werden kann.
|
||||
*/
|
||||
public function db_implode4SQL($array)
|
||||
{
|
||||
$string = '';
|
||||
foreach($array as $row)
|
||||
{
|
||||
if($string!='')
|
||||
$string.=',';
|
||||
$string.=$this->db_add_param($row);
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Erstellt aus einem DB Array ein PHP Array
|
||||
* @param $var DB Result Array Spalte
|
||||
* @return php array
|
||||
*/
|
||||
public function db_parse_array($var)
|
||||
{
|
||||
if ($var == '')
|
||||
return;
|
||||
preg_match_all('/(?<=^\{|,)(([^,"{]*)|\s*"((?:[^"\\\\]|\\\\(?:.|[0-9]+|x[0-9a-f]+))*)"\s*)(,|(?<!^\{)(?=\}$))/i', $var, $matches, PREG_SET_ORDER);
|
||||
$values = array();
|
||||
foreach ($matches as $match)
|
||||
{
|
||||
$values[] = $match[3] != '' ? stripcslashes($match[3]) : (strtolower($match[2]) == 'null' ? null : $match[2]);
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Erstellt aus einem DB Array ein PHP Array
|
||||
* @param $var DB Result Array Spalte
|
||||
* @return php array
|
||||
*/
|
||||
public function db_parse_lang_array($var)
|
||||
{
|
||||
|
||||
if ($var == '')
|
||||
return;
|
||||
preg_match_all('/(?<=^\{|,)(([^,"{]*)|\s*"((?:[^"\\\\]|\\\\(?:.|[0-9]+|x[0-9a-f]+))*)"\s*)(,|(?<!^\{)(?=\}$))/i', $var, $matches, PREG_SET_ORDER);
|
||||
$values = array();
|
||||
|
||||
$sprache = new sprache();
|
||||
$sprache->loadIndexArray();
|
||||
|
||||
$sprache = new sprache();
|
||||
$sprache->getAll(true);
|
||||
$languages = $sprache->getAllIndexesSorted();
|
||||
|
||||
|
||||
foreach ($matches as $mk => $match)
|
||||
{
|
||||
$values[$languages[$mk+1]] = $match[3] != '' ? stripcslashes($match[3]) : (strtolower($match[2]) == 'null' ? null : $match[2]);
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
}
|
||||
|
||||
function indexSort($a, $b)
|
||||
{
|
||||
return strcmp($a->index, $b->index);
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
* @filesource
|
||||
*/
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
require_once 'include/authentication.class.php';
|
||||
require_once FCPATH.'include/authentication.class.php';
|
||||
|
||||
/**
|
||||
* FHC-Auth Helpers
|
||||
@@ -39,12 +39,12 @@ class FHC_Auth
|
||||
$auth = new authentication();
|
||||
if ($auth->checkpassword($username, $password))
|
||||
{
|
||||
echo 'Auth-Method-True';
|
||||
//echo 'Auth-Method-True';
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Auth-Method-False';
|
||||
//echo 'Auth-Method-False';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ abstract class REST_Controller extends CI_Controller {
|
||||
$language = $this->config->item('rest_language');
|
||||
if ($language === NULL)
|
||||
{
|
||||
$language = 'english';
|
||||
$language = 'en-US';
|
||||
}
|
||||
|
||||
// Load the language file
|
||||
|
||||
@@ -6,15 +6,31 @@ class Migration_Init extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
//$this->load->database('system');
|
||||
$this->load->database('system');
|
||||
// Schemas
|
||||
//$this->db->query('CREATE SCHEMA IF NOT EXISTS gis;');
|
||||
|
||||
$this->db->query('CREATE SCHEMA IF NOT EXISTS public;');
|
||||
$this->db->query('CREATE SCHEMA IF NOT EXISTS addon;');
|
||||
$this->db->query('CREATE SCHEMA IF NOT EXISTS fue;');
|
||||
$this->db->query('CREATE SCHEMA IF NOT EXISTS lehre;');
|
||||
$this->db->query('CREATE SCHEMA IF NOT EXISTS system;');
|
||||
$this->db->query('CREATE SCHEMA IF NOT EXISTS bis;');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
//$this->db->query('DROP SCHEMA IF EXISTS gis;');
|
||||
/* $this->db->query('
|
||||
DROP SCHEMA IF EXISTS addon;
|
||||
DROP SCHEMA IF EXISTS bis;
|
||||
DROP SCHEMA IF EXISTS campus;
|
||||
DROP SCHEMA IF EXISTS fue;
|
||||
DROP SCHEMA IF EXISTS kommune;
|
||||
DROP SCHEMA IF EXISTS lehre;
|
||||
DROP SCHEMA IF EXISTS public;
|
||||
DROP SCHEMA IF EXISTS sync;
|
||||
DROP SCHEMA IF EXISTS system;
|
||||
DROP SCHEMA IF EXISTS testtool;
|
||||
DROP SCHEMA IF EXISTS wawi;
|
||||
');*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,26 +5,20 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
class Migration_fhc30 extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
//$this->load->helper('file');
|
||||
require_once(FCPATH.'include/basis_db.class.php');
|
||||
$db = new basis_db();
|
||||
//$db = $this->db;
|
||||
//$db->db_query = $this->db->simple_query;
|
||||
{
|
||||
echo '<br/><h1>Update to FHC 3.0</h1><br/>';
|
||||
$this->db=$this->load->database('system', true);
|
||||
$this->load->helper('fhcdb');
|
||||
$db = new basis_db($this);
|
||||
require_once('./system/dbupdate_3.0.php');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
/*$this->db->simple_query('DROP SCHEMA bis;');
|
||||
$this->db->simple_query('DROP SCHEMA campus;');
|
||||
$this->db->simple_query('DROP SCHEMA fue;');
|
||||
$this->db->simple_query('DROP SCHEMA kommune;');
|
||||
$this->db->simple_query('DROP SCHEMA lehre;');
|
||||
$this->db->simple_query('DROP SCHEMA sync;');
|
||||
$this->db->simple_query('DROP SCHEMA system;');
|
||||
$this->db->simple_query('DROP SCHEMA testtool;');
|
||||
$this->db->simple_query('DROP SCHEMA wawi;');*/
|
||||
/*$this->db->simple_query('DROP TABLE fue.tbl_scrumteam;');
|
||||
$this->db->simple_query('DROP TABLE lehre.tbl_studienordnung;');
|
||||
$this->db->simple_query('DROP TABLE lehre.tbl_studienordnung_semester;');
|
||||
$this->db->simple_query('DROP TABLE lehre.tbl_studienplan;');*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,17 +6,11 @@ class Migration_fhc31 extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
//$this->load->database('system');
|
||||
if (!$this->db->table_exists('tbl_person'))
|
||||
{
|
||||
$this->load->helper('file');
|
||||
$sqlfile = read_file('./system/fhcomplete3.0.sql');
|
||||
|
||||
if (!$this->db->simple_query($sqlfile))
|
||||
{
|
||||
echo "Error creating Basis DB-Schema!";
|
||||
}
|
||||
}
|
||||
echo '<br/><h1>Update to FHC 3.1</h1><br/>';
|
||||
$this->db=$this->load->database('system', true);
|
||||
$this->load->helper('fhcdb');
|
||||
$db = new basis_db($this);
|
||||
require_once('./system/dbupdate_3.1.php');
|
||||
}
|
||||
|
||||
public function down()
|
||||
|
||||
@@ -6,17 +6,11 @@ class Migration_fhc32 extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
//$this->load->database('system');
|
||||
if (!$this->db->table_exists('tbl_person'))
|
||||
{
|
||||
$this->load->helper('file');
|
||||
$sqlfile = read_file('./system/fhcomplete3.0.sql');
|
||||
|
||||
if (!$this->db->simple_query($sqlfile))
|
||||
{
|
||||
echo "Error creating Basis DB-Schema!";
|
||||
}
|
||||
}
|
||||
echo '<br/><h1>Update to FHC 3.2</h1><br/>';
|
||||
$this->db=$this->load->database('system', true);
|
||||
$this->load->helper('fhcdb');
|
||||
$db = new basis_db($this);
|
||||
require_once('./system/dbupdate_3.2.php');
|
||||
}
|
||||
|
||||
public function down()
|
||||
|
||||
@@ -0,0 +1,592 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP grocery CRUD
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* Grocery CRUD is released with dual licensing, using the GPL v3 (license-gpl3.txt) and the MIT license (license-mit.txt).
|
||||
* You don't have to do anything special to choose one license or the other and you don't have to notify anyone which license you are using.
|
||||
* Please see the corresponding license file for details of these licenses.
|
||||
* You are free to use, modify and distribute this software, but all copyright information must remain.
|
||||
*
|
||||
* @package grocery CRUD
|
||||
* @copyright Copyright (c) 2010 through 2012, John Skoumbourdis
|
||||
* @license https://github.com/scoumbourdis/grocery-crud/blob/master/license-grocery-crud.txt
|
||||
* @version 1.4.2
|
||||
* @author John Skoumbourdis <scoumbourdisj@gmail.com>
|
||||
*/
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Grocery CRUD Model
|
||||
*
|
||||
*
|
||||
* @package grocery CRUD
|
||||
* @author John Skoumbourdis <scoumbourdisj@gmail.com>
|
||||
* @version 1.5.4
|
||||
* @link http://www.grocerycrud.com/documentation
|
||||
*/
|
||||
class Grocery_crud_model extends CI_Model {
|
||||
|
||||
protected $primary_key = null;
|
||||
protected $table_name = null;
|
||||
protected $relation = array();
|
||||
protected $relation_n_n = array();
|
||||
protected $primary_keys = array();
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function db_table_exists($table_name = null)
|
||||
{
|
||||
return $this->db->table_exists($table_name);
|
||||
}
|
||||
|
||||
function get_list()
|
||||
{
|
||||
if($this->table_name === null)
|
||||
return false;
|
||||
|
||||
$select = "{$this->table_name}.*";
|
||||
|
||||
//set_relation special queries
|
||||
if(!empty($this->relation))
|
||||
{
|
||||
foreach($this->relation as $relation)
|
||||
{
|
||||
list($field_name , $related_table , $related_field_title) = $relation;
|
||||
$unique_join_name = $this->_unique_join_name($field_name);
|
||||
$unique_field_name = $this->_unique_field_name($field_name);
|
||||
|
||||
if(strstr($related_field_title,'{'))
|
||||
{
|
||||
$related_field_title = str_replace(" "," ",$related_field_title);
|
||||
$select .= ", CONCAT('".str_replace(array('{','}'),array("',COALESCE({$unique_join_name}.",", ''),'"),str_replace("'","\\'",$related_field_title))."') as $unique_field_name";
|
||||
}
|
||||
else
|
||||
{
|
||||
$select .= ", $unique_join_name.$related_field_title AS $unique_field_name";
|
||||
}
|
||||
|
||||
if($this->field_exists($related_field_title))
|
||||
$select .= ", {$this->table_name}.$related_field_title AS {$this->table_name}.$related_field_title";
|
||||
}
|
||||
}
|
||||
|
||||
//set_relation_n_n special queries. We prefer sub queries from a simple join for the relation_n_n as it is faster and more stable on big tables.
|
||||
if(!empty($this->relation_n_n))
|
||||
{
|
||||
$select = $this->relation_n_n_queries($select);
|
||||
}
|
||||
|
||||
$this->db->select($select, false);
|
||||
|
||||
$results = $this->db->get($this->table_name)->result();
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
public function get_row($table_name = null)
|
||||
{
|
||||
$table_name = $table_name === null ? $this->table_name : $table_name;
|
||||
|
||||
return $this->db->get($table_name)->row();
|
||||
}
|
||||
|
||||
public function set_primary_key($field_name, $table_name = null)
|
||||
{
|
||||
$table_name = $table_name === null ? $this->table_name : $table_name;
|
||||
|
||||
$this->primary_keys[$table_name] = $field_name;
|
||||
}
|
||||
|
||||
protected function relation_n_n_queries($select)
|
||||
{
|
||||
$this_table_primary_key = $this->get_primary_key();
|
||||
foreach($this->relation_n_n as $relation_n_n)
|
||||
{
|
||||
list($field_name, $relation_table, $selection_table, $primary_key_alias_to_this_table,
|
||||
$primary_key_alias_to_selection_table, $title_field_selection_table, $priority_field_relation_table) = array_values((array)$relation_n_n);
|
||||
|
||||
$primary_key_selection_table = $this->get_primary_key($selection_table);
|
||||
|
||||
$field = "";
|
||||
$use_template = strpos($title_field_selection_table,'{') !== false;
|
||||
$field_name_hash = $this->_unique_field_name($title_field_selection_table);
|
||||
if($use_template)
|
||||
{
|
||||
$title_field_selection_table = str_replace(" ", " ", $title_field_selection_table);
|
||||
$field .= "CONCAT('".str_replace(array('{','}'),array("',COALESCE(",", ''),'"),str_replace("'","\\'",$title_field_selection_table))."')";
|
||||
}
|
||||
else
|
||||
{
|
||||
$field .= "$selection_table.$title_field_selection_table";
|
||||
}
|
||||
|
||||
//Sorry Codeigniter but you cannot help me with the subquery!
|
||||
$select .= ", (SELECT GROUP_CONCAT(DISTINCT $field) FROM $selection_table "
|
||||
."LEFT JOIN $relation_table ON $relation_table.$primary_key_alias_to_selection_table = $selection_table.$primary_key_selection_table "
|
||||
."WHERE $relation_table.$primary_key_alias_to_this_table = `{$this->table_name}`.$this_table_primary_key GROUP BY $relation_table.$primary_key_alias_to_this_table) AS $field_name";
|
||||
}
|
||||
|
||||
return $select;
|
||||
}
|
||||
|
||||
function order_by($order_by , $direction)
|
||||
{
|
||||
$this->db->order_by( $order_by , $direction );
|
||||
}
|
||||
|
||||
function where($key, $value = NULL, $escape = TRUE)
|
||||
{
|
||||
$this->db->where( $key, $value, $escape);
|
||||
}
|
||||
|
||||
function or_where($key, $value = NULL, $escape = TRUE)
|
||||
{
|
||||
$this->db->or_where( $key, $value, $escape);
|
||||
}
|
||||
|
||||
function having($key, $value = NULL, $escape = TRUE)
|
||||
{
|
||||
$this->db->having( $key, $value, $escape);
|
||||
}
|
||||
|
||||
function or_having($key, $value = NULL, $escape = TRUE)
|
||||
{
|
||||
$this->db->or_having( $key, $value, $escape);
|
||||
}
|
||||
|
||||
function like($field, $match = '', $side = 'both')
|
||||
{
|
||||
$this->db->like($field, $match, $side);
|
||||
}
|
||||
|
||||
function or_like($field, $match = '', $side = 'both')
|
||||
{
|
||||
$this->db->or_like($field, $match, $side);
|
||||
}
|
||||
|
||||
function limit($value, $offset = '')
|
||||
{
|
||||
$this->db->limit( $value , $offset );
|
||||
}
|
||||
|
||||
function get_total_results()
|
||||
{
|
||||
//set_relation_n_n special queries. We prefer sub queries from a simple join for the relation_n_n as it is faster and more stable on big tables.
|
||||
if(!empty($this->relation_n_n))
|
||||
{
|
||||
$select = "{$this->table_name}.*";
|
||||
$select = $this->relation_n_n_queries($select);
|
||||
|
||||
$this->db->select($select,false);
|
||||
}
|
||||
|
||||
return $this->db->get($this->table_name)->num_rows();
|
||||
}
|
||||
|
||||
function set_basic_table($table_name = null)
|
||||
{
|
||||
if( !($this->db->table_exists($table_name)) )
|
||||
return false;
|
||||
|
||||
$this->table_name = $table_name;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function get_edit_values($primary_key_value)
|
||||
{
|
||||
$primary_key_field = $this->get_primary_key();
|
||||
$this->db->where($primary_key_field,$primary_key_value);
|
||||
$result = $this->db->get($this->table_name)->row();
|
||||
return $result;
|
||||
}
|
||||
|
||||
function join_relation($field_name , $related_table , $related_field_title)
|
||||
{
|
||||
$related_primary_key = $this->get_primary_key($related_table);
|
||||
|
||||
if($related_primary_key !== false)
|
||||
{
|
||||
$unique_name = $this->_unique_join_name($field_name);
|
||||
$this->db->join( $related_table.' as '.$unique_name , "$unique_name.$related_primary_key = {$this->table_name}.$field_name",'left');
|
||||
|
||||
$this->relation[$field_name] = array($field_name , $related_table , $related_field_title);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function set_relation_n_n_field($field_info)
|
||||
{
|
||||
$this->relation_n_n[$field_info->field_name] = $field_info;
|
||||
}
|
||||
|
||||
protected function _unique_join_name($field_name)
|
||||
{
|
||||
return 'j'.substr(md5($field_name),0,8); //This j is because is better for a string to begin with a letter and not with a number
|
||||
}
|
||||
|
||||
protected function _unique_field_name($field_name)
|
||||
{
|
||||
return 's'.substr(md5($field_name),0,8); //This s is because is better for a string to begin with a letter and not with a number
|
||||
}
|
||||
|
||||
function get_relation_array($field_name , $related_table , $related_field_title, $where_clause, $order_by, $limit = null, $search_like = null)
|
||||
{
|
||||
$relation_array = array();
|
||||
$field_name_hash = $this->_unique_field_name($field_name);
|
||||
|
||||
$related_primary_key = $this->get_primary_key($related_table);
|
||||
|
||||
$select = "$related_table.$related_primary_key, ";
|
||||
|
||||
if(strstr($related_field_title,'{'))
|
||||
{
|
||||
$related_field_title = str_replace(" ", " ", $related_field_title);
|
||||
$select .= "CONCAT('".str_replace(array('{','}'),array("',COALESCE(",", ''),'"),str_replace("'","\\'",$related_field_title))."') as $field_name_hash";
|
||||
}
|
||||
else
|
||||
{
|
||||
$select .= "$related_table.$related_field_title as $field_name_hash";
|
||||
}
|
||||
|
||||
$this->db->select($select,false);
|
||||
if($where_clause !== null)
|
||||
$this->db->where($where_clause);
|
||||
|
||||
if($where_clause !== null)
|
||||
$this->db->where($where_clause);
|
||||
|
||||
if($limit !== null)
|
||||
$this->db->limit($limit);
|
||||
|
||||
if($search_like !== null)
|
||||
$this->db->having("$field_name_hash LIKE '%".$this->db->escape_like_str($search_like)."%'");
|
||||
|
||||
$order_by !== null
|
||||
? $this->db->order_by($order_by)
|
||||
: $this->db->order_by($field_name_hash);
|
||||
|
||||
$results = $this->db->get($related_table)->result();
|
||||
|
||||
foreach($results as $row)
|
||||
{
|
||||
$relation_array[$row->$related_primary_key] = $row->$field_name_hash;
|
||||
}
|
||||
|
||||
return $relation_array;
|
||||
}
|
||||
|
||||
function get_ajax_relation_array($search, $field_name , $related_table , $related_field_title, $where_clause, $order_by)
|
||||
{
|
||||
return $this->get_relation_array($field_name , $related_table , $related_field_title, $where_clause, $order_by, 10 , $search);
|
||||
}
|
||||
|
||||
function get_relation_total_rows($field_name , $related_table , $related_field_title, $where_clause)
|
||||
{
|
||||
if($where_clause !== null)
|
||||
$this->db->where($where_clause);
|
||||
|
||||
return $this->db->count_all_results($related_table);
|
||||
}
|
||||
|
||||
function get_relation_n_n_selection_array($primary_key_value, $field_info)
|
||||
{
|
||||
$select = "";
|
||||
$related_field_title = $field_info->title_field_selection_table;
|
||||
$use_template = strpos($related_field_title,'{') !== false;;
|
||||
$field_name_hash = $this->_unique_field_name($related_field_title);
|
||||
if($use_template)
|
||||
{
|
||||
$related_field_title = str_replace(" ", " ", $related_field_title);
|
||||
$select .= "CONCAT('".str_replace(array('{','}'),array("',COALESCE(",", ''),'"),str_replace("'","\\'",$related_field_title))."') as $field_name_hash";
|
||||
}
|
||||
else
|
||||
{
|
||||
$select .= "$related_field_title as $field_name_hash";
|
||||
}
|
||||
$this->db->select('*, '.$select,false);
|
||||
|
||||
$selection_primary_key = $this->get_primary_key($field_info->selection_table);
|
||||
|
||||
if(empty($field_info->priority_field_relation_table))
|
||||
{
|
||||
if(!$use_template){
|
||||
$this->db->order_by("{$field_info->selection_table}.{$field_info->title_field_selection_table}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->order_by("{$field_info->relation_table}.{$field_info->priority_field_relation_table}");
|
||||
}
|
||||
$this->db->where($field_info->primary_key_alias_to_this_table, $primary_key_value);
|
||||
$this->db->join(
|
||||
$field_info->selection_table,
|
||||
"{$field_info->relation_table}.{$field_info->primary_key_alias_to_selection_table} = {$field_info->selection_table}.{$selection_primary_key}"
|
||||
);
|
||||
$results = $this->db->get($field_info->relation_table)->result();
|
||||
|
||||
$results_array = array();
|
||||
foreach($results as $row)
|
||||
{
|
||||
$results_array[$row->{$field_info->primary_key_alias_to_selection_table}] = $row->{$field_name_hash};
|
||||
}
|
||||
|
||||
return $results_array;
|
||||
}
|
||||
|
||||
function get_relation_n_n_unselected_array($field_info, $selected_values)
|
||||
{
|
||||
$use_where_clause = !empty($field_info->where_clause);
|
||||
|
||||
$select = "";
|
||||
$related_field_title = $field_info->title_field_selection_table;
|
||||
$use_template = strpos($related_field_title,'{') !== false;
|
||||
$field_name_hash = $this->_unique_field_name($related_field_title);
|
||||
|
||||
if($use_template)
|
||||
{
|
||||
$related_field_title = str_replace(" ", " ", $related_field_title);
|
||||
$select .= "CONCAT('".str_replace(array('{','}'),array("',COALESCE(",", ''),'"),str_replace("'","\\'",$related_field_title))."') as $field_name_hash";
|
||||
}
|
||||
else
|
||||
{
|
||||
$select .= "$related_field_title as $field_name_hash";
|
||||
}
|
||||
$this->db->select('*, '.$select,false);
|
||||
|
||||
if($use_where_clause){
|
||||
$this->db->where($field_info->where_clause);
|
||||
}
|
||||
|
||||
$selection_primary_key = $this->get_primary_key($field_info->selection_table);
|
||||
if(!$use_template)
|
||||
$this->db->order_by("{$field_info->selection_table}.{$field_info->title_field_selection_table}");
|
||||
$results = $this->db->get($field_info->selection_table)->result();
|
||||
|
||||
$results_array = array();
|
||||
foreach($results as $row)
|
||||
{
|
||||
if(!isset($selected_values[$row->$selection_primary_key]))
|
||||
$results_array[$row->$selection_primary_key] = $row->{$field_name_hash};
|
||||
}
|
||||
|
||||
return $results_array;
|
||||
}
|
||||
|
||||
function db_relation_n_n_update($field_info, $post_data ,$main_primary_key)
|
||||
{
|
||||
$this->db->where($field_info->primary_key_alias_to_this_table, $main_primary_key);
|
||||
if(!empty($post_data))
|
||||
$this->db->where_not_in($field_info->primary_key_alias_to_selection_table , $post_data);
|
||||
$this->db->delete($field_info->relation_table);
|
||||
|
||||
$counter = 0;
|
||||
if(!empty($post_data))
|
||||
{
|
||||
foreach($post_data as $primary_key_value)
|
||||
{
|
||||
$where_array = array(
|
||||
$field_info->primary_key_alias_to_this_table => $main_primary_key,
|
||||
$field_info->primary_key_alias_to_selection_table => $primary_key_value,
|
||||
);
|
||||
|
||||
$this->db->where($where_array);
|
||||
$count = $this->db->from($field_info->relation_table)->count_all_results();
|
||||
|
||||
if($count == 0)
|
||||
{
|
||||
if(!empty($field_info->priority_field_relation_table))
|
||||
$where_array[$field_info->priority_field_relation_table] = $counter;
|
||||
|
||||
$this->db->insert($field_info->relation_table, $where_array);
|
||||
|
||||
}elseif($count >= 1 && !empty($field_info->priority_field_relation_table))
|
||||
{
|
||||
$this->db->update( $field_info->relation_table, array($field_info->priority_field_relation_table => $counter) , $where_array);
|
||||
}
|
||||
|
||||
$counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function db_relation_n_n_delete($field_info, $main_primary_key)
|
||||
{
|
||||
$this->db->where($field_info->primary_key_alias_to_this_table, $main_primary_key);
|
||||
$this->db->delete($field_info->relation_table);
|
||||
}
|
||||
|
||||
function get_field_types_basic_table()
|
||||
{
|
||||
$db_field_types = array();
|
||||
foreach($this->db->query('SELECT column_name AS "Field", data_type AS "Type",
|
||||
CASE WHEN indisprimary THEN '."'PRI'".' WHEN indisunique THEN '."'UNI'".' ELSE null END AS "Key", is_nullable AS "Null", NULL AS "Extra"
|
||||
FROM information_schema.columns
|
||||
JOIN pg_namespace ON (table_schema=nspname)
|
||||
JOIN pg_class ON (pg_class.relnamespace = pg_namespace.oid AND pg_class.oid = table_name::regclass)
|
||||
JOIN pg_attribute ON (pg_attribute.attrelid = pg_class.oid AND attname=column_name)
|
||||
LEFT JOIN pg_index ON (indrelid = pg_class.oid AND
|
||||
pg_attribute.attnum = any(pg_index.indkey))
|
||||
WHERE table_name = '."'{$this->table_name}'")->result() as $db_field_type)
|
||||
{
|
||||
$type = explode("(",$db_field_type->Type);
|
||||
$db_type = $type[0];
|
||||
|
||||
if(isset($type[1]))
|
||||
{
|
||||
if(substr($type[1],-1) == ')')
|
||||
{
|
||||
$length = substr($type[1],0,-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
list($length) = explode(" ",$type[1]);
|
||||
$length = substr($length,0,-1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$length = '';
|
||||
}
|
||||
$db_field_types[$db_field_type->Field]['db_max_length'] = $length;
|
||||
$db_field_types[$db_field_type->Field]['db_type'] = $db_type;
|
||||
$db_field_types[$db_field_type->Field]['db_null'] = $db_field_type->Null == 'YES' ? true : false;
|
||||
$db_field_types[$db_field_type->Field]['db_extra'] = $db_field_type->Extra;
|
||||
$db_field_types[$db_field_type->Field]['db_key'] = $db_field_type->Key;
|
||||
$db_field_types[$db_field_type->Field]['primary_key'] = $db_field_type->Key == 'PRI' ? 1 : 0;
|
||||
}
|
||||
|
||||
$results = $this->db->field_data($this->table_name);
|
||||
foreach($results as $num => $row)
|
||||
{
|
||||
$row = (array)$row;
|
||||
$results[$num] = (object)( array_merge($row, $db_field_types[$row['name']]) );
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
function get_field_types($table_name)
|
||||
{
|
||||
$results = $this->db->field_data($table_name);
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
function db_update($post_array, $primary_key_value)
|
||||
{
|
||||
$primary_key_field = $this->get_primary_key();
|
||||
return $this->db->update($this->table_name,$post_array, array( $primary_key_field => $primary_key_value));
|
||||
}
|
||||
|
||||
function db_insert($post_array)
|
||||
{
|
||||
$insert = $this->db->insert($this->table_name,$post_array);
|
||||
if($insert)
|
||||
{
|
||||
return $this->db->insert_id();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function db_delete($primary_key_value)
|
||||
{
|
||||
$primary_key_field = $this->get_primary_key();
|
||||
|
||||
if($primary_key_field === false)
|
||||
return false;
|
||||
|
||||
$this->db->limit(1);
|
||||
$this->db->delete($this->table_name,array( $primary_key_field => $primary_key_value));
|
||||
if( $this->db->affected_rows() != 1)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
function db_file_delete($field_name, $filename)
|
||||
{
|
||||
if( $this->db->update($this->table_name,array($field_name => ''),array($field_name => $filename)) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function field_exists($field,$table_name = null)
|
||||
{
|
||||
if(empty($table_name))
|
||||
{
|
||||
$table_name = $this->table_name;
|
||||
}
|
||||
return $this->db->field_exists($field,$table_name);
|
||||
}
|
||||
|
||||
function get_primary_key($table_name = null)
|
||||
{
|
||||
if($table_name == null)
|
||||
{
|
||||
if(isset($this->primary_keys[$this->table_name]))
|
||||
{
|
||||
return $this->primary_keys[$this->table_name];
|
||||
}
|
||||
|
||||
if(empty($this->primary_key))
|
||||
{
|
||||
$fields = $this->get_field_types_basic_table();
|
||||
|
||||
foreach($fields as $field)
|
||||
{
|
||||
if($field->primary_key == 1)
|
||||
{
|
||||
return $field->name;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->primary_key;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($this->primary_keys[$table_name]))
|
||||
{
|
||||
return $this->primary_keys[$table_name];
|
||||
}
|
||||
|
||||
$fields = $this->get_field_types($table_name);
|
||||
|
||||
foreach($fields as $field)
|
||||
{
|
||||
/*if($field->primary_key == 1)
|
||||
{
|
||||
return $field->name;
|
||||
}*/
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function escape_str($value)
|
||||
{
|
||||
return $this->db->escape_str($value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,703 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Message_model extends DB_Model
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
require_once APPPATH.'config/message.php';
|
||||
//$this->load->helper('language');
|
||||
$this->lang->load('message');
|
||||
}
|
||||
|
||||
/** -----------------------------------------------------------------
|
||||
* get_message() - will return a single message, including the status for specified user.
|
||||
*
|
||||
* @param integer $msg_id EQUIRED
|
||||
* @param integer $user_id REQUIRED
|
||||
* @return array
|
||||
*/
|
||||
function getMessage($msg_id, $user_id)
|
||||
{
|
||||
// Validate
|
||||
if (empty($msg_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_MSG_ID);
|
||||
}
|
||||
|
||||
if (empty($user_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_USER_ID);
|
||||
}
|
||||
|
||||
$sql = 'SELECT m.*, s.status, t.subject, ' . USER_TABLE_USERNAME .
|
||||
' FROM ' . $this->db->dbprefix . 'msg_messages m ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_threads t ON (m.thread_id = t.id) ' .
|
||||
' JOIN ' . $this->db->dbprefix . USER_TABLE_TABLENAME . ' ON (' . USER_TABLE_ID . ' = m.sender_id) '.
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_status s ON (s.message_id = m.id AND s.user_id = ? ) ' .
|
||||
' WHERE m.id = ? ' ;
|
||||
|
||||
$result = $this->db->query($sql, array($user_id, $msg_id));
|
||||
|
||||
if ($result)
|
||||
return $this->_success($result->result_array());
|
||||
else
|
||||
return $this->_general_error();
|
||||
}
|
||||
|
||||
/** -----------------------------------------------------------------
|
||||
* Get a Full Thread
|
||||
* get_full_thread() - will return a entire thread, including the status for specified user.
|
||||
*
|
||||
* @param integer $thread_id REQUIRED
|
||||
* @param integer $user_id REQUIRED
|
||||
* @param boolean $full_thread OPTIONAL - If true, user will also see messages from thread posted BEFORE user became participant
|
||||
* @param string $order_by OPTIONAL
|
||||
* @return array
|
||||
*/
|
||||
function get_full_thread($thread_id, $user_id, $full_thread = FALSE, $order_by = 'ASC')
|
||||
{
|
||||
// Validate
|
||||
if (empty($thread_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_THREAD_ID);
|
||||
}
|
||||
|
||||
if (empty($user_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_USER_ID);
|
||||
}
|
||||
|
||||
$sql = 'SELECT m.*, s.status, t.subject, '.USER_TABLE_USERNAME .
|
||||
' FROM ' . $this->db->dbprefix . 'msg_participants p ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_threads t ON (t.id = p.thread_id) ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_messages m ON (m.thread_id = t.id) ' .
|
||||
' JOIN ' . $this->db->dbprefix . USER_TABLE_TABLENAME . ' ON (' . USER_TABLE_ID . ' = m.sender_id) '.
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_status s ON (s.message_id = m.id AND s.user_id = ? ) ' .
|
||||
' WHERE p.user_id = ? ' .
|
||||
' AND p.thread_id = ? ';
|
||||
|
||||
if ( ! $full_thread)
|
||||
{
|
||||
$sql .= ' AND m.cdate >= p.cdate';
|
||||
}
|
||||
|
||||
$sql .= ' ORDER BY m.cdate ' . $order_by;
|
||||
|
||||
$result = $this->db->query($sql, array($user_id, $user_id, $thread_id));
|
||||
|
||||
if ($result)
|
||||
return $this->_success($result->result_array());
|
||||
else
|
||||
return $this->_general_error();
|
||||
}
|
||||
|
||||
/** -----------------------------------------------------------------
|
||||
* get_all_threads() - will return all threads for user, including the status for specified user.
|
||||
*
|
||||
* @param integer $user_id REQUIRED
|
||||
* @param boolean $full_thread OPTIONAL - If true, user will also see messages from thread posted BEFORE user became participant
|
||||
* @param string $order_by OPTIONAL
|
||||
* @return array
|
||||
*/
|
||||
function get_all_threads($user_id, $full_thread = FALSE, $order_by = 'asc')
|
||||
{
|
||||
if (empty($user_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_USER_ID);
|
||||
}
|
||||
|
||||
$sql = 'SELECT m.*, s.status, t.subject, '.USER_TABLE_USERNAME .
|
||||
' FROM ' . $this->db->dbprefix . 'msg_participants p ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_threads t ON (t.id = p.thread_id) ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_messages m ON (m.thread_id = t.id) ' .
|
||||
' JOIN ' . $this->db->dbprefix . USER_TABLE_TABLENAME . ' ON (' . USER_TABLE_ID . ' = m.sender_id) '.
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_status s ON (s.message_id = m.id AND s.user_id = ? ) ' .
|
||||
' WHERE p.user_id = ? ' ;
|
||||
|
||||
if (!$full_thread)
|
||||
{
|
||||
$sql .= ' AND m.cdate >= p.cdate';
|
||||
}
|
||||
|
||||
$sql .= ' ORDER BY t.id ' . $order_by. ', m.cdate '. $order_by;
|
||||
|
||||
$result = $this->db->query($sql, array($user_id, $user_id));
|
||||
|
||||
if ($result)
|
||||
return $this->_success($result->result_array());
|
||||
else
|
||||
return $this->_general_error();
|
||||
}
|
||||
|
||||
/** -----------------------------------------------------------------
|
||||
* Get all Threads Grouped
|
||||
* get_all_threads_grouped() - will return all threads for user, including the status for specified user.
|
||||
* - messages are grouped in threads.
|
||||
*
|
||||
* @param integer $user_id REQUIRED
|
||||
* @param boolean $full_thread OPTIONAL - If true, user will also see messages from thread posted BEFORE user became participant
|
||||
* @param string $order_by OPTIONAL
|
||||
* @return array
|
||||
*/
|
||||
function get_all_threads_grouped($user_id, $full_thread = FALSE, $order_by = 'ASC')
|
||||
{
|
||||
if (empty($user_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_USER_ID);
|
||||
}
|
||||
|
||||
$message = $this->get_all_threads($user_id, $full_thread, $order_by);
|
||||
if (is_array($message))
|
||||
{
|
||||
$threads = array();
|
||||
|
||||
foreach ($message as $msg)
|
||||
{
|
||||
if ( ! isset($threads[$msg['thread_id']]))
|
||||
{
|
||||
$threads[$msg['thread_id']]['thread_id'] = $msg['thread_id'];
|
||||
$threads[$msg['thread_id']]['messages'] = array($msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
$threads[$msg['thread_id']]['messages'][] = $msg;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_success($threads);
|
||||
}
|
||||
|
||||
// General Error Occurred
|
||||
return $this->_general_error();
|
||||
}
|
||||
|
||||
/** -----------------------------------------------------------------
|
||||
* Change Message Status
|
||||
* update_message_status() - will change status on message for particular user
|
||||
*
|
||||
* @param integer $msg_id REQUIRED
|
||||
* @param integer $user_id REQUIRED
|
||||
* @param integer $status_id REQUIRED - should come from config/message.php list of constants
|
||||
* @return array
|
||||
*/
|
||||
function update_message_status($msg_id, $user_id, $status_id)
|
||||
{
|
||||
// Validate
|
||||
if (empty($msg_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_MSG_ID);
|
||||
}
|
||||
|
||||
if (empty($user_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_USER_ID);
|
||||
}
|
||||
|
||||
if (empty($status_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_STATUS_ID);
|
||||
}
|
||||
|
||||
$this->db->where(array('message_id' => $msg_id, 'user_id' => $user_id ));
|
||||
$this->db->update('msg_status', array('status' => $status_id ));
|
||||
|
||||
$rows = $this->db->affected_rows();
|
||||
if ($rows == 1)
|
||||
return $this->_success($rows, MSG_STATUS_UPDATE);
|
||||
else
|
||||
return $this->_general_error();
|
||||
}
|
||||
|
||||
|
||||
/** -----------------------------------------------------------------
|
||||
* Add a Participant
|
||||
* add_participant() - adds user to existing thread
|
||||
*
|
||||
* @param integer $thread_id REQUIRED
|
||||
* @param integer $user_id REQUIRED
|
||||
* @return array
|
||||
*/
|
||||
function add_participant($thread_id, $user_id)
|
||||
{
|
||||
|
||||
if (empty($thread_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_THREAD_ID);
|
||||
}
|
||||
|
||||
if (empty($user_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_USER_ID);
|
||||
}
|
||||
|
||||
if ( ! $this->valid_new_participant($thread_id, $user_id))
|
||||
{
|
||||
$this->_participant_error(MSG_ERR_PARTICIPANT_EXISTS);
|
||||
}
|
||||
|
||||
if ( ! $this->application_user($user_id))
|
||||
{
|
||||
$this->_participant_error(MSG_ERR_PARTICIPANT_NONSYSTEM);
|
||||
}
|
||||
|
||||
$this->db->trans_start();
|
||||
|
||||
$participants[] = array('thread_id' => $thread_id,'user_id' => $user_id);
|
||||
|
||||
$this->_insert_participants($participants);
|
||||
|
||||
// Get Messages by Thread
|
||||
$messages = $this->_get_messages_by_thread_id($thread_id);
|
||||
|
||||
foreach ($messages as $message)
|
||||
{
|
||||
$statuses[] = array('message_id' => $message['id'], 'user_id' => $user_id, 'status' => MSG_STATUS_UNREAD);
|
||||
}
|
||||
|
||||
$this->_insert_statuses($statuses);
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return $this->_general_error();
|
||||
}
|
||||
|
||||
return $this->_success(NULL, MSG_PARTICIPANT_ADDED);
|
||||
}
|
||||
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Remove a Participant
|
||||
* remove_participant() - removes user from existing thread
|
||||
*
|
||||
* @param integer $thread_id REQUIRED
|
||||
* @param integer $user_id REQUIRED
|
||||
* @return array
|
||||
*/
|
||||
function remove_participant($thread_id, $user_id)
|
||||
{
|
||||
// Validate
|
||||
if (empty($thread_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_THREAD_ID);
|
||||
}
|
||||
|
||||
if (empty($user_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_USER_ID);
|
||||
}
|
||||
|
||||
$this->db->trans_start();
|
||||
|
||||
$this->_delete_participant($thread_id, $user_id);
|
||||
$this->_delete_statuses($thread_id, $user_id);
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return $this->_success(NULL, MSG_PARTICIPANT_REMOVED);
|
||||
}
|
||||
|
||||
return $this->_general_error();
|
||||
}
|
||||
|
||||
/** ----------------------------------------------------------------
|
||||
* Send a New Message
|
||||
* send_new_message() - sends new internal message. This function will create a new thread
|
||||
*
|
||||
* @param integer $sender_id REQUIRED
|
||||
* @param mixed $recipients REQUIRED - a single integer or an array of integers, representing user_ids
|
||||
* @param string $subject
|
||||
* @param string $body
|
||||
* @param integer $priority
|
||||
* @return array
|
||||
*/
|
||||
function send_new_message($sender_id, $recipients, $subject, $body, $priority)
|
||||
{
|
||||
// Validate
|
||||
if (empty($sender_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_SENDER_ID);
|
||||
}
|
||||
|
||||
if (empty($recipients))
|
||||
{
|
||||
return array(
|
||||
'err' => 1,
|
||||
'code' => MSG_ERR_INVALID_RECIPIENTS,
|
||||
'msg' => lang('mahana_'.MSG_ERR_INVALID_RECIPIENTS)
|
||||
);
|
||||
}
|
||||
|
||||
$this->db->trans_start();
|
||||
|
||||
$thread_id = $this->_insert_thread($subject);
|
||||
$msg_id = $this->_insert_message($thread_id, $sender_id, $body, $priority);
|
||||
|
||||
// Create batch inserts
|
||||
$participants[] = array('thread_id' => $thread_id,'user_id' => $sender_id);
|
||||
$statuses[] = array('message_id' => $msg_id, 'user_id' => $sender_id,'status' => MSG_STATUS_READ);
|
||||
|
||||
if ( ! is_array($recipients) )
|
||||
{
|
||||
if ($sender_id != $recipients)
|
||||
{
|
||||
$participants[] = array('thread_id' => $thread_id,'user_id' => $recipients);
|
||||
$statuses[] = array('message_id' => $msg_id, 'user_id' => $recipients, 'status' => MSG_STATUS_UNREAD);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($recipients as $recipient)
|
||||
{
|
||||
if ($sender_id != $recipient)
|
||||
{
|
||||
$participants[] = array('thread_id' => $thread_id,'user_id' => $recipient);
|
||||
$statuses[] = array('message_id' => $msg_id, 'user_id' => $recipient, 'status' => MSG_STATUS_UNREAD);
|
||||
}
|
||||
}
|
||||
}
|
||||
$participants=array_unique($participants, SORT_REGULAR); // Clean if sender and recipient is the same
|
||||
$this->_insert_participants($participants);
|
||||
$this->_insert_statuses($statuses);
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return $this->_general_error();
|
||||
}
|
||||
|
||||
return $this->_success($thread_id, MSG_MESSAGE_SENT);
|
||||
}
|
||||
|
||||
/** --------------------------------------------------------------
|
||||
* Reply to Message
|
||||
* reply_to_message() - replies to internal message. This function will NOT create a new thread or participant list
|
||||
*
|
||||
* @param integer $msg_id REQUIRED
|
||||
* @param integer $sender_id REQUIRED
|
||||
* @param string $subject
|
||||
* @param string $body
|
||||
* @param integer $priority
|
||||
* @return array
|
||||
*/
|
||||
function reply_to_message($reply_msg_id, $sender_id, $body, $priority)
|
||||
{
|
||||
// Validate
|
||||
if (empty($sender_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_SENDER_ID);
|
||||
}
|
||||
|
||||
if (empty($msg_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_MSG_ID);
|
||||
}
|
||||
|
||||
$this->db->trans_start();
|
||||
|
||||
// Get the thread id to keep messages together
|
||||
if ( ! $thread_id = $this->_get_thread_id_from_message($reply_msg_id))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Add this message
|
||||
$msg_id = $this->_insert_message($thread_id, $sender_id, $body, $priority);
|
||||
|
||||
if ($recipients = $this->_get_thread_participants($thread_id, $sender_id))
|
||||
{
|
||||
$statuses[] = array('message_id' => $msg_id, 'user_id' => $sender_id,'status' => MSG_STATUS_READ);
|
||||
|
||||
foreach ($recipients as $recipient)
|
||||
{
|
||||
$statuses[] = array('message_id' => $msg_id, 'user_id' => $recipient['user_id'], 'status' => MSG_STATUS_UNREAD);
|
||||
}
|
||||
|
||||
$this->_insert_statuses($statuses);
|
||||
}
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return $this->_general_error();
|
||||
}
|
||||
|
||||
return $this->_success($msg_id, MSG_MESSAGE_SENT);
|
||||
}
|
||||
|
||||
/** ----------------------------------------------------------------
|
||||
* Get Participant List
|
||||
* get_participant_list() - returns list of participants on given thread. If sender_id set, sender_id will be left off list
|
||||
*
|
||||
* @param integer $thread_id REQUIRED
|
||||
* @param integer $sender_id REQUIRED
|
||||
* @return array
|
||||
*/
|
||||
function get_participant_list($thread_id, $sender_id = 0)
|
||||
{
|
||||
// Validate
|
||||
if (empty($thread_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_THREAD_ID);
|
||||
}
|
||||
|
||||
if ($results = $this->_get_thread_participants($thread_id, $sender_id))
|
||||
return $this->_success($results);
|
||||
else
|
||||
return $this->_general_error();
|
||||
}
|
||||
|
||||
/** ----------------------------------------------------------------
|
||||
* Get Message Count
|
||||
* get_msg_count() - returns integer with count of message for user, by status. defaults to new messages
|
||||
*
|
||||
* @param integer $user_id REQUIRED
|
||||
* @param integer $status_id OPTIONAL - defaults to "Unread"
|
||||
* @return array
|
||||
*/
|
||||
function get_msg_count($user_id, $status_id = MSG_STATUS_UNREAD)
|
||||
{
|
||||
if (empty($user_id))
|
||||
{
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_USER_ID);
|
||||
}
|
||||
|
||||
$result = $this->db->select('COUNT(*) AS msg_count')->where(array('user_id' => $user_id, 'status' => $status_id ))->get('msg_status');
|
||||
$rows = $result->row()->msg_count;
|
||||
|
||||
if (is_numeric($rows))
|
||||
return $this->_success($rows);
|
||||
else
|
||||
return $this->_general_error();
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Valid New Participant - because of CodeIgniter's DB Class return style,
|
||||
* it is safer to check for uniqueness first
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $user_id
|
||||
* @return boolean
|
||||
*/
|
||||
function valid_new_participant($thread_id, $user_id)
|
||||
{
|
||||
$sql = 'SELECT COUNT(*) AS count ' .
|
||||
' FROM ' . $this->db->dbprefix . 'msg_participants p ' .
|
||||
' WHERE p.thread_id = ? ' .
|
||||
' AND p.user_id = ? ';
|
||||
|
||||
$query = $this->db->query($sql, array($thread_id, $user_id));
|
||||
|
||||
if ($query->row()->count)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Application User
|
||||
*
|
||||
* @param integer $user_id`
|
||||
* @return boolean
|
||||
*/
|
||||
function application_user($user_id)
|
||||
{
|
||||
$sql = 'SELECT COUNT(*) AS count ' .
|
||||
' FROM ' . $this->db->dbprefix . USER_TABLE_TABLENAME .
|
||||
' WHERE ' . USER_TABLE_ID . ' = ?' ;
|
||||
|
||||
$query = $this->db->query($sql, array($user_id));
|
||||
|
||||
if ($query->row()->count)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Private Functions from here out!
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Insert Thread
|
||||
*
|
||||
* @param string $subject
|
||||
* @return integer
|
||||
*/
|
||||
private function _insert_thread($subject)
|
||||
{
|
||||
$insert_id = $this->db->insert('msg_threads', array('subject' => $subject));
|
||||
|
||||
return $this->db->insert_id();
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert Message
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $sender_id
|
||||
* @param string $body
|
||||
* @param integer $priority
|
||||
* @return integer
|
||||
*/
|
||||
private function _insert_message($thread_id, $sender_id, $body, $priority)
|
||||
{
|
||||
$insert['thread_id'] = $thread_id;
|
||||
$insert['sender_id'] = $sender_id;
|
||||
$insert['body'] = $body;
|
||||
$insert['priority'] = $priority;
|
||||
|
||||
$insert_id = $this->db->insert('msg_messages', $insert);
|
||||
|
||||
return $this->db->insert_id();
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert Participants
|
||||
*
|
||||
* @param array $participants
|
||||
* @return bool
|
||||
*/
|
||||
private function _insert_participants($participants)
|
||||
{
|
||||
return $this->db->insert_batch('msg_participants', $participants);
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert Statuses
|
||||
*
|
||||
* @param array $statuses
|
||||
* @return bool
|
||||
*/
|
||||
private function _insert_statuses($statuses)
|
||||
{
|
||||
return $this->db->insert_batch('msg_status', $statuses);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Thread ID from Message
|
||||
*
|
||||
* @param integer $msg_id
|
||||
* @return integer
|
||||
*/
|
||||
private function _get_thread_id_from_message($msg_id)
|
||||
{
|
||||
$query = $this->db->select('thread_id')->get_where('msg_messages', array('id' => $msg_id));
|
||||
|
||||
if ($query->num_rows())
|
||||
{
|
||||
return $query->row()->thread_id;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Messages by Thread
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @return array
|
||||
*/
|
||||
private function _get_messages_by_thread_id($thread_id)
|
||||
{
|
||||
$query = $this->db->get_where('msg_messages', array('thread_id' => $thread_id));
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Thread Particpiants
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $sender_id
|
||||
* @return array
|
||||
*/
|
||||
private function _get_thread_participants($thread_id, $sender_id = 0)
|
||||
{
|
||||
$array['thread_id'] = $thread_id;
|
||||
|
||||
if ($sender_id) // If $sender_id 0, no one to exclude
|
||||
{
|
||||
$array['msg_participants.user_id != '] = $sender_id;
|
||||
}
|
||||
|
||||
$this->db->select('msg_participants.user_id, '.USER_TABLE_USERNAME, FALSE);
|
||||
$this->db->join(USER_TABLE_TABLENAME, 'msg_participants.user_id = ' . USER_TABLE_ID);
|
||||
|
||||
$query = $this->db->get_where('msg_participants', $array);
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Participant
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $user_id
|
||||
* @return boolean
|
||||
*/
|
||||
private function _delete_participant($thread_id, $user_id)
|
||||
{
|
||||
$this->db->delete('msg_participants', array('thread_id' => $thread_id, 'user_id' => $user_id));
|
||||
|
||||
if ($this->db->affected_rows() > 0)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Statuses
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $user_id
|
||||
* @return boolean
|
||||
*/
|
||||
private function _delete_statuses($thread_id, $user_id)
|
||||
{
|
||||
$sql = 'DELETE s FROM msg_status s ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_messages m ON (m.id = s.message_id) ' .
|
||||
' WHERE m.thread_id = ? ' .
|
||||
' AND s.user_id = ? ';
|
||||
|
||||
$query = $this->db->query($sql, array($thread_id, $user_id));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Error Particpant Exists
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function _participant_error($error = '')
|
||||
{
|
||||
return array(
|
||||
'err' => 1,
|
||||
'code' => 1,
|
||||
'msg' => lang('mahana_' . $error)
|
||||
);
|
||||
}
|
||||
}
|
||||
/* end of file message_model.php */
|
||||
@@ -0,0 +1,511 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Message_model extends DB_Model
|
||||
{
|
||||
/**
|
||||
* Send a New Message
|
||||
*
|
||||
* @param integer $sender_id
|
||||
* @param mixed $recipients A single integer or an array of integers
|
||||
* @param string $subject
|
||||
* @param string $body
|
||||
* @param integer $priority
|
||||
* @return integer $new_thread_id
|
||||
*/
|
||||
function send_new_message($sender_id, $recipients, $subject, $body, $priority)
|
||||
{
|
||||
$this->db->trans_start();
|
||||
|
||||
$thread_id = $this->_insert_thread($subject);
|
||||
$msg_id = $this->_insert_message($thread_id, $sender_id, $body, $priority);
|
||||
|
||||
// Create batch inserts
|
||||
$participants[] = array('thread_id' => $thread_id,'user_id' => $sender_id);
|
||||
$statuses[] = array('message_id' => $msg_id, 'user_id' => $sender_id,'status' => MSG_STATUS_READ);
|
||||
|
||||
if ( ! is_array($recipients))
|
||||
{
|
||||
$participants[] = array('thread_id' => $thread_id,'user_id' => $recipients);
|
||||
$statuses[] = array('message_id' => $msg_id, 'user_id' => $recipients, 'status' => MSG_STATUS_UNREAD);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($recipients as $recipient)
|
||||
{
|
||||
$participants[] = array('thread_id' => $thread_id,'user_id' => $recipient);
|
||||
$statuses[] = array('message_id' => $msg_id, 'user_id' => $recipient, 'status' => MSG_STATUS_UNREAD);
|
||||
}
|
||||
}
|
||||
|
||||
$this->_insert_participants($participants);
|
||||
$this->_insert_statuses($statuses);
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return $thread_id;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Reply to Message
|
||||
*
|
||||
* @param integer $reply_msg_id
|
||||
* @param integer $sender_id
|
||||
* @param string $body
|
||||
* @param integer $priority
|
||||
* @return integer $new_msg_id
|
||||
*/
|
||||
function reply_to_message($reply_msg_id, $sender_id, $body, $priority)
|
||||
{
|
||||
$this->db->trans_start();
|
||||
|
||||
// Get the thread id to keep messages together
|
||||
if ( ! $thread_id = $this->_get_thread_id_from_message($reply_msg_id))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Add this message
|
||||
$msg_id = $this->_insert_message($thread_id, $sender_id, $body, $priority);
|
||||
|
||||
if ($recipients = $this->_get_thread_participants($thread_id, $sender_id))
|
||||
{
|
||||
$statuses[] = array('message_id' => $msg_id, 'user_id' => $sender_id,'status' => MSG_STATUS_READ);
|
||||
|
||||
foreach ($recipients as $recipient)
|
||||
{
|
||||
$statuses[] = array('message_id' => $msg_id, 'user_id' => $recipient['user_id'], 'status' => MSG_STATUS_UNREAD);
|
||||
}
|
||||
|
||||
$this->_insert_statuses($statuses);
|
||||
}
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return $msg_id;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Get a Single Message
|
||||
*
|
||||
* @param integer $msg_id
|
||||
* @param integer $user_id
|
||||
* @return array
|
||||
*/
|
||||
function get_message($msg_id, $user_id)
|
||||
{
|
||||
$sql = 'SELECT m.*, s.status, t.subject, ' . USER_TABLE_USERNAME .
|
||||
' FROM ' . $this->db->dbprefix . 'msg_messages m ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_threads t ON (m.thread_id = t.id) ' .
|
||||
' JOIN ' . $this->db->dbprefix . USER_TABLE_TABLENAME . ' ON (' . USER_TABLE_ID . ' = m.sender_id) '.
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_status s ON (s.message_id = m.id AND s.user_id = ? ) ' .
|
||||
' WHERE m.id = ? ' ;
|
||||
|
||||
$query = $this->db->query($sql, array($user_id, $msg_id));
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Get a Full Thread
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $user_id
|
||||
* @param boolean $full_thread
|
||||
* @param string $order_by
|
||||
* @return array
|
||||
*/
|
||||
function get_full_thread($thread_id, $user_id, $full_thread = FALSE, $order_by = 'asc')
|
||||
{
|
||||
$sql = 'SELECT m.*, s.status, t.subject, '.USER_TABLE_USERNAME .
|
||||
' FROM ' . $this->db->dbprefix . 'msg_participants p ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_threads t ON (t.id = p.thread_id) ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_messages m ON (m.thread_id = t.id) ' .
|
||||
' JOIN ' . $this->db->dbprefix . USER_TABLE_TABLENAME . ' ON (' . USER_TABLE_ID . ' = m.sender_id) '.
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_status s ON (s.message_id = m.id AND s.user_id = ? ) ' .
|
||||
' WHERE p.user_id = ? ' .
|
||||
' AND p.thread_id = ? ';
|
||||
|
||||
if ( ! $full_thread)
|
||||
{
|
||||
$sql .= ' AND m.cdate >= p.cdate';
|
||||
}
|
||||
|
||||
$sql .= ' ORDER BY m.cdate ' . $order_by;
|
||||
|
||||
$query = $this->db->query($sql, array($user_id, $user_id, $thread_id));
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Get All Threads
|
||||
*
|
||||
* @param integer $user_id
|
||||
* @param boolean $full_thread
|
||||
* @param string $order_by
|
||||
* @return array
|
||||
*/
|
||||
function get_all_threads($user_id, $full_thread = FALSE, $order_by = 'asc')
|
||||
{
|
||||
$sql = 'SELECT m.*, s.status, t.subject, '.USER_TABLE_USERNAME .
|
||||
' FROM ' . $this->db->dbprefix . 'msg_participants p ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_threads t ON (t.id = p.thread_id) ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_messages m ON (m.thread_id = t.id) ' .
|
||||
' JOIN ' . $this->db->dbprefix . USER_TABLE_TABLENAME . ' ON (' . USER_TABLE_ID . ' = m.sender_id) '.
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_status s ON (s.message_id = m.id AND s.user_id = ? ) ' .
|
||||
' WHERE p.user_id = ? ' ;
|
||||
|
||||
if (!$full_thread)
|
||||
{
|
||||
$sql .= ' AND m.cdate >= p.cdate';
|
||||
}
|
||||
|
||||
$sql .= ' ORDER BY t.id ' . $order_by. ', m.cdate '. $order_by;
|
||||
|
||||
$query = $this->db->query($sql, array($user_id, $user_id));
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Change Message Status
|
||||
*
|
||||
* @param integer $msg_id
|
||||
* @param integer $user_id
|
||||
* @param integer $status_id
|
||||
* @return integer
|
||||
*/
|
||||
function update_message_status($msg_id, $user_id, $status_id)
|
||||
{
|
||||
$this->db->where(array('message_id' => $msg_id, 'user_id' => $user_id ));
|
||||
$this->db->update('msg_status', array('status' => $status_id ));
|
||||
|
||||
return $this->db->affected_rows();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Add a Participant
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $user_id
|
||||
* @return boolean
|
||||
*/
|
||||
function add_participant($thread_id, $user_id)
|
||||
{
|
||||
$this->db->trans_start();
|
||||
|
||||
$participants[] = array('thread_id' => $thread_id,'user_id' => $user_id);
|
||||
|
||||
$this->_insert_participants($participants);
|
||||
|
||||
// Get Messages by Thread
|
||||
$messages = $this->_get_messages_by_thread_id($thread_id);
|
||||
|
||||
foreach ($messages as $message)
|
||||
{
|
||||
$statuses[] = array('message_id' => $message['id'], 'user_id' => $user_id, 'status' => MSG_STATUS_UNREAD);
|
||||
}
|
||||
|
||||
$this->_insert_statuses($statuses);
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Remove a Participant
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $user_id
|
||||
* @return boolean
|
||||
*/
|
||||
function remove_participant($thread_id, $user_id)
|
||||
{
|
||||
$this->db->trans_start();
|
||||
|
||||
$this->_delete_participant($thread_id, $user_id);
|
||||
$this->_delete_statuses($thread_id, $user_id);
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Valid New Participant - because of CodeIgniter's DB Class return style,
|
||||
* it is safer to check for uniqueness first
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $user_id
|
||||
* @return boolean
|
||||
*/
|
||||
function valid_new_participant($thread_id, $user_id)
|
||||
{
|
||||
$sql = 'SELECT COUNT(*) AS count ' .
|
||||
' FROM ' . $this->db->dbprefix . 'msg_participants p ' .
|
||||
' WHERE p.thread_id = ? ' .
|
||||
' AND p.user_id = ? ';
|
||||
|
||||
$query = $this->db->query($sql, array($thread_id, $user_id));
|
||||
|
||||
if ($query->row()->count)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Application User
|
||||
*
|
||||
* @param integer $user_id`
|
||||
* @return boolean
|
||||
*/
|
||||
function application_user($user_id)
|
||||
{
|
||||
$sql = 'SELECT COUNT(*) AS count ' .
|
||||
' FROM ' . $this->db->dbprefix . USER_TABLE_TABLENAME .
|
||||
' WHERE ' . USER_TABLE_ID . ' = ?' ;
|
||||
|
||||
$query = $this->db->query($sql, array($user_id));
|
||||
|
||||
if ($query->row()->count)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Get Participant List
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $sender_id
|
||||
* @return mixed
|
||||
*/
|
||||
function get_participant_list($thread_id, $sender_id = 0)
|
||||
{
|
||||
if ($results = $this->_get_thread_participants($thread_id, $sender_id))
|
||||
{
|
||||
return $results;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Get Message Count
|
||||
*
|
||||
* @param integer $user_id
|
||||
* @param integer $status_id
|
||||
* @return integer
|
||||
*/
|
||||
function get_msg_count($user_id, $status_id = MSG_STATUS_UNREAD)
|
||||
{
|
||||
$query = $this->db->select('COUNT(*) AS msg_count')->where(array('user_id' => $user_id, 'status' => $status_id ))->get('msg_status');
|
||||
|
||||
return $query->row()->msg_count;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Private Functions from here out!
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Insert Thread
|
||||
*
|
||||
* @param string $subject
|
||||
* @return integer
|
||||
*/
|
||||
private function _insert_thread($subject)
|
||||
{
|
||||
$insert_id = $this->db->insert('msg_threads', array('subject' => $subject));
|
||||
|
||||
return $this->db->insert_id();
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert Message
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $sender_id
|
||||
* @param string $body
|
||||
* @param integer $priority
|
||||
* @return integer
|
||||
*/
|
||||
private function _insert_message($thread_id, $sender_id, $body, $priority)
|
||||
{
|
||||
$insert['thread_id'] = $thread_id;
|
||||
$insert['sender_id'] = $sender_id;
|
||||
$insert['body'] = $body;
|
||||
$insert['priority'] = $priority;
|
||||
|
||||
$insert_id = $this->db->insert('msg_messages', $insert);
|
||||
|
||||
return $this->db->insert_id();
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert Participants
|
||||
*
|
||||
* @param array $participants
|
||||
* @return bool
|
||||
*/
|
||||
private function _insert_participants($participants)
|
||||
{
|
||||
return $this->db->insert_batch('msg_participants', $participants);
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert Statuses
|
||||
*
|
||||
* @param array $statuses
|
||||
* @return bool
|
||||
*/
|
||||
private function _insert_statuses($statuses)
|
||||
{
|
||||
return $this->db->insert_batch('msg_status', $statuses);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Thread ID from Message
|
||||
*
|
||||
* @param integer $msg_id
|
||||
* @return integer
|
||||
*/
|
||||
private function _get_thread_id_from_message($msg_id)
|
||||
{
|
||||
$query = $this->db->select('thread_id')->get_where('msg_messages', array('id' => $msg_id));
|
||||
|
||||
if ($query->num_rows())
|
||||
{
|
||||
return $query->row()->thread_id;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Messages by Thread
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @return array
|
||||
*/
|
||||
private function _get_messages_by_thread_id($thread_id)
|
||||
{
|
||||
$query = $this->db->get_where('msg_messages', array('thread_id' => $thread_id));
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Thread Particpiants
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $sender_id
|
||||
* @return array
|
||||
*/
|
||||
private function _get_thread_participants($thread_id, $sender_id = 0)
|
||||
{
|
||||
$array['thread_id'] = $thread_id;
|
||||
|
||||
if ($sender_id) // If $sender_id 0, no one to exclude
|
||||
{
|
||||
$array['msg_participants.user_id != '] = $sender_id;
|
||||
}
|
||||
|
||||
$this->db->select('msg_participants.user_id, '.USER_TABLE_USERNAME, FALSE);
|
||||
$this->db->join(USER_TABLE_TABLENAME, 'msg_participants.user_id = ' . USER_TABLE_ID);
|
||||
|
||||
$query = $this->db->get_where('msg_participants', $array);
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Participant
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $user_id
|
||||
* @return boolean
|
||||
*/
|
||||
private function _delete_participant($thread_id, $user_id)
|
||||
{
|
||||
$this->db->delete('msg_participants', array('thread_id' => $thread_id, 'user_id' => $user_id));
|
||||
|
||||
if ($this->db->affected_rows() > 0)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Statuses
|
||||
*
|
||||
* @param integer $thread_id
|
||||
* @param integer $user_id
|
||||
* @return boolean
|
||||
*/
|
||||
private function _delete_statuses($thread_id, $user_id)
|
||||
{
|
||||
$sql = 'DELETE s FROM msg_status s ' .
|
||||
' JOIN ' . $this->db->dbprefix . 'msg_messages m ON (m.id = s.message_id) ' .
|
||||
' WHERE m.thread_id = ? ' .
|
||||
' AND s.user_id = ? ';
|
||||
|
||||
$query = $this->db->query($sql, array($thread_id, $user_id));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* end of file mahana_model.php */
|
||||
@@ -2,23 +2,21 @@
|
||||
|
||||
class Person_model extends DB_Model
|
||||
{
|
||||
|
||||
public function __construct($uid = null)
|
||||
{
|
||||
parent::__construct($uid);
|
||||
$this->dbTable = 'public.tbl_person';
|
||||
parent::__construct($uid);
|
||||
$this->dbTable = 'public.tbl_person';
|
||||
}
|
||||
|
||||
public function getPerson($person_id = null)
|
||||
{
|
||||
if (is_null($person_id))
|
||||
{
|
||||
$query = $this->db->get_where('public.tbl_person', array());
|
||||
return $query->result_object();
|
||||
}
|
||||
|
||||
$query = $this->db->get_where('public.tbl_person', array('person_id' => $person_id));
|
||||
return $query->row_object();
|
||||
if (is_null($person_id))
|
||||
{
|
||||
$query = $this->db->get_where('public.tbl_person', array());
|
||||
return $query->result_object();
|
||||
}
|
||||
$query = $this->db->get_where('public.tbl_person', array('person_id' => $person_id));
|
||||
return $query->row_object();
|
||||
}
|
||||
|
||||
public function getPersonByCodeAndEmail($code, $email)
|
||||
@@ -44,19 +42,20 @@ class Person_model extends DB_Model
|
||||
*/
|
||||
public function getPersonFromBenutzerUID($uid)
|
||||
{
|
||||
if (!$this->fhc_db_acl->bb->isBerechtigt('person', 's'))
|
||||
{
|
||||
$this->db->select('tbl_person.*');
|
||||
$this->db->from('public.tbl_person JOIN public.tbl_benutzer USING (person_id)');
|
||||
$query = $this->db->get_where(null, array('uid' => $uid));
|
||||
return $query->result_object();
|
||||
}
|
||||
|
||||
if (!$this->fhc_db_acl->bb->isBerechtigt('person', 's'))
|
||||
{
|
||||
$this->db->select('tbl_person.*');
|
||||
$this->db->from('public.tbl_person JOIN public.tbl_benutzer USING (person_id)');
|
||||
$query = $this->db->get_where(null, array('uid' => $uid));
|
||||
return $query->result_object();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function savePerson($person)
|
||||
{
|
||||
//TODO check berechtigung
|
||||
// if ($this->fhc_db_acl->bb->isBerechtigt('person', 'sui'))
|
||||
// if($this->fhc_db_acl->bb->isBerechtigt('person', 'sui'))
|
||||
// {
|
||||
$data = array(
|
||||
"vorname"=>$person["vorname"],
|
||||
@@ -69,11 +68,11 @@ class Person_model extends DB_Model
|
||||
"insertvon"=>$person["insertvon"],
|
||||
);
|
||||
if($this->db->insert("public.tbl_person", $data)){
|
||||
return $this->db->insert_id();
|
||||
return $this->db->insert_id();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
// }
|
||||
// else
|
||||
@@ -84,64 +83,64 @@ class Person_model extends DB_Model
|
||||
|
||||
public function checkBewerbung($email, $studiensemester_kurzbz=NULL)
|
||||
{
|
||||
$this->db->distinct();
|
||||
|
||||
if(is_null($studiensemester_kurzbz))
|
||||
{
|
||||
$this->db->select("p.person_id, p.zugangscode, p.insertamum")
|
||||
->from("public.tbl_person p")
|
||||
->join("public.tbl_kontakt k", "p.person_id=k.person_id")
|
||||
->join("public.tbl_benutzer b", "p.person_id=b.person_id", "left")
|
||||
->where("k.kontakttyp", 'email')
|
||||
->where("(kontakt='".$email."'".
|
||||
" OR alias ||'@technikum-wien.at'='".$email."'".
|
||||
" OR uid ||'@technikum-wien.at'='".$email."')")
|
||||
->order_by("p.insertamum", "DESC")
|
||||
->limit(1)
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->select("p.person_id,p.zugangscode,p.insertamum")
|
||||
->from("public.tbl_person p")
|
||||
->join("public.tbl_kontakt k", "p.person_id=k.person_id")
|
||||
->join("public.tbl_benutzer b", "p.person_id=b.person_id", "left")
|
||||
->join("public.tbl_prestudent ps", "p.person_id=ps.person_id")
|
||||
->join("public.tbl_prestudentstatus pst", "pst.prestudent_id=ps.prestudent_id")
|
||||
->where("k.kontakttyp", 'email')
|
||||
->where("(kontakt='".$email."'".
|
||||
" OR alias ||'@technikum-wien.at'='".$email."'".
|
||||
" OR uid ||'@technikum-wien.at'='".$email."')")
|
||||
->where("studiensemester_kurzbz='".$studiensemester_kurzbz."'")
|
||||
->order_by("p.insertamum", "DESC")
|
||||
->limit(1)
|
||||
;
|
||||
}
|
||||
return $this->db->get()->result_array();
|
||||
$this->db->distinct();
|
||||
|
||||
if(is_null($studiensemester_kurzbz))
|
||||
{
|
||||
$this->db->select("p.person_id, p.zugangscode, p.insertamum")
|
||||
->from("public.tbl_person p")
|
||||
->join("public.tbl_kontakt k", "p.person_id=k.person_id")
|
||||
->join("public.tbl_benutzer b", "p.person_id=b.person_id", "left")
|
||||
->where("k.kontakttyp", 'email')
|
||||
->where("(kontakt='".$email."'".
|
||||
" OR alias ||'@technikum-wien.at'='".$email."'".
|
||||
" OR uid ||'@technikum-wien.at'='".$email."')")
|
||||
->order_by("p.insertamum", "DESC")
|
||||
->limit(1)
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->select("p.person_id,p.zugangscode,p.insertamum")
|
||||
->from("public.tbl_person p")
|
||||
->join("public.tbl_kontakt k", "p.person_id=k.person_id")
|
||||
->join("public.tbl_benutzer b", "p.person_id=b.person_id", "left")
|
||||
->join("public.tbl_prestudent ps", "p.person_id=ps.person_id")
|
||||
->join("public.tbl_prestudentstatus pst", "pst.prestudent_id=ps.prestudent_id")
|
||||
->where("k.kontakttyp", 'email')
|
||||
->where("(kontakt='".$email."'".
|
||||
" OR alias ||'@technikum-wien.at'='".$email."'".
|
||||
" OR uid ||'@technikum-wien.at'='".$email."')")
|
||||
->where("studiensemester_kurzbz='".$studiensemester_kurzbz."'")
|
||||
->order_by("p.insertamum", "DESC")
|
||||
->limit(1)
|
||||
;
|
||||
}
|
||||
return $this->db->get()->result_array();
|
||||
}
|
||||
|
||||
|
||||
public function checkZugangscodePerson($code)
|
||||
{
|
||||
$this->db->select("p.person_id")
|
||||
->from("public.tbl_person p")
|
||||
->where("p.zugangscode", $code);
|
||||
return $this->db->get()->result_array();
|
||||
$this->db->select("p.person_id")
|
||||
->from("public.tbl_person p")
|
||||
->where("p.zugangscode", $code);
|
||||
return $this->db->get()->result_array();
|
||||
}
|
||||
|
||||
|
||||
public function updatePerson($person)
|
||||
{
|
||||
//TODO check berechtigung
|
||||
// if ($this->fhc_db_acl->bb->isBerechtigt('person', 'sui'))
|
||||
// if($this->fhc_db_acl->bb->isBerechtigt('person', 'sui'))
|
||||
// {
|
||||
//TODO set other columns to be updated
|
||||
$this->db->set("zugangscode", $person["zugangscode"]);
|
||||
$this->db->where("person_id", $person["person_id"]);
|
||||
if($this->db->update("public.tbl_person")){
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
// }
|
||||
// else
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Seed_Person
|
||||
{
|
||||
|
||||
public function seed($limit = 25)
|
||||
{
|
||||
echo "Seeding $limit persons ";
|
||||
$this->fhc =& get_instance();
|
||||
$this->fhc->load->model('person/Person_model');
|
||||
|
||||
for ($i = 0; $i < $limit; $i++)
|
||||
{
|
||||
echo ".";
|
||||
$data = array(
|
||||
// 'username' => $this->faker->unique()->userName, // get a unique nickname
|
||||
'vorname' => $this->fhc->faker->firstName,
|
||||
'vornamen' => $this->fhc->faker->firstName,
|
||||
'nachname' => $this->fhc->faker->lastName,
|
||||
//'address' => $this->faker->streetAddress,
|
||||
'gebort' => $this->fhc->faker->city,
|
||||
//'state' => $this->faker->state,
|
||||
//'country' => $this->faker->country,
|
||||
//'postcode' => $this->faker->postcode,
|
||||
//'email' => $this->faker->email,
|
||||
//'email_verified' => mt_rand(0, 1) ? '0' : '1',
|
||||
//'phone' => $this->faker->phoneNumber,
|
||||
'gebdatum' => $this->fhc->faker->dateTimeThisCentury->format('Y-m-d H:i:s'),
|
||||
//'registration_date' => $this->faker->dateTimeThisYear->format('Y-m-d H:i:s'),
|
||||
//'ip_address' => mt_rand(0, 1) ? $this->faker->ipv4 : $this->faker->ipv6,
|
||||
);
|
||||
|
||||
$this->fhc->Person_model->insert($data);
|
||||
}
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
}
|
||||
|
||||
public function truncate()
|
||||
{
|
||||
//$this->db->query('EMPTY TABLE public.person;');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<frameset rows="55px,*" frameborder="0" framespacing="0">
|
||||
<frameset id="frameset-vilesci" rows="55px,*" frameborder="0" framespacing="0">
|
||||
<frame src="<?php echo base_url('vilesci/top.php')?>" id="top" name="top" scrolling="No"/>
|
||||
<frameset border="4" frameborder="1" framespacing="0" cols="200px,*" >
|
||||
<frame style="border-right: 3px; border-right-style:solid; border-right-color: grey;" src="<?php echo base_url('vilesci/left.php')?>" id="nav" name="nav" />
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
$language_alias = array(
|
||||
'afrikaans' => 'af',
|
||||
'arabic' => 'ar',
|
||||
'bengali' => 'bn', // Timepicker is not avaliable yet
|
||||
'bulgarian' => 'bg',
|
||||
'chinese' => 'zh-cn',
|
||||
'czech' => 'cs',
|
||||
'danish' => 'da', // Timepicker is not avaliable yet
|
||||
'dutch' => 'nl',
|
||||
'french' => 'fr',
|
||||
'german' => 'de',
|
||||
'greek' => 'el',
|
||||
'hungarian' => 'hu',
|
||||
'indonesian' => 'id',
|
||||
'italian' => 'it',
|
||||
'japanese' => 'ja',
|
||||
'korean' => 'ko',
|
||||
'norwegian' => 'no',
|
||||
'persian' => 'fa', // Timepicker is not avaliable yet
|
||||
'polish' => 'pl',
|
||||
'pt-br.portuguese' => 'pt-br',
|
||||
'pt-pt.portuguese' => 'pt',
|
||||
'romanian' => 'ro',
|
||||
'russian' => 'ru',
|
||||
'slovak' => 'sk',
|
||||
'spanish' => 'es',
|
||||
'thai' => 'th', // Timepicker is not avaliable yet
|
||||
'turkish' => 'tr',
|
||||
'ukrainian' => 'uk',
|
||||
'vietnamese' => 'vi'
|
||||
);
|
||||
@@ -0,0 +1,169 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Transliteration characters
|
||||
| -------------------------------------------------------------------
|
||||
| This file based on ./application/config/foreign_chars.php file
|
||||
| of Codeigniter's Framework and contains an array of foreign
|
||||
| characters for transliteration conversion used by grocery CRUD library
|
||||
|
|
||||
*/
|
||||
$translit_characters = array(
|
||||
|
||||
// Aa
|
||||
'/Α|Ά|А|À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A',
|
||||
'/α|ά|а|à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a',
|
||||
|
||||
// Bb
|
||||
'/Β|Б/' => 'B',
|
||||
'/β|б/' => 'b',
|
||||
|
||||
// Cc
|
||||
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
|
||||
'/ç|ć|ĉ|ċ|č/' => 'c',
|
||||
|
||||
// Dd
|
||||
'/Δ|Д|Ð|Ď|Đ/' => 'D',
|
||||
'/δ|д|ð|ď|đ/' => 'd',
|
||||
|
||||
// Ee
|
||||
'/Ε|Έ|Е|Э|Є|È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E',
|
||||
'/ε|έ|е|э|є|è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e',
|
||||
|
||||
// Ff
|
||||
'/Φ|Ф/' => 'F',
|
||||
'/φ|ф|ƒ/' => 'f',
|
||||
|
||||
// Gg
|
||||
'/Γ|Г|Ĝ|Ğ|Ġ|Ģ/' => 'G',
|
||||
'/γ|г|ĝ|ğ|ġ|ģ/' => 'g',
|
||||
|
||||
// Hh
|
||||
'/Х|Ĥ|Ħ/' => 'H',
|
||||
'/х|ĥ|ħ/' => 'h',
|
||||
|
||||
// Ii
|
||||
'/Η|Ή|Ι|Ί|И|Ы|І|Ї|Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I',
|
||||
'/η|ή|ι|ί|и|ы|і|ї|ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i',
|
||||
|
||||
// Jj
|
||||
'/Ĵ/' => 'J',
|
||||
'/ĵ/' => 'j',
|
||||
|
||||
// Kk
|
||||
'/Κ|К|Ķ/' => 'K',
|
||||
'/κ|к|ķ/' => 'k',
|
||||
|
||||
// Ll
|
||||
'/Λ|Л|Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L',
|
||||
'/λ|л|ĺ|ļ|ľ|ŀ|ł/' => 'l',
|
||||
|
||||
// Mm
|
||||
'/Μ|М/' => 'M',
|
||||
'/μ|м/' => 'm',
|
||||
|
||||
// Nn
|
||||
'/Ν|Н|Ñ|Ń|Ņ|Ň/' => 'N',
|
||||
'/ν|н|ñ|ń|ņ|ň|ʼn/' => 'n',
|
||||
|
||||
// Oo
|
||||
'/Ο|Ό|О|Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O',
|
||||
'/ο|ό|о|ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o',
|
||||
|
||||
// Pp
|
||||
'/Π|П/' => 'P',
|
||||
'/π|п/' => 'p',
|
||||
|
||||
// Qq
|
||||
// '//' => 'Q',
|
||||
// '//' => 'q',
|
||||
|
||||
// Rr
|
||||
'/Ρ|Р|Ŕ|Ŗ|Ř/' => 'R',
|
||||
'/ρ|р|ŕ|ŗ|ř/' => 'r',
|
||||
|
||||
// Ss
|
||||
'/Σ|С|Ś|Ŝ|Ş|Š/' => 'S',
|
||||
'/σ|ς|с|ś|ŝ|ş|š|ſ/' => 's',
|
||||
|
||||
// Tt
|
||||
'/Τ|Т|Ţ|Ť|Ŧ/' => 'T',
|
||||
'/τ|т|ţ|ť|ŧ/' => 't',
|
||||
|
||||
// Uu
|
||||
'/У|Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U',
|
||||
'/у|ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u',
|
||||
|
||||
// Vv
|
||||
'/В/' => 'V',
|
||||
'/в/' => 'v',
|
||||
|
||||
// Ww
|
||||
'/Ω|Ώ|Ŵ/' => 'W',
|
||||
'/ω|ώ|ŵ/' => 'w',
|
||||
|
||||
// Xx
|
||||
'/Χ/' => 'X',
|
||||
'/χ/' => 'x',
|
||||
|
||||
// Yy
|
||||
'/Υ|Ύ|Ψ|Й|Ý|Ÿ|Ŷ/' => 'Y',
|
||||
'/υ|ύ|ψ|й|ý|ÿ|ŷ/' => 'y',
|
||||
|
||||
// Zz
|
||||
'/Ζ|З|Ź|Ż|Ž/' => 'Z',
|
||||
'/ζ|з|ź|ż|ž/' => 'z',
|
||||
|
||||
'/Θ/' => 'Th',
|
||||
'/θ/' => 'th',
|
||||
|
||||
'/Ξ/' => 'Ks',
|
||||
'/ξ/' => 'ks',
|
||||
|
||||
'/Ё/' => 'Yo',
|
||||
'/ё/' => 'yo',
|
||||
|
||||
'/Ж/' => 'Zh',
|
||||
'/ж/' => 'zh',
|
||||
|
||||
'/Ц/' => 'Ts',
|
||||
'/ц/' => 'ts',
|
||||
|
||||
'/Ч/' => 'Ch',
|
||||
'/ч/' => 'ch',
|
||||
|
||||
'/Ш/' => 'Sh',
|
||||
'/ш/' => 'sh',
|
||||
|
||||
'/Щ/' => 'Sch',
|
||||
'/щ/' => 'sch',
|
||||
|
||||
'/Ь|Ъ/' => '',
|
||||
'/ь|ъ/' => '',
|
||||
|
||||
'/Ю/' => 'Yu',
|
||||
'/ю/' => 'yu',
|
||||
|
||||
'/Я/' => 'Ya',
|
||||
'/я/' => 'ya',
|
||||
|
||||
'/Æ|Ǽ/' => 'AE',
|
||||
'/Ä/' => 'Ae',
|
||||
'/ä|æ|ǽ/' => 'ae',
|
||||
|
||||
'/Œ/' => 'OE',
|
||||
'/Ö/' => 'Oe',
|
||||
'/ö|œ/' => 'oe',
|
||||
|
||||
'/Ü/' => 'Ue',
|
||||
'/ü/' => 'ue',
|
||||
|
||||
'/IJ/' => 'IJ',
|
||||
'/ij/' => 'ij',
|
||||
|
||||
'/ß/'=> 'ss',
|
||||
|
||||
);
|
||||
|
||||
/* End of file translit_chars.php */
|
||||
/* Location: ./assets/grocery_crud/translit_chars.php */
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 538 B |
|
After Width: | Height: | Size: 738 B |
@@ -0,0 +1,450 @@
|
||||
/*!
|
||||
Chosen, a Select Box Enhancer for jQuery and Prototype
|
||||
by Patrick Filler for Harvest, http://getharvest.com
|
||||
|
||||
Version 1.4.2
|
||||
Full source at https://github.com/harvesthq/chosen
|
||||
Copyright (c) 2011-2015 Harvest http://getharvest.com
|
||||
|
||||
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
||||
This file is generated by `grunt build`, do not edit it by hand.
|
||||
*/
|
||||
|
||||
/* @group Base */
|
||||
.chosen-container {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 13px;
|
||||
zoom: 1;
|
||||
*display: inline;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.chosen-container * {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.chosen-container .chosen-drop {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: -9999px;
|
||||
z-index: 1010;
|
||||
width: 100%;
|
||||
border: 1px solid #aaa;
|
||||
border-top: 0;
|
||||
background: #fff;
|
||||
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
.chosen-container.chosen-with-drop .chosen-drop {
|
||||
left: 0;
|
||||
}
|
||||
.chosen-container a {
|
||||
cursor: pointer;
|
||||
}
|
||||
.chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name {
|
||||
margin-right: 4px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: normal;
|
||||
color: #999999;
|
||||
}
|
||||
.chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after {
|
||||
content: ":";
|
||||
padding-left: 2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Single Chosen */
|
||||
.chosen-container-single .chosen-single {
|
||||
position: relative;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
padding: 0 0 0 8px;
|
||||
height: 25px;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 5px;
|
||||
background-color: #fff;
|
||||
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
|
||||
background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background-clip: padding-box;
|
||||
box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
color: #444;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
line-height: 24px;
|
||||
}
|
||||
.chosen-container-single .chosen-default {
|
||||
color: #999;
|
||||
}
|
||||
.chosen-container-single .chosen-single span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
margin-right: 26px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.chosen-container-single .chosen-single-with-deselect span {
|
||||
margin-right: 38px;
|
||||
}
|
||||
.chosen-container-single .chosen-single abbr {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 26px;
|
||||
display: block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: url('chosen-sprite.png') -42px 1px no-repeat;
|
||||
font-size: 1px;
|
||||
}
|
||||
.chosen-container-single .chosen-single abbr:hover {
|
||||
background-position: -42px -10px;
|
||||
}
|
||||
.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
|
||||
background-position: -42px -10px;
|
||||
}
|
||||
.chosen-container-single .chosen-single div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
display: block;
|
||||
width: 18px;
|
||||
height: 100%;
|
||||
}
|
||||
.chosen-container-single .chosen-single div b {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url('chosen-sprite.png') no-repeat 0px 2px;
|
||||
}
|
||||
.chosen-container-single .chosen-search {
|
||||
position: relative;
|
||||
z-index: 1010;
|
||||
margin: 0;
|
||||
padding: 3px 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.chosen-container-single .chosen-search input[type="text"] {
|
||||
margin: 1px 0;
|
||||
padding: 4px 20px 4px 5px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
outline: 0;
|
||||
border: 1px solid #aaa;
|
||||
background: white url('chosen-sprite.png') no-repeat 100% -20px;
|
||||
background: url('chosen-sprite.png') no-repeat 100% -20px;
|
||||
font-size: 1em;
|
||||
font-family: sans-serif;
|
||||
line-height: normal;
|
||||
border-radius: 0;
|
||||
}
|
||||
.chosen-container-single .chosen-drop {
|
||||
margin-top: -1px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
.chosen-container-single.chosen-container-single-nosearch .chosen-search {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Results */
|
||||
.chosen-container .chosen-results {
|
||||
color: #444;
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
margin: 0 4px 4px 0;
|
||||
padding: 0 0 0 4px;
|
||||
max-height: 240px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.chosen-container .chosen-results li {
|
||||
display: none;
|
||||
margin: 0;
|
||||
padding: 5px 6px;
|
||||
list-style: none;
|
||||
line-height: 15px;
|
||||
word-wrap: break-word;
|
||||
-webkit-touch-callout: none;
|
||||
}
|
||||
.chosen-container .chosen-results li.active-result {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
.chosen-container .chosen-results li.disabled-result {
|
||||
display: list-item;
|
||||
color: #ccc;
|
||||
cursor: default;
|
||||
}
|
||||
.chosen-container .chosen-results li.highlighted {
|
||||
background-color: #3875d7;
|
||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
|
||||
background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
|
||||
background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
|
||||
background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
|
||||
background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
|
||||
color: #fff;
|
||||
}
|
||||
.chosen-container .chosen-results li.no-results {
|
||||
color: #777;
|
||||
display: list-item;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
.chosen-container .chosen-results li.group-result {
|
||||
display: list-item;
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
}
|
||||
.chosen-container .chosen-results li.group-option {
|
||||
padding-left: 15px;
|
||||
}
|
||||
.chosen-container .chosen-results li em {
|
||||
font-style: normal;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Multi Chosen */
|
||||
.chosen-container-multi .chosen-choices {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
width: 100%;
|
||||
height: auto !important;
|
||||
height: 1%;
|
||||
border: 1px solid #aaa;
|
||||
background-color: #fff;
|
||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
cursor: text;
|
||||
}
|
||||
.chosen-container-multi .chosen-choices li {
|
||||
float: left;
|
||||
list-style: none;
|
||||
}
|
||||
.chosen-container-multi .chosen-choices li.search-field {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
|
||||
margin: 1px 0;
|
||||
padding: 0;
|
||||
height: 25px;
|
||||
outline: 0;
|
||||
border: 0 !important;
|
||||
background: transparent !important;
|
||||
box-shadow: none;
|
||||
color: #999;
|
||||
font-size: 100%;
|
||||
font-family: sans-serif;
|
||||
line-height: normal;
|
||||
border-radius: 0;
|
||||
}
|
||||
.chosen-container-multi .chosen-choices li.search-choice {
|
||||
position: relative;
|
||||
margin: 3px 5px 3px 0;
|
||||
padding: 3px 20px 3px 5px;
|
||||
border: 1px solid #aaa;
|
||||
max-width: 100%;
|
||||
border-radius: 3px;
|
||||
background-color: #eeeeee;
|
||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
||||
background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-size: 100% 19px;
|
||||
background-repeat: repeat-x;
|
||||
background-clip: padding-box;
|
||||
box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
|
||||
color: #333;
|
||||
line-height: 13px;
|
||||
cursor: default;
|
||||
}
|
||||
.chosen-container-multi .chosen-choices li.search-choice span {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 3px;
|
||||
display: block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: url('chosen-sprite.png') -42px 1px no-repeat;
|
||||
font-size: 1px;
|
||||
}
|
||||
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
|
||||
background-position: -42px -10px;
|
||||
}
|
||||
.chosen-container-multi .chosen-choices li.search-choice-disabled {
|
||||
padding-right: 5px;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #e4e4e4;
|
||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
||||
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
color: #666;
|
||||
}
|
||||
.chosen-container-multi .chosen-choices li.search-choice-focus {
|
||||
background: #d4d4d4;
|
||||
}
|
||||
.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
|
||||
background-position: -42px -10px;
|
||||
}
|
||||
.chosen-container-multi .chosen-results {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.chosen-container-multi .chosen-drop .result-selected {
|
||||
display: list-item;
|
||||
color: #ccc;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Active */
|
||||
.chosen-container-active .chosen-single {
|
||||
border: 1px solid #5897fb;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.chosen-container-active.chosen-with-drop .chosen-single {
|
||||
border: 1px solid #aaa;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
|
||||
background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%);
|
||||
background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%);
|
||||
background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%);
|
||||
background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
|
||||
box-shadow: 0 1px 0 #fff inset;
|
||||
}
|
||||
.chosen-container-active.chosen-with-drop .chosen-single div {
|
||||
border-left: none;
|
||||
background: transparent;
|
||||
}
|
||||
.chosen-container-active.chosen-with-drop .chosen-single div b {
|
||||
background-position: -18px 2px;
|
||||
}
|
||||
.chosen-container-active .chosen-choices {
|
||||
border: 1px solid #5897fb;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.chosen-container-active .chosen-choices li.search-field input[type="text"] {
|
||||
color: #222 !important;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Disabled Support */
|
||||
.chosen-disabled {
|
||||
opacity: 0.5 !important;
|
||||
cursor: default;
|
||||
}
|
||||
.chosen-disabled .chosen-single {
|
||||
cursor: default;
|
||||
}
|
||||
.chosen-disabled .chosen-choices .search-choice .search-choice-close {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Right to Left */
|
||||
.chosen-rtl {
|
||||
text-align: right;
|
||||
}
|
||||
.chosen-rtl .chosen-single {
|
||||
overflow: visible;
|
||||
padding: 0 8px 0 0;
|
||||
}
|
||||
.chosen-rtl .chosen-single span {
|
||||
margin-right: 0;
|
||||
margin-left: 26px;
|
||||
direction: rtl;
|
||||
}
|
||||
.chosen-rtl .chosen-single-with-deselect span {
|
||||
margin-left: 38px;
|
||||
}
|
||||
.chosen-rtl .chosen-single div {
|
||||
right: auto;
|
||||
left: 3px;
|
||||
}
|
||||
.chosen-rtl .chosen-single abbr {
|
||||
right: auto;
|
||||
left: 26px;
|
||||
}
|
||||
.chosen-rtl .chosen-choices li {
|
||||
float: right;
|
||||
}
|
||||
.chosen-rtl .chosen-choices li.search-field input[type="text"] {
|
||||
direction: rtl;
|
||||
}
|
||||
.chosen-rtl .chosen-choices li.search-choice {
|
||||
margin: 3px 5px 3px 0;
|
||||
padding: 3px 5px 3px 19px;
|
||||
}
|
||||
.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
|
||||
right: auto;
|
||||
left: 4px;
|
||||
}
|
||||
.chosen-rtl.chosen-container-single-nosearch .chosen-search,
|
||||
.chosen-rtl .chosen-drop {
|
||||
left: 9999px;
|
||||
}
|
||||
.chosen-rtl.chosen-container-single .chosen-results {
|
||||
margin: 0 0 4px 4px;
|
||||
padding: 0 4px 0 0;
|
||||
}
|
||||
.chosen-rtl .chosen-results li.group-option {
|
||||
padding-right: 15px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
|
||||
border-right: none;
|
||||
}
|
||||
.chosen-rtl .chosen-search input[type="text"] {
|
||||
padding: 4px 5px 4px 20px;
|
||||
background: white url('chosen-sprite.png') no-repeat -30px -20px;
|
||||
background: url('chosen-sprite.png') no-repeat -30px -20px;
|
||||
direction: rtl;
|
||||
}
|
||||
.chosen-rtl.chosen-container-single .chosen-single div b {
|
||||
background-position: 6px 2px;
|
||||
}
|
||||
.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
|
||||
background-position: -12px 2px;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Retina compatibility */
|
||||
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
|
||||
.chosen-rtl .chosen-search input[type="text"],
|
||||
.chosen-container-single .chosen-single abbr,
|
||||
.chosen-container-single .chosen-single div b,
|
||||
.chosen-container-single .chosen-search input[type="text"],
|
||||
.chosen-container-multi .chosen-choices .search-choice .search-choice-close,
|
||||
.chosen-container .chosen-results-scroll-down span,
|
||||
.chosen-container .chosen-results-scroll-up span {
|
||||
background-image: url('chosen-sprite@2x.png') !important;
|
||||
background-size: 52px 37px !important;
|
||||
background-repeat: no-repeat !important;
|
||||
}
|
||||
}
|
||||
/* @end */
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 43 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 107 B |
|
After Width: | Height: | Size: 106 B |
|
After Width: | Height: | Size: 347 B |
|
After Width: | Height: | Size: 324 B |
|
After Width: | Height: | Size: 111 B |
|
After Width: | Height: | Size: 352 B |
|
After Width: | Height: | Size: 340 B |
|
After Width: | Height: | Size: 103 B |
|
After Width: | Height: | Size: 503 B |
|
After Width: | Height: | Size: 96 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 506 B |
|
After Width: | Height: | Size: 203 B |
|
After Width: | Height: | Size: 176 B |
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,359 @@
|
||||
/*
|
||||
* FancyBox - jQuery Plugin
|
||||
* Simple and fancy lightbox alternative
|
||||
*
|
||||
* Examples and documentation at: http://fancybox.net
|
||||
*
|
||||
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
||||
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
||||
*
|
||||
* Version: 1.3.4 (11/11/2010)
|
||||
* Requires: jQuery v1.3+
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*/
|
||||
|
||||
#fancybox-loading {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-top: -20px;
|
||||
margin-left: -20px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
z-index: 1104;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-loading div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 40px;
|
||||
height: 480px;
|
||||
background-image: url('fancybox.png');
|
||||
}
|
||||
|
||||
#fancybox-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 1100;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-tmp {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
overflow: auto;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-wrap {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 20px;
|
||||
z-index: 1101;
|
||||
outline: none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-outer {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#fancybox-content {
|
||||
width: 0;
|
||||
height: 0;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
z-index: 1102;
|
||||
border: 0px solid #fff;
|
||||
}
|
||||
|
||||
#fancybox-hide-sel-frame {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: transparent;
|
||||
z-index: 1101;
|
||||
}
|
||||
|
||||
#fancybox-close {
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
right: -15px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: transparent url('fancybox.png') -40px 0px;
|
||||
cursor: pointer;
|
||||
z-index: 1103;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-error {
|
||||
color: #444;
|
||||
font: normal 12px/20px Arial;
|
||||
padding: 14px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#fancybox-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
line-height: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#fancybox-frame {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#fancybox-left, #fancybox-right {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
height: 100%;
|
||||
width: 35%;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
background: transparent url('blank.gif');
|
||||
z-index: 1102;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-left {
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
#fancybox-right {
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
#fancybox-left-ico, #fancybox-right-ico {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: -9999px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-top: -15px;
|
||||
cursor: pointer;
|
||||
z-index: 1102;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#fancybox-left-ico {
|
||||
background-image: url('fancybox.png');
|
||||
background-position: -40px -30px;
|
||||
}
|
||||
|
||||
#fancybox-right-ico {
|
||||
background-image: url('fancybox.png');
|
||||
background-position: -40px -60px;
|
||||
}
|
||||
|
||||
#fancybox-left:hover, #fancybox-right:hover {
|
||||
visibility: visible; /* IE6 */
|
||||
}
|
||||
|
||||
#fancybox-left:hover span {
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
#fancybox-right:hover span {
|
||||
left: auto;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.fancybox-bg {
|
||||
position: absolute;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
#fancybox-bg-n {
|
||||
top: -20px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-image: url('fancybox-x.png');
|
||||
}
|
||||
|
||||
#fancybox-bg-ne {
|
||||
top: -20px;
|
||||
right: -20px;
|
||||
background-image: url('fancybox.png');
|
||||
background-position: -40px -162px;
|
||||
}
|
||||
|
||||
#fancybox-bg-e {
|
||||
top: 0;
|
||||
right: -20px;
|
||||
height: 100%;
|
||||
background-image: url('fancybox-y.png');
|
||||
background-position: -20px 0px;
|
||||
}
|
||||
|
||||
#fancybox-bg-se {
|
||||
bottom: -20px;
|
||||
right: -20px;
|
||||
background-image: url('fancybox.png');
|
||||
background-position: -40px -182px;
|
||||
}
|
||||
|
||||
#fancybox-bg-s {
|
||||
bottom: -20px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-image: url('fancybox-x.png');
|
||||
background-position: 0px -20px;
|
||||
}
|
||||
|
||||
#fancybox-bg-sw {
|
||||
bottom: -20px;
|
||||
left: -20px;
|
||||
background-image: url('fancybox.png');
|
||||
background-position: -40px -142px;
|
||||
}
|
||||
|
||||
#fancybox-bg-w {
|
||||
top: 0;
|
||||
left: -20px;
|
||||
height: 100%;
|
||||
background-image: url('fancybox-y.png');
|
||||
}
|
||||
|
||||
#fancybox-bg-nw {
|
||||
top: -20px;
|
||||
left: -20px;
|
||||
background-image: url('fancybox.png');
|
||||
background-position: -40px -122px;
|
||||
}
|
||||
|
||||
#fancybox-title {
|
||||
font-family: Helvetica;
|
||||
font-size: 12px;
|
||||
z-index: 1102;
|
||||
}
|
||||
|
||||
.fancybox-title-inside {
|
||||
padding-bottom: 10px;
|
||||
text-align: center;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fancybox-title-outside {
|
||||
padding-top: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.fancybox-title-over {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
color: #FFF;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#fancybox-title-over {
|
||||
padding: 10px;
|
||||
background-image: url('fancy_title_over.png');
|
||||
display: block;
|
||||
}
|
||||
|
||||
.fancybox-title-float {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: -20px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
#fancybox-title-float-wrap {
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#fancybox-title-float-wrap td {
|
||||
border: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#fancybox-title-float-left {
|
||||
padding: 0 0 0 15px;
|
||||
background: url('fancybox.png') -40px -90px no-repeat;
|
||||
}
|
||||
|
||||
#fancybox-title-float-main {
|
||||
color: #FFF;
|
||||
line-height: 29px;
|
||||
font-weight: bold;
|
||||
padding: 0 0 3px 0;
|
||||
background: url('fancybox-x.png') 0px -40px;
|
||||
}
|
||||
|
||||
#fancybox-title-float-right {
|
||||
padding: 0 0 0 15px;
|
||||
background: url('fancybox.png') -55px -90px no-repeat;
|
||||
}
|
||||
|
||||
/* IE6 */
|
||||
|
||||
.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
|
||||
|
||||
.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
|
||||
.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
|
||||
|
||||
.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
|
||||
.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
|
||||
.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
|
||||
.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
|
||||
|
||||
.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
|
||||
height: expression(this.parentNode.clientHeight + "px");
|
||||
}
|
||||
|
||||
#fancybox-loading.fancybox-ie6 {
|
||||
position: absolute; margin-top: 0;
|
||||
top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
|
||||
}
|
||||
|
||||
#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
|
||||
|
||||
/* IE6, IE7, IE8 */
|
||||
|
||||
.fancybox-ie .fancybox-bg { background: transparent !important; }
|
||||
|
||||
.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
|
||||
@@ -0,0 +1,360 @@
|
||||
html,body{margin:0;padding:0;}
|
||||
h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;}
|
||||
table{border-collapse:collapse;border-spacing:0;}
|
||||
ol,ul{list-style:none;}
|
||||
q:before,q:after,blockquote:before,blockquote:after{content:"";}
|
||||
html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
|
||||
a:focus{outline:thin dotted;}
|
||||
a:hover,a:active{outline:0;}
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
|
||||
audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
|
||||
audio:not([controls]){display:none;}
|
||||
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
|
||||
sup{top:-0.5em;}
|
||||
sub{bottom:-0.25em;}
|
||||
img{border:0;-ms-interpolation-mode:bicubic;}
|
||||
button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}
|
||||
button,input{line-height:normal;*overflow:visible;}
|
||||
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
|
||||
button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
|
||||
input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
|
||||
input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
|
||||
textarea{overflow:auto;vertical-align:top;}
|
||||
body{background-color:#ffffff;margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#404040;}
|
||||
.container{width:940px;margin-left:auto;margin-right:auto;zoom:1;}.container:before,.container:after{display:table;content:"";zoom:1;}
|
||||
.container:after{clear:both;}
|
||||
.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;}
|
||||
.container-fluid:after{clear:both;}
|
||||
.container-fluid>.sidebar{position:absolute;top:0;left:20px;width:220px;}
|
||||
.container-fluid>.content{margin-left:240px;}
|
||||
a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;}
|
||||
.pull-right{float:right;}
|
||||
.pull-left{float:left;}
|
||||
.hide{display:none;}
|
||||
.show{display:block;}
|
||||
.row{zoom:1;margin-left:-20px;}.row:before,.row:after{display:table;content:"";zoom:1;}
|
||||
.row:after{clear:both;}
|
||||
.row>[class*="span"]{display:inline;float:left;margin-left:20px;}
|
||||
.span1{width:40px;}
|
||||
.span2{width:100px;}
|
||||
.span3{width:160px;}
|
||||
.span4{width:220px;}
|
||||
.span5{width:280px;}
|
||||
.span6{width:340px;}
|
||||
.span7{width:400px;}
|
||||
.span8{width:460px;}
|
||||
.span9{width:520px;}
|
||||
.span10{width:580px;}
|
||||
.span11{width:640px;}
|
||||
.span12{width:700px;}
|
||||
.span13{width:760px;}
|
||||
.span14{width:820px;}
|
||||
.span15{width:880px;}
|
||||
.span16{width:940px;}
|
||||
.span17{width:1000px;}
|
||||
.span18{width:1060px;}
|
||||
.span19{width:1120px;}
|
||||
.span20{width:1180px;}
|
||||
.span21{width:1240px;}
|
||||
.span22{width:1300px;}
|
||||
.span23{width:1360px;}
|
||||
.span24{width:1420px;}
|
||||
.row>.offset1{margin-left:80px;}
|
||||
.row>.offset2{margin-left:140px;}
|
||||
.row>.offset3{margin-left:200px;}
|
||||
.row>.offset4{margin-left:260px;}
|
||||
.row>.offset5{margin-left:320px;}
|
||||
.row>.offset6{margin-left:380px;}
|
||||
.row>.offset7{margin-left:440px;}
|
||||
.row>.offset8{margin-left:500px;}
|
||||
.row>.offset9{margin-left:560px;}
|
||||
.row>.offset10{margin-left:620px;}
|
||||
.row>.offset11{margin-left:680px;}
|
||||
.row>.offset12{margin-left:740px;}
|
||||
.span-one-third{width:300px;}
|
||||
.span-two-thirds{width:620px;}
|
||||
.row>.offset-one-third{margin-left:340px;}
|
||||
.row>.offset-two-thirds{margin-left:660px;}
|
||||
p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;}
|
||||
h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;}
|
||||
h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;}
|
||||
h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;}
|
||||
h3,h4,h5,h6{line-height:36px;}
|
||||
h3{font-size:18px;}h3 small{font-size:14px;}
|
||||
h4{font-size:16px;}h4 small{font-size:12px;}
|
||||
h5{font-size:14px;}
|
||||
h6{font-size:13px;color:#bfbfbf;text-transform:uppercase;}
|
||||
ul,ol{margin:0 0 18px 25px;}
|
||||
ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
|
||||
ul{list-style:disc;}
|
||||
ol{list-style:decimal;}
|
||||
li{line-height:18px;color:#808080;}
|
||||
ul.unstyled{list-style:none;margin-left:0;}
|
||||
dl{margin-bottom:18px;}dl dt,dl dd{line-height:18px;}
|
||||
dl dt{font-weight:bold;}
|
||||
dl dd{margin-left:9px;}
|
||||
hr{margin:20px 0 19px;border:0;border-bottom:1px solid #eee;}
|
||||
strong{font-style:inherit;font-weight:bold;}
|
||||
em{font-style:italic;font-weight:inherit;line-height:inherit;}
|
||||
.muted{color:#bfbfbf;}
|
||||
blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;}
|
||||
blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';}
|
||||
address{display:block;line-height:18px;margin-bottom:18px;}
|
||||
code,pre{padding:0 3px 2px;font-family:Monaco, Andale Mono, Courier New, monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
code{background-color:#fee9cc;color:rgba(0, 0, 0, 0.75);padding:1px 3px;}
|
||||
pre{background-color:#f5f5f5;display:block;padding:8.5px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre;white-space:pre-wrap;word-wrap:break-word;}
|
||||
form{margin-bottom:18px;}
|
||||
fieldset{margin-bottom:18px;padding-top:18px;}fieldset legend{display:block;padding-left:150px;font-size:19.5px;line-height:1;color:#404040;*padding:0 0 5px 145px;*line-height:1.5;}
|
||||
form .clearfix{margin-bottom:18px;zoom:1;}form .clearfix:before,form .clearfix:after{display:table;content:"";zoom:1;}
|
||||
form .clearfix:after{clear:both;}
|
||||
label,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:normal;}
|
||||
label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040;}
|
||||
form .input{margin-left:150px;}
|
||||
input[type=checkbox],input[type=radio]{cursor:pointer;}
|
||||
input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;font-size:13px;line-height:18px;color:#808080;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
select{padding:initial;}
|
||||
input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:none;}
|
||||
input[type=file]{background-color:#ffffff;padding:initial;border:initial;line-height:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
|
||||
input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;}
|
||||
select,input[type=file]{height:27px;*height:auto;line-height:27px;*margin-top:4px;}
|
||||
select[multiple]{height:inherit;background-color:#ffffff;}
|
||||
textarea{height:auto;}
|
||||
.uneditable-input{background-color:#ffffff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
|
||||
:-moz-placeholder{color:#bfbfbf;}
|
||||
::-webkit-input-placeholder{color:#bfbfbf;}
|
||||
input,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);}
|
||||
input:focus,textarea:focus{outline:0;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);}
|
||||
input[type=file]:focus,input[type=checkbox]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:1px dotted #666;}
|
||||
form .clearfix.error>label,form .clearfix.error .help-block,form .clearfix.error .help-inline{color:#b94a48;}
|
||||
form .clearfix.error input,form .clearfix.error textarea{color:#b94a48;border-color:#ee5f5b;}form .clearfix.error input:focus,form .clearfix.error textarea:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
|
||||
form .clearfix.error .input-prepend .add-on,form .clearfix.error .input-append .add-on{color:#b94a48;background-color:#fce6e6;border-color:#b94a48;}
|
||||
form .clearfix.warning>label,form .clearfix.warning .help-block,form .clearfix.warning .help-inline{color:#c09853;}
|
||||
form .clearfix.warning input,form .clearfix.warning textarea{color:#c09853;border-color:#ccae64;}form .clearfix.warning input:focus,form .clearfix.warning textarea:focus{border-color:#be9a3f;-webkit-box-shadow:0 0 6px #e5d6b1;-moz-box-shadow:0 0 6px #e5d6b1;box-shadow:0 0 6px #e5d6b1;}
|
||||
form .clearfix.warning .input-prepend .add-on,form .clearfix.warning .input-append .add-on{color:#c09853;background-color:#d2b877;border-color:#c09853;}
|
||||
form .clearfix.success>label,form .clearfix.success .help-block,form .clearfix.success .help-inline{color:#468847;}
|
||||
form .clearfix.success input,form .clearfix.success textarea{color:#468847;border-color:#57a957;}form .clearfix.success input:focus,form .clearfix.success textarea:focus{border-color:#458845;-webkit-box-shadow:0 0 6px #9acc9a;-moz-box-shadow:0 0 6px #9acc9a;box-shadow:0 0 6px #9acc9a;}
|
||||
form .clearfix.success .input-prepend .add-on,form .clearfix.success .input-append .add-on{color:#468847;background-color:#bcddbc;border-color:#468847;}
|
||||
.input-mini,input.mini,textarea.mini,select.mini{width:60px;}
|
||||
.input-small,input.small,textarea.small,select.small{width:90px;}
|
||||
.input-medium,input.medium,textarea.medium,select.medium{width:150px;}
|
||||
.input-large,input.large,textarea.large,select.large{width:210px;}
|
||||
.input-xlarge,input.xlarge,textarea.xlarge,select.xlarge{width:270px;}
|
||||
.input-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px;}
|
||||
textarea.xxlarge{overflow-y:auto;}
|
||||
input.span1,textarea.span1{display:inline-block;float:none;width:30px;margin-left:0;}
|
||||
input.span2,textarea.span2{display:inline-block;float:none;width:90px;margin-left:0;}
|
||||
input.span3,textarea.span3{display:inline-block;float:none;width:150px;margin-left:0;}
|
||||
input.span4,textarea.span4{display:inline-block;float:none;width:210px;margin-left:0;}
|
||||
input.span5,textarea.span5{display:inline-block;float:none;width:270px;margin-left:0;}
|
||||
input.span6,textarea.span6{display:inline-block;float:none;width:330px;margin-left:0;}
|
||||
input.span7,textarea.span7{display:inline-block;float:none;width:390px;margin-left:0;}
|
||||
input.span8,textarea.span8{display:inline-block;float:none;width:450px;margin-left:0;}
|
||||
input.span9,textarea.span9{display:inline-block;float:none;width:510px;margin-left:0;}
|
||||
input.span10,textarea.span10{display:inline-block;float:none;width:570px;margin-left:0;}
|
||||
input.span11,textarea.span11{display:inline-block;float:none;width:630px;margin-left:0;}
|
||||
input.span12,textarea.span12{display:inline-block;float:none;width:690px;margin-left:0;}
|
||||
input.span13,textarea.span13{display:inline-block;float:none;width:750px;margin-left:0;}
|
||||
input.span14,textarea.span14{display:inline-block;float:none;width:810px;margin-left:0;}
|
||||
input.span15,textarea.span15{display:inline-block;float:none;width:870px;margin-left:0;}
|
||||
input.span16,textarea.span16{display:inline-block;float:none;width:930px;margin-left:0;}
|
||||
input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;}
|
||||
.actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;}.actions .secondary-action{float:right;}.actions .secondary-action a{line-height:30px;}.actions .secondary-action a:hover{text-decoration:underline;}
|
||||
.help-inline,.help-block{font-size:13px;line-height:18px;color:#bfbfbf;}
|
||||
.help-inline{padding-left:5px;*position:relative;*top:-5px;}
|
||||
.help-block{display:block;max-width:600px;}
|
||||
.inline-inputs{color:#808080;}.inline-inputs span{padding:0 2px 0 1px;}
|
||||
.input-prepend input,.input-append input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
|
||||
.input-prepend .add-on,.input-append .add-on{position:relative;background:#f5f5f5;border:1px solid #ccc;z-index:2;float:left;display:block;width:auto;min-width:16px;height:18px;padding:4px 4px 4px 5px;margin-right:-1px;font-weight:normal;line-height:18px;color:#bfbfbf;text-align:center;text-shadow:0 1px 0 #ffffff;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
|
||||
.input-prepend .active,.input-append .active{background:#a9dba9;border-color:#46a546;}
|
||||
.input-prepend .add-on{*margin-top:1px;}
|
||||
.input-append input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
|
||||
.input-append .add-on{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:0;margin-left:-1px;}
|
||||
.inputs-list{margin:0 0 5px;width:100%;}.inputs-list li{display:block;padding:0;width:100%;}
|
||||
.inputs-list label{display:block;float:none;width:auto;padding:0;margin-left:20px;line-height:18px;text-align:left;white-space:normal;}.inputs-list label strong{color:#808080;}
|
||||
.inputs-list label small{font-size:11px;font-weight:normal;}
|
||||
.inputs-list .inputs-list{margin-left:25px;margin-bottom:10px;padding-top:0;}
|
||||
.inputs-list:first-child{padding-top:6px;}
|
||||
.inputs-list li+li{padding-top:2px;}
|
||||
.inputs-list input[type=radio],.inputs-list input[type=checkbox]{margin-bottom:0;margin-left:-20px;float:left;}
|
||||
.form-stacked{padding-left:20px;}.form-stacked fieldset{padding-top:9px;}
|
||||
.form-stacked legend{padding-left:0;}
|
||||
.form-stacked label{display:block;float:none;width:auto;font-weight:bold;text-align:left;line-height:20px;padding-top:0;}
|
||||
.form-stacked .clearfix{margin-bottom:9px;}.form-stacked .clearfix div.input{margin-left:0;}
|
||||
.form-stacked .inputs-list{margin-bottom:0;}.form-stacked .inputs-list li{padding-top:0;}.form-stacked .inputs-list li label{font-weight:normal;padding-top:0;}
|
||||
.form-stacked div.clearfix.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px;}
|
||||
.form-stacked .actions{margin-left:-20px;padding-left:20px;}
|
||||
table{width:100%;margin-bottom:18px;padding:0;font-size:13px;border-collapse:collapse;}table th,table td{padding:10px 10px 9px;line-height:18px;text-align:left;}
|
||||
table th{padding-top:9px;font-weight:bold;vertical-align:middle;}
|
||||
table td{vertical-align:top;border-top:1px solid #ddd;}
|
||||
table tbody th{border-top:1px solid #ddd;vertical-align:top;}
|
||||
.condensed-table th,.condensed-table td{padding:5px 5px 4px;}
|
||||
.bordered-table{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.bordered-table th+th,.bordered-table td+td,.bordered-table th+td{border-left:1px solid #ddd;}
|
||||
.bordered-table thead tr:first-child th:first-child,.bordered-table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
|
||||
.bordered-table thead tr:first-child th:last-child,.bordered-table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
|
||||
.bordered-table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
|
||||
.bordered-table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
|
||||
table .span1{width:20px;}
|
||||
table .span2{width:60px;}
|
||||
table .span3{width:100px;}
|
||||
table .span4{width:140px;}
|
||||
table .span5{width:180px;}
|
||||
table .span6{width:220px;}
|
||||
table .span7{width:260px;}
|
||||
table .span8{width:300px;}
|
||||
table .span9{width:340px;}
|
||||
table .span10{width:380px;}
|
||||
table .span11{width:420px;}
|
||||
table .span12{width:460px;}
|
||||
table .span13{width:500px;}
|
||||
table .span14{width:540px;}
|
||||
table .span15{width:580px;}
|
||||
table .span16{width:620px;}
|
||||
.zebra-striped tbody tr:nth-child(odd) td,.zebra-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
|
||||
.zebra-striped tbody tr:hover td,.zebra-striped tbody tr:hover th{background-color:#f5f5f5;}
|
||||
table .header{cursor:pointer;}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;}
|
||||
table .headerSortUp,table .headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);}
|
||||
table .header:hover:after{visibility:visible;}
|
||||
table .headerSortDown:after,table .headerSortDown:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;}
|
||||
table .headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;}
|
||||
table .blue{color:#049cdb;border-bottom-color:#049cdb;}
|
||||
table .headerSortUp.blue,table .headerSortDown.blue{background-color:#ade6fe;}
|
||||
table .green{color:#46a546;border-bottom-color:#46a546;}
|
||||
table .headerSortUp.green,table .headerSortDown.green{background-color:#cdeacd;}
|
||||
table .red{color:#9d261d;border-bottom-color:#9d261d;}
|
||||
table .headerSortUp.red,table .headerSortDown.red{background-color:#f4c8c5;}
|
||||
table .yellow{color:#ffc40d;border-bottom-color:#ffc40d;}
|
||||
table .headerSortUp.yellow,table .headerSortDown.yellow{background-color:#fff6d9;}
|
||||
table .orange{color:#f89406;border-bottom-color:#f89406;}
|
||||
table .headerSortUp.orange,table .headerSortDown.orange{background-color:#fee9cc;}
|
||||
table .purple{color:#7a43b6;border-bottom-color:#7a43b6;}
|
||||
table .headerSortUp.purple,table .headerSortDown.purple{background-color:#e2d5f0;}
|
||||
.topbar{height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;}.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
|
||||
.topbar h3 a:hover,.topbar .brand:hover,.topbar ul .active>a{background-color:#333;background-color:rgba(255, 255, 255, 0.05);color:#ffffff;text-decoration:none;}
|
||||
.topbar h3{position:relative;}
|
||||
.topbar h3 a,.topbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;}
|
||||
.topbar p{margin:0;line-height:40px;}.topbar p a:hover{background-color:transparent;color:#ffffff;}
|
||||
.topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}
|
||||
.topbar form.pull-right{float:right;}
|
||||
.topbar input{background-color:#444;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;padding:4px 9px;color:#ffffff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.topbar input:-moz-placeholder{color:#e6e6e6;}
|
||||
.topbar input::-webkit-input-placeholder{color:#e6e6e6;}
|
||||
.topbar input:hover{background-color:#bfbfbf;background-color:rgba(255, 255, 255, 0.5);color:#ffffff;}
|
||||
.topbar input:focus,.topbar input.focused{outline:0;background-color:#ffffff;color:#404040;text-shadow:0 1px 0 #ffffff;border:0;padding:5px 10px;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);}
|
||||
.topbar-inner,.topbar .fill{background-color:#222;background-color:#222222;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}
|
||||
.topbar div>ul,.nav{display:block;float:left;margin:0 10px 0 0;position:relative;left:0;}.topbar div>ul>li,.nav>li{display:block;float:left;}
|
||||
.topbar div>ul a,.nav a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none;}.topbar div>ul a:hover,.nav a:hover{color:#ffffff;text-decoration:none;}
|
||||
.topbar div>ul .active>a,.nav .active>a{background-color:#222;background-color:rgba(0, 0, 0, 0.5);}
|
||||
.topbar div>ul.secondary-nav,.nav.secondary-nav{float:right;margin-left:10px;margin-right:0;}.topbar div>ul.secondary-nav .menu-dropdown,.nav.secondary-nav .menu-dropdown,.topbar div>ul.secondary-nav .dropdown-menu,.nav.secondary-nav .dropdown-menu{right:0;border:0;}
|
||||
.topbar div>ul a.menu:hover,.nav a.menu:hover,.topbar div>ul li.open .menu,.nav li.open .menu,.topbar div>ul .dropdown-toggle:hover,.nav .dropdown-toggle:hover,.topbar div>ul .dropdown.open .dropdown-toggle,.nav .dropdown.open .dropdown-toggle{background:#444;background:rgba(255, 255, 255, 0.05);}
|
||||
.topbar div>ul .menu-dropdown,.nav .menu-dropdown,.topbar div>ul .dropdown-menu,.nav .dropdown-menu{background-color:#333;}.topbar div>ul .menu-dropdown a.menu,.nav .menu-dropdown a.menu,.topbar div>ul .dropdown-menu a.menu,.nav .dropdown-menu a.menu,.topbar div>ul .menu-dropdown .dropdown-toggle,.nav .menu-dropdown .dropdown-toggle,.topbar div>ul .dropdown-menu .dropdown-toggle,.nav .dropdown-menu .dropdown-toggle{color:#ffffff;}.topbar div>ul .menu-dropdown a.menu.open,.nav .menu-dropdown a.menu.open,.topbar div>ul .dropdown-menu a.menu.open,.nav .dropdown-menu a.menu.open,.topbar div>ul .menu-dropdown .dropdown-toggle.open,.nav .menu-dropdown .dropdown-toggle.open,.topbar div>ul .dropdown-menu .dropdown-toggle.open,.nav .dropdown-menu .dropdown-toggle.open{background:#444;background:rgba(255, 255, 255, 0.05);}
|
||||
.topbar div>ul .menu-dropdown li a,.nav .menu-dropdown li a,.topbar div>ul .dropdown-menu li a,.nav .dropdown-menu li a{color:#999;text-shadow:0 1px 0 rgba(0, 0, 0, 0.5);}.topbar div>ul .menu-dropdown li a:hover,.nav .menu-dropdown li a:hover,.topbar div>ul .dropdown-menu li a:hover,.nav .dropdown-menu li a:hover{background-color:#191919;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));background-image:-moz-linear-gradient(top, #292929, #191919);background-image:-ms-linear-gradient(top, #292929, #191919);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));background-image:-webkit-linear-gradient(top, #292929, #191919);background-image:-o-linear-gradient(top, #292929, #191919);background-image:linear-gradient(top, #292929, #191919);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);color:#ffffff;}
|
||||
.topbar div>ul .menu-dropdown .active a,.nav .menu-dropdown .active a,.topbar div>ul .dropdown-menu .active a,.nav .dropdown-menu .active a{color:#ffffff;}
|
||||
.topbar div>ul .menu-dropdown .divider,.nav .menu-dropdown .divider,.topbar div>ul .dropdown-menu .divider,.nav .dropdown-menu .divider{background-color:#222;border-color:#444;}
|
||||
.topbar ul .menu-dropdown li a,.topbar ul .dropdown-menu li a{padding:4px 15px;}
|
||||
li.menu,.dropdown{position:relative;}
|
||||
a.menu:after,.dropdown-toggle:after{width:0;height:0;display:inline-block;content:"↓";text-indent:-99999px;vertical-align:top;margin-top:8px;margin-left:4px;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #ffffff;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;}
|
||||
.menu-dropdown,.dropdown-menu{background-color:#ffffff;float:left;display:none;position:absolute;top:40px;z-index:900;min-width:160px;max-width:220px;_width:160px;margin-left:0;margin-right:0;padding:6px 0;zoom:1;border-color:#999;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:0 1px 1px;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.menu-dropdown li,.dropdown-menu li{float:none;display:block;background-color:none;}
|
||||
.menu-dropdown .divider,.dropdown-menu .divider{height:1px;margin:5px 0;overflow:hidden;background-color:#eee;border-bottom:1px solid #ffffff;}
|
||||
.topbar .dropdown-menu a,.dropdown-menu a{display:block;padding:4px 15px;clear:both;font-weight:normal;line-height:18px;color:#808080;text-shadow:0 1px 0 #ffffff;}.topbar .dropdown-menu a:hover,.dropdown-menu a:hover,.topbar .dropdown-menu a.hover,.dropdown-menu a.hover{background-color:#dddddd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));background-image:-moz-linear-gradient(top, #eeeeee, #dddddd);background-image:-ms-linear-gradient(top, #eeeeee, #dddddd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));background-image:-webkit-linear-gradient(top, #eeeeee, #dddddd);background-image:-o-linear-gradient(top, #eeeeee, #dddddd);background-image:linear-gradient(top, #eeeeee, #dddddd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);color:#404040;text-decoration:none;-webkit-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);}
|
||||
.open .menu,.dropdown.open .menu,.open .dropdown-toggle,.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);}
|
||||
.open .menu-dropdown,.dropdown.open .menu-dropdown,.open .dropdown-menu,.dropdown.open .dropdown-menu{display:block;}
|
||||
.tabs,.pills{margin:0 0 18px;padding:0;list-style:none;zoom:1;}.tabs:before,.pills:before,.tabs:after,.pills:after{display:table;content:"";zoom:1;}
|
||||
.tabs:after,.pills:after{clear:both;}
|
||||
.tabs>li,.pills>li{float:left;}.tabs>li>a,.pills>li>a{display:block;}
|
||||
.tabs{border-color:#ddd;border-style:solid;border-width:0 0 1px;}.tabs>li{position:relative;margin-bottom:-1px;}.tabs>li>a{padding:0 15px;margin-right:2px;line-height:34px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.tabs>li>a:hover{text-decoration:none;background-color:#eee;border-color:#eee #eee #ddd;}
|
||||
.tabs .active>a,.tabs .active>a:hover{color:#808080;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
|
||||
.tabs .menu-dropdown,.tabs .dropdown-menu{top:35px;border-width:1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
|
||||
.tabs a.menu:after,.tabs .dropdown-toggle:after{border-top-color:#999;margin-top:15px;margin-left:5px;}
|
||||
.tabs li.open.menu .menu,.tabs .open.dropdown .dropdown-toggle{border-color:#999;}
|
||||
.tabs li.open a.menu:after,.tabs .dropdown.open .dropdown-toggle:after{border-top-color:#555;}
|
||||
.pills a{margin:5px 3px 5px 0;padding:0 15px;line-height:30px;text-shadow:0 1px 1px #ffffff;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}.pills a:hover{color:#ffffff;text-decoration:none;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#00438a;}
|
||||
.pills .active a{color:#ffffff;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#0069d6;}
|
||||
.pills-vertical>li{float:none;}
|
||||
.tab-content>.tab-pane,.pill-content>.pill-pane,.tab-content>div,.pill-content>div{display:none;}
|
||||
.tab-content>.active,.pill-content>.active{display:block;}
|
||||
.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#f5f5f5;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;}
|
||||
.breadcrumb .divider{padding:0 5px;color:#bfbfbf;}
|
||||
.breadcrumb .active a{color:#404040;}
|
||||
.hero-unit{background-color:#f5f5f5;margin-bottom:30px;padding:60px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;}
|
||||
.hero-unit p{font-size:18px;font-weight:200;line-height:27px;}
|
||||
footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee;}
|
||||
.page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}.page-header h1{margin-bottom:8px;}
|
||||
.btn.danger,.alert-message.danger,.btn.danger:hover,.alert-message.danger:hover,.btn.error,.alert-message.error,.btn.error:hover,.alert-message.error:hover,.btn.success,.alert-message.success,.btn.success:hover,.alert-message.success:hover,.btn.info,.alert-message.info,.btn.info:hover,.alert-message.info:hover{color:#ffffff;}
|
||||
.btn .close,.alert-message .close{font-family:Arial,sans-serif;line-height:18px;}
|
||||
.btn.danger,.alert-message.danger,.btn.error,.alert-message.error{background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
|
||||
.btn.success,.alert-message.success{background-color:#57a957;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#57a957 #57a957 #3d773d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
|
||||
.btn.info,.alert-message.info{background-color:#339bb9;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#339bb9 #339bb9 #22697d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
|
||||
.btn{cursor:pointer;display:inline-block;background-color:#e6e6e6;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);padding:5px 14px 6px;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);color:#333;font-size:13px;line-height:normal;border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-webkit-transition:0.1s linear all;-moz-transition:0.1s linear all;-ms-transition:0.1s linear all;-o-transition:0.1s linear all;transition:0.1s linear all;}.btn:hover{background-position:0 -15px;color:#333;text-decoration:none;}
|
||||
.btn:focus{outline:1px dotted #666;}
|
||||
.btn.primary{color:#ffffff;background-color:#0064cd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));background-image:-moz-linear-gradient(top, #049cdb, #0064cd);background-image:-ms-linear-gradient(top, #049cdb, #0064cd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));background-image:-webkit-linear-gradient(top, #049cdb, #0064cd);background-image:-o-linear-gradient(top, #049cdb, #0064cd);background-image:linear-gradient(top, #049cdb, #0064cd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#0064cd #0064cd #003f81;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
|
||||
.btn.active,.btn:active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);}
|
||||
.btn.disabled{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
|
||||
.btn[disabled]{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
|
||||
.btn.large{font-size:15px;line-height:normal;padding:9px 14px 9px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
|
||||
.btn.small{padding:7px 9px 7px;font-size:11px;}
|
||||
:root .alert-message,:root .btn{border-radius:0 \0;}
|
||||
button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0;}
|
||||
.close{float:right;color:#000000;font-size:20px;font-weight:bold;line-height:13.5px;text-shadow:0 1px 0 #ffffff;filter:alpha(opacity=25);-khtml-opacity:0.25;-moz-opacity:0.25;opacity:0.25;}.close:hover{color:#000000;text-decoration:none;filter:alpha(opacity=40);-khtml-opacity:0.4;-moz-opacity:0.4;opacity:0.4;}
|
||||
.alert-message{position:relative;padding:7px 15px;margin-bottom:18px;color:#404040;background-color:#eedc94;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));background-image:-moz-linear-gradient(top, #fceec1, #eedc94);background-image:-ms-linear-gradient(top, #fceec1, #eedc94);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));background-image:-webkit-linear-gradient(top, #fceec1, #eedc94);background-image:-o-linear-gradient(top, #fceec1, #eedc94);background-image:linear-gradient(top, #fceec1, #eedc94);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#eedc94 #eedc94 #e4c652;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);border-width:1px;border-style:solid;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);}.alert-message .close{margin-top:1px;*margin-top:0;}
|
||||
.alert-message a{font-weight:bold;color:#404040;}
|
||||
.alert-message.danger p a,.alert-message.error p a,.alert-message.success p a,.alert-message.info p a{color:#ffffff;}
|
||||
.alert-message h5{line-height:18px;}
|
||||
.alert-message p{margin-bottom:0;}
|
||||
.alert-message div{margin-top:5px;margin-bottom:2px;line-height:28px;}
|
||||
.alert-message .btn{-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);}
|
||||
.alert-message.block-message{background-image:none;background-color:#fdf5d9;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);padding:14px;border-color:#fceec1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}.alert-message.block-message ul,.alert-message.block-message p{margin-right:30px;}
|
||||
.alert-message.block-message ul{margin-bottom:0;}
|
||||
.alert-message.block-message li{color:#404040;}
|
||||
.alert-message.block-message .alert-actions{margin-top:5px;}
|
||||
.alert-message.block-message.error,.alert-message.block-message.success,.alert-message.block-message.info{color:#404040;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
|
||||
.alert-message.block-message.error{background-color:#fddfde;border-color:#fbc7c6;}
|
||||
.alert-message.block-message.success{background-color:#d1eed1;border-color:#bfe7bf;}
|
||||
.alert-message.block-message.info{background-color:#ddf4fb;border-color:#c6edf9;}
|
||||
.alert-message.block-message.danger p a,.alert-message.block-message.error p a,.alert-message.block-message.success p a,.alert-message.block-message.info p a{color:#404040;}
|
||||
.pagination{height:36px;margin:18px 0;}.pagination ul{float:left;margin:0;border:1px solid #ddd;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
|
||||
.pagination li{display:inline;}
|
||||
.pagination a{float:left;padding:0 14px;line-height:34px;border-right:1px solid;border-right-color:#ddd;border-right-color:rgba(0, 0, 0, 0.15);*border-right-color:#ddd;text-decoration:none;}
|
||||
.pagination a:hover,.pagination .active a{background-color:#c7eefe;}
|
||||
.pagination .disabled a,.pagination .disabled a:hover{background-color:transparent;color:#bfbfbf;}
|
||||
.pagination .next a{border:0;}
|
||||
.well{background-color:#f5f5f5;margin-bottom:20px;padding:19px;min-height:20px;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
|
||||
.modal-backdrop{background-color:#000000;position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000;}.modal-backdrop.fade{opacity:0;}
|
||||
.modal-backdrop,.modal-backdrop.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}
|
||||
.modal{position:fixed;top:50%;left:50%;z-index:11000;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal .close{margin-top:7px;}
|
||||
.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
|
||||
.modal.fade.in{top:50%;}
|
||||
.modal-header{border-bottom:1px solid #eee;padding:5px 15px;}
|
||||
.modal-body{padding:15px;}
|
||||
.modal-body form{margin-bottom:0;}
|
||||
.modal-footer{background-color:#f5f5f5;padding:14px 15px 15px;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;zoom:1;margin-bottom:0;}.modal-footer:before,.modal-footer:after{display:table;content:"";zoom:1;}
|
||||
.modal-footer:after{clear:both;}
|
||||
.modal-footer .btn{float:right;margin-left:5px;}
|
||||
.modal .popover,.modal .twipsy{z-index:12000;}
|
||||
.twipsy{display:block;position:absolute;visibility:visible;padding:5px;font-size:11px;z-index:1000;filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}.twipsy.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}
|
||||
.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
|
||||
.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
|
||||
.twipsy.below .twipsy-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
|
||||
.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
|
||||
.twipsy-inner{padding:3px 8px;background-color:#000000;color:white;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
|
||||
.twipsy-arrow{position:absolute;width:0;height:0;}
|
||||
.popover{position:absolute;top:0;left:0;z-index:1000;padding:5px;display:none;}.popover.above .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
|
||||
.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
|
||||
.popover.below .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
|
||||
.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
|
||||
.popover .arrow{position:absolute;width:0;height:0;}
|
||||
.popover .inner{background:#000000;background:rgba(0, 0, 0, 0.8);padding:3px;overflow:hidden;width:280px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);}
|
||||
.popover .title{background-color:#f5f5f5;padding:9px 15px;line-height:1;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border-bottom:1px solid #eee;}
|
||||
.popover .content{background-color:#ffffff;padding:14px;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover .content p,.popover .content ul,.popover .content ol{margin-bottom:0;}
|
||||
.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;}
|
||||
.label{padding:1px 3px 2px;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;white-space:nowrap;background-color:#bfbfbf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.label.important{background-color:#c43c35;}
|
||||
.label.warning{background-color:#f89406;}
|
||||
.label.success{background-color:#46a546;}
|
||||
.label.notice{background-color:#62cffc;}
|
||||
.media-grid{margin-left:-20px;margin-bottom:0;zoom:1;}.media-grid:before,.media-grid:after{display:table;content:"";zoom:1;}
|
||||
.media-grid:after{clear:both;}
|
||||
.media-grid li{display:inline;}
|
||||
.media-grid a{float:left;padding:4px;margin:0 0 18px 20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}.media-grid a img{display:block;}
|
||||
.media-grid a:hover{border-color:#0069d6;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);}
|
||||
|
||||
/* grocery CRUD extra */
|
||||
input,textarea,select,.uneditable-input{color:#444444;}
|
||||
/* ------------------ */
|
||||
@@ -0,0 +1,29 @@
|
||||
.qq-upload-button {
|
||||
display:block; /* or inline-block */
|
||||
padding: 7px 15px;
|
||||
text-align:center;
|
||||
border:1px solid #AAA;
|
||||
color: #555555;
|
||||
border-radius: 5px;
|
||||
float:left;
|
||||
|
||||
background: #ccc;
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
|
||||
background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
||||
background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
||||
background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
|
||||
background-image: -ms-linear-gradient(top, #cccccc 0%,#eeeeee 60%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#eeeeee',GradientType=0 );
|
||||
background-image: linear-gradient(top, #cccccc 0%,#eeeeee 60%);
|
||||
}
|
||||
.qq-upload-button:hover {
|
||||
background: #bbb;
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #bbb), color-stop(0.6, #ddd));
|
||||
background-image: -webkit-linear-gradient(center bottom, #bbb 0%, #ddd 60%);
|
||||
background-image: -moz-linear-gradient(center bottom, #bbb 0%, #ddd 60%);
|
||||
background-image: -o-linear-gradient(bottom, #bbb 0%, #ddd 60%);
|
||||
background-image: -ms-linear-gradient(top, #bbbbbb 0%,#dddddd 60%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bbbbbb', endColorstr='#dddddd',GradientType=0 );
|
||||
background-image: linear-gradient(top, #bbbbbb 0%,#dddddd 60%);
|
||||
}
|
||||
.qq-upload-button:focus {outline:1px dotted black;}
|
||||
@@ -0,0 +1,71 @@
|
||||
.qq-uploader { position:relative; width: 100%;}
|
||||
|
||||
.qq-upload-button {
|
||||
display:block; /* or inline-block */
|
||||
padding: 7px 15px;
|
||||
text-align:center;
|
||||
border:1px solid #AAA;
|
||||
color: #555555;
|
||||
border-radius: 5px;
|
||||
float:left;
|
||||
}
|
||||
.qq-upload-button-hover {
|
||||
|
||||
}
|
||||
.qq-upload-button-focus {outline:1px dotted black;}
|
||||
|
||||
.qq-upload-drop-area {
|
||||
position:absolute; top:0; left:0; width: 510px; height: 35px; z-index:2;
|
||||
background:#FF9797; text-align:center;
|
||||
}
|
||||
.qq-upload-drop-area span {
|
||||
display:block; position:absolute; top: 50%; width:100%; margin-top:-8px; font-size:16px;
|
||||
}
|
||||
.qq-upload-drop-area-active {background:#FF7171;}
|
||||
|
||||
.qq-upload-list {margin: 10px 5px 0px 10px; padding:0; list-style: none; float:left;}
|
||||
.qq-upload-list li { margin:0; padding:0; line-height:15px; font-size:12px; float:left;}
|
||||
.qq-upload-file, .qq-upload-spinner, .qq-upload-size, .qq-upload-cancel, .qq-upload-failed-text {
|
||||
margin-right: 7px;
|
||||
}
|
||||
.qq-upload-file {}
|
||||
.qq-upload-spinner {display:inline-block; background: url("loading.gif"); width:15px; height:15px; vertical-align:text-bottom;}
|
||||
.qq-upload-size,.qq-upload-cancel {font-size:11px;}
|
||||
|
||||
.qq-upload-failed-text {display:none;}
|
||||
.qq-upload-fail .qq-upload-failed-text {display:inline;}
|
||||
|
||||
a.qq-upload-cancel
|
||||
{
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
/* Grocery CRUD extras */
|
||||
a.open-file
|
||||
{
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.open-file:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
a.delete-anchor
|
||||
{
|
||||
color: red !important;
|
||||
}
|
||||
.image-thumbnail img
|
||||
{
|
||||
cursor: -moz-zoom-in;
|
||||
cursor: -webkit-zoom-in;
|
||||
}
|
||||
.form-field-box.even .image-thumbnail img
|
||||
{
|
||||
border: 4px solid #fff;
|
||||
}
|
||||
.form-field-box.odd .image-thumbnail img
|
||||
{
|
||||
border: 4px solid #ddd;
|
||||
}
|
||||
/* ------------------- */
|
||||
@@ -0,0 +1,56 @@
|
||||
@charset 'UTF-8';
|
||||
/*
|
||||
* jQuery File Upload UI Plugin CSS 6.0
|
||||
* https://github.com/blueimp/jQuery-File-Upload
|
||||
*
|
||||
* Copyright 2010, Sebastian Tschan
|
||||
* https://blueimp.net
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
.fileinput-button input {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
border: solid transparent;
|
||||
border-width: 0 0 100px 200px;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
-moz-transform: translate(-300px, 0) scale(4);
|
||||
direction: ltr;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fileinput-button {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.progressbar,
|
||||
.progressbar div {
|
||||
width: 200px;
|
||||
height: 20px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.3);
|
||||
-moz-box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.3);
|
||||
box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.3);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.progressbar div {
|
||||
width: auto;
|
||||
background: url(progressbar.gif);
|
||||
}
|
||||
|
||||
.fileupload-progressbar {
|
||||
float: right;
|
||||
width: 400px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
||||
.ui-timepicker-div dl { text-align: left; }
|
||||
.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
|
||||
.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
|
||||
.ui-timepicker-div td { font-size: 90%; }
|
||||
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
||||
|
||||
.ui-timepicker-rtl{ direction: rtl; }
|
||||
.ui-timepicker-rtl dl { text-align: right; }
|
||||
.ui-timepicker-rtl dl dd { margin: 0 65px 10px 10px; }
|
||||
@@ -0,0 +1,116 @@
|
||||
@CHARSET "UTF-8";
|
||||
|
||||
/*demo page css*/
|
||||
|
||||
|
||||
.demoHeaders {
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
#dialog_link {
|
||||
padding: .4em 1em .4em 20px;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#dialog_link span.ui-icon {
|
||||
margin: 0 5px 0 0;
|
||||
position: absolute;
|
||||
left: .2em;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
ul#icons {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul#icons li {
|
||||
margin: 2px;
|
||||
position: relative;
|
||||
padding: 4px 0;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul#icons span.ui-icon {
|
||||
float: left;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
|
||||
.selHrs, .selMins {
|
||||
width:2.5em;
|
||||
}
|
||||
.selHrs {
|
||||
margin-left:5px;
|
||||
}
|
||||
.dayPeriod {
|
||||
display:inline-block;
|
||||
width:20px;
|
||||
}
|
||||
.slider {
|
||||
height:120px;
|
||||
float:left;
|
||||
margin:10px
|
||||
}
|
||||
|
||||
#tpSelectedTime {
|
||||
margin-bottom:0;
|
||||
border-bottom:1px solid #aaa;
|
||||
padding:5px;
|
||||
color:#000;
|
||||
background:#fff;
|
||||
text-transform:none;
|
||||
|
||||
}
|
||||
#tpSelectedTime span {
|
||||
fon-weight:bold;
|
||||
}
|
||||
#datepicker {
|
||||
|
||||
}
|
||||
#pickerplug {
|
||||
overflow:hidden;
|
||||
display:none;
|
||||
position:absolute;
|
||||
top:200px;
|
||||
left:300px;
|
||||
padding:0;
|
||||
margin:0;
|
||||
z-index:500;
|
||||
}
|
||||
#pickerplug li {
|
||||
display:block;
|
||||
float:left;
|
||||
}
|
||||
#timepicker {
|
||||
border:1px solid #aaa;
|
||||
background:#fff;
|
||||
}
|
||||
#timepicker ul {
|
||||
overflow:hidden;
|
||||
padding:5px;
|
||||
}
|
||||
#timepicker ul li {
|
||||
position:relative;
|
||||
display:block;
|
||||
float:left;
|
||||
width:50px;
|
||||
|
||||
}
|
||||
#timepicker ul li h4 {
|
||||
width:100%;
|
||||
background:transparent;
|
||||
color:#000;
|
||||
text-align:center;
|
||||
}
|
||||
#timepicker ul li .slider {
|
||||
position:relative;
|
||||
left:10px;
|
||||
|
||||
/* background:#FBF9EE url(images/ui-bg_glass_55_fbf9ee_1x400.png) repeat-x scroll 50% 50%;
|
||||
border:1px solid #FCEFA1;*/
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Multiselect
|
||||
----------------------------------*/
|
||||
|
||||
.ui-multiselect { border: solid 1px; font-size: 0.8em; }
|
||||
.ui-multiselect ul { -moz-user-select: none; }
|
||||
.ui-multiselect li { margin: 0; padding: 0; cursor: default; line-height: 20px; height: 20px; font-size: 11px; list-style: none; }
|
||||
.ui-multiselect li a { color: #999; text-decoration: none; padding: 0; display: block; float: left; cursor: pointer;}
|
||||
.ui-multiselect li.ui-draggable-dragging { padding-left: 10px; }
|
||||
|
||||
.ui-multiselect div.selected { position: relative; padding: 0; margin: 0; border: 0; float:left; }
|
||||
.ui-multiselect ul.selected { position: relative; padding: 0; overflow: auto; overflow-x: hidden; background: #fff; margin: 0; list-style: none; border: 0; position: relative; width: 100%; }
|
||||
.ui-multiselect ul.selected li { }
|
||||
|
||||
.ui-multiselect div.available { position: relative; padding: 0; margin: 0; border: 0; float:left; border-left: 1px solid; }
|
||||
.ui-multiselect ul.available { position: relative; padding: 0; overflow: auto; overflow-x: hidden; background: #fff; margin: 0; list-style: none; border: 0; width: 100%; }
|
||||
.ui-multiselect ul.available li { padding-left: 10px; }
|
||||
|
||||
.ui-multiselect .ui-state-default { border: none; margin-bottom: 1px; position: relative; padding-left: 20px;}
|
||||
.ui-multiselect .ui-state-hover { border: none; }
|
||||
.ui-multiselect .ui-widget-header {border: none; font-size: 11px; margin-bottom: 1px;}
|
||||
|
||||
.ui-multiselect .add-all { float: right; padding: 10px 7px 10px 0; font-size: 11px; }
|
||||
.ui-multiselect .remove-all { float: right; padding: 10px 7px 11px 0; font-size: 11px; }
|
||||
.ui-multiselect .search { float: left; padding:0;}
|
||||
.ui-multiselect .count { float: left; padding: 10px 7px;}
|
||||
|
||||
.ui-multiselect li span.ui-icon-arrowthick-2-n-s { position: absolute; left: 2px; }
|
||||
.ui-multiselect li a.action { position: absolute; right: 2px; top: 2px; }
|
||||
|
||||
.ui-multiselect input.search { height: 20px !important; padding: 2px !important; opacity: 0.5 !important; margin: 4px !important; width: 150px !important; }
|
||||
|
||||
select.multiselect{ width:704px; }
|
||||
|
After Width: | Height: | Size: 143 B |
|
After Width: | Height: | Size: 143 B |
|
After Width: | Height: | Size: 33 KiB |
@@ -0,0 +1,644 @@
|
||||
/*
|
||||
|
||||
Uniform Theme: Uniform Default
|
||||
Version: 1.8
|
||||
By: Josh Pyles
|
||||
License: MIT License
|
||||
---
|
||||
For use with the Uniform plugin:
|
||||
http://pixelmatrixdesign.com/uniform/
|
||||
---
|
||||
Generated by Uniform Theme Generator:
|
||||
http://pixelmatrixdesign.com/uniform/themer.html
|
||||
|
||||
*/
|
||||
|
||||
/* Global Declaration */
|
||||
|
||||
div.selector,
|
||||
div.selector span,
|
||||
div.checker span,
|
||||
div.radio span,
|
||||
div.uploader,
|
||||
div.uploader span.action,
|
||||
div.button,
|
||||
div.button span {
|
||||
background-image: url(images/sprite.png);
|
||||
background-repeat: no-repeat;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.selector,
|
||||
.radio,
|
||||
.checker,
|
||||
.uploader,
|
||||
.button,
|
||||
.selector *,
|
||||
.radio *,
|
||||
.checker *,
|
||||
.uploader *,
|
||||
.button *{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* INPUT & TEXTAREA */
|
||||
|
||||
input.text,
|
||||
input.email,
|
||||
input.search,
|
||||
input.tel,
|
||||
input.url,
|
||||
input.datetime,
|
||||
input.date,
|
||||
input.month,
|
||||
input.week,
|
||||
input.time,
|
||||
input.datetime-local,
|
||||
input.number,
|
||||
input.color,
|
||||
input.password,
|
||||
select.uniform-multiselect,
|
||||
textarea.uniform {
|
||||
font-size: 12px;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-weight: normal;
|
||||
padding: 3px;
|
||||
color: #777;
|
||||
background: url('images/bg-input-focus.png') repeat-x 0px 0px;
|
||||
background: url('images/bg-input.png') repeat-x 0px 0px;
|
||||
border-top: solid 1px #aaa;
|
||||
border-left: solid 1px #aaa;
|
||||
border-bottom: solid 1px #ccc;
|
||||
border-right: solid 1px #ccc;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* remove default webkit and possible mozilla .search styles */
|
||||
input.search, input.search:active {
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
input.text:focus,
|
||||
input.email:focus,
|
||||
input.search:focus,
|
||||
input.tel:focus,
|
||||
input.url:focus,
|
||||
input.datetime:focus,
|
||||
input.date:focus,
|
||||
input.month:focus,
|
||||
input.week:focus,
|
||||
input.time:focus,
|
||||
input.datetime-local:focus,
|
||||
input.number:focus,
|
||||
input.color:focus,
|
||||
input.password:focus,
|
||||
select.uniform-multiselect:focus,
|
||||
textarea.uniform:focus {
|
||||
-webkit-box-shadow: 0px 0px 4px rgba(0,0,0,0.3);
|
||||
-moz-box-shadow: 0px 0px 4px rgba(0,0,0,0.3);
|
||||
box-shadow: 0px 0px 4px rgba(0,0,0,0.3);
|
||||
border-color: #999;
|
||||
background: url('images/bg-input-focus.png') repeat-x 0px 0px;
|
||||
}
|
||||
|
||||
/* SPRITES */
|
||||
|
||||
/* Select */
|
||||
|
||||
div.selector {
|
||||
background-position: -483px -130px;
|
||||
line-height: 26px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
div.selector span {
|
||||
background-position: right 0px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
div.selector select {
|
||||
/* change these to adjust positioning of select element */
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
div.selector:active,
|
||||
div.selector.active {
|
||||
background-position: -483px -156px;
|
||||
}
|
||||
|
||||
div.selector:active span,
|
||||
div.selector.active span {
|
||||
background-position: right -26px;
|
||||
}
|
||||
|
||||
div.selector.focus, div.selector.hover, div.selector:hover {
|
||||
background-position: -483px -182px;
|
||||
}
|
||||
|
||||
div.selector.focus span, div.selector.hover span, div.selector:hover span {
|
||||
background-position: right -52px;
|
||||
}
|
||||
|
||||
div.selector.focus:active,
|
||||
div.selector.focus.active,
|
||||
div.selector:hover:active,
|
||||
div.selector.active:hover {
|
||||
background-position: -483px -208px;
|
||||
}
|
||||
|
||||
div.selector.focus:active span,
|
||||
div.selector:hover:active span,
|
||||
div.selector.active:hover span,
|
||||
div.selector.focus.active span {
|
||||
background-position: right -78px;
|
||||
}
|
||||
|
||||
div.selector.disabled {
|
||||
background-position: -483px -234px;
|
||||
}
|
||||
|
||||
div.selector.disabled span {
|
||||
background-position: right -104px;
|
||||
}
|
||||
|
||||
/* Checkbox */
|
||||
|
||||
div.checker {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
}
|
||||
|
||||
div.checker input {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
}
|
||||
|
||||
div.checker span {
|
||||
background-position: 0px -260px;
|
||||
height: 19px;
|
||||
width: 19px;
|
||||
}
|
||||
|
||||
div.checker:active span,
|
||||
div.checker.active span {
|
||||
background-position: -19px -260px;
|
||||
}
|
||||
|
||||
div.checker.focus span,
|
||||
div.checker:hover span {
|
||||
background-position: -38px -260px;
|
||||
}
|
||||
|
||||
div.checker.focus:active span,
|
||||
div.checker:active:hover span,
|
||||
div.checker.active:hover span,
|
||||
div.checker.focus.active span {
|
||||
background-position: -57px -260px;
|
||||
}
|
||||
|
||||
div.checker span.checked {
|
||||
background-position: -76px -260px;
|
||||
}
|
||||
|
||||
div.checker:active span.checked,
|
||||
div.checker.active span.checked {
|
||||
background-position: -95px -260px;
|
||||
}
|
||||
|
||||
div.checker.focus span.checked,
|
||||
div.checker:hover span.checked {
|
||||
background-position: -114px -260px;
|
||||
}
|
||||
|
||||
div.checker.focus:active span.checked,
|
||||
div.checker:hover:active span.checked,
|
||||
div.checker.active:hover span.checked,
|
||||
div.checker.active.focus span.checked {
|
||||
background-position: -133px -260px;
|
||||
}
|
||||
|
||||
div.checker.disabled span,
|
||||
div.checker.disabled:active span,
|
||||
div.checker.disabled.active span {
|
||||
background-position: -152px -260px;
|
||||
}
|
||||
|
||||
div.checker.disabled span.checked,
|
||||
div.checker.disabled:active span.checked,
|
||||
div.checker.disabled.active span.checked {
|
||||
background-position: -171px -260px;
|
||||
}
|
||||
|
||||
/* Radio */
|
||||
|
||||
div.radio {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
div.radio input {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
div.radio span {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
background-position: 0px -279px;
|
||||
}
|
||||
|
||||
div.radio:active span,
|
||||
div.radio.active span {
|
||||
background-position: -18px -279px;
|
||||
}
|
||||
|
||||
div.radio.focus span,
|
||||
div.radio:hover span {
|
||||
background-position: -36px -279px;
|
||||
}
|
||||
|
||||
div.radio.focus:active span,
|
||||
div.radio:active:hover span,
|
||||
div.radio.active:hover span,
|
||||
div.radio.active.focus span {
|
||||
background-position: -54px -279px;
|
||||
}
|
||||
|
||||
div.radio span.checked {
|
||||
background-position: -72px -279px;
|
||||
}
|
||||
|
||||
div.radio:active span.checked,
|
||||
div.radio.active span.checked {
|
||||
background-position: -90px -279px;
|
||||
}
|
||||
|
||||
div.radio.focus span.checked, div.radio:hover span.checked {
|
||||
background-position: -108px -279px;
|
||||
}
|
||||
|
||||
div.radio.focus:active span.checked,
|
||||
div.radio:hover:active span.checked,
|
||||
div.radio.focus.active span.checked,
|
||||
div.radio.active:hover span.checked {
|
||||
background-position: -126px -279px;
|
||||
}
|
||||
|
||||
div.radio.disabled span,
|
||||
div.radio.disabled:active span,
|
||||
div.radio.disabled.active span {
|
||||
background-position: -144px -279px;
|
||||
}
|
||||
|
||||
div.radio.disabled span.checked,
|
||||
div.radio.disabled:active span.checked,
|
||||
div.radio.disabled.active span.checked {
|
||||
background-position: -162px -279px;
|
||||
}
|
||||
|
||||
/* Uploader */
|
||||
|
||||
div.uploader {
|
||||
background-position: 0px -297px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
div.uploader span.action {
|
||||
background-position: right -409px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
div.uploader span.filename {
|
||||
height: 24px;
|
||||
/* change this line to adjust positioning of filename area */
|
||||
margin: 2px 0px 2px 2px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
div.uploader.focus,
|
||||
div.uploader.hover,
|
||||
div.uploader:hover {
|
||||
background-position: 0px -353px;
|
||||
}
|
||||
|
||||
div.uploader.focus span.action,
|
||||
div.uploader.hover span.action,
|
||||
div.uploader:hover span.action {
|
||||
background-position: right -437px;
|
||||
}
|
||||
|
||||
div.uploader.active span.action,
|
||||
div.uploader:active span.action {
|
||||
background-position: right -465px;
|
||||
}
|
||||
|
||||
div.uploader.focus.active span.action,
|
||||
div.uploader:focus.active span.action,
|
||||
div.uploader.focus:active span.action,
|
||||
div.uploader:focus:active span.action {
|
||||
background-position: right -493px;
|
||||
}
|
||||
|
||||
div.uploader.disabled {
|
||||
background-position: 0px -325px;
|
||||
}
|
||||
|
||||
div.uploader.disabled span.action {
|
||||
background-position: right -381px;
|
||||
}
|
||||
|
||||
div.button {
|
||||
background-position: 0px -523px;
|
||||
}
|
||||
|
||||
div.button span {
|
||||
background-position: right -643px;
|
||||
}
|
||||
|
||||
div.button.focus,
|
||||
div.button:focus,
|
||||
div.button:hover,
|
||||
div.button.hover {
|
||||
background-position: 0px -553px;
|
||||
}
|
||||
|
||||
div.button.focus span,
|
||||
div.button:focus span,
|
||||
div.button:hover span,
|
||||
div.button.hover span {
|
||||
background-position: right -673px;
|
||||
}
|
||||
|
||||
div.button.active,
|
||||
div.button:active {
|
||||
background-position: 0px -583px;
|
||||
}
|
||||
|
||||
div.button.active span,
|
||||
div.button:active span {
|
||||
background-position: right -703px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
div.button.disabled,
|
||||
div.button:disabled {
|
||||
background-position: 0px -613px;
|
||||
}
|
||||
|
||||
div.button.disabled span,
|
||||
div.button:disabled span {
|
||||
background-position: right -733px;
|
||||
color: #bbb;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* PRESENTATION */
|
||||
|
||||
/* Button */
|
||||
|
||||
div.button {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
div.button span {
|
||||
margin-left: 13px;
|
||||
height: 22px;
|
||||
padding-top: 8px;
|
||||
font-weight: bold;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
padding-left: 2px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
/* Select */
|
||||
div.selector {
|
||||
width: 190px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
div.selector select {
|
||||
min-width: 190px;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
border: solid 1px #fff;
|
||||
}
|
||||
|
||||
div.selector span {
|
||||
padding: 0px 25px 0px 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.selector span {
|
||||
color: #666;
|
||||
width: 158px;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
div.selector.disabled span {
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
/* Checker */
|
||||
div.checker {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* Radio */
|
||||
div.radio {
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
/* Uploader */
|
||||
div.uploader {
|
||||
width: 190px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.uploader span.action {
|
||||
width: 85px;
|
||||
text-align: center;
|
||||
text-shadow: #fff 0px 1px 0px;
|
||||
background-color: #fff;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.uploader span.filename {
|
||||
color: #777;
|
||||
width: 82px;
|
||||
border-right: solid 1px #bbb;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
div.uploader input {
|
||||
width: 190px;
|
||||
}
|
||||
|
||||
div.uploader.disabled span.action {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
div.uploader.disabled span.filename {
|
||||
border-color: #ddd;
|
||||
color: #aaa;
|
||||
}
|
||||
/*
|
||||
|
||||
CORE FUNCTIONALITY
|
||||
|
||||
Not advised to edit stuff below this line
|
||||
-----------------------------------------------------
|
||||
*/
|
||||
|
||||
.selector,
|
||||
.checker,
|
||||
.button,
|
||||
.radio,
|
||||
.uploader {
|
||||
display: -moz-inline-box;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
zoom: 1;
|
||||
*display: inline;
|
||||
}
|
||||
|
||||
.selector select:focus, .radio input:focus, .checker input:focus, .uploader input:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* Button */
|
||||
|
||||
div.button a,
|
||||
div.button button,
|
||||
div.button input {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
div.button {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.button span {
|
||||
display: -moz-inline-box;
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Select */
|
||||
|
||||
div.selector {
|
||||
position: relative;
|
||||
padding-left: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.selector span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.selector select {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
-moz-opacity: 0;
|
||||
height: 25px;
|
||||
border: none;
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* Checker */
|
||||
|
||||
div.checker {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.checker span {
|
||||
display: -moz-inline-box;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.checker input {
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
-moz-opacity: 0;
|
||||
display: inline-block;
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* Radio */
|
||||
|
||||
div.radio {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.radio span {
|
||||
display: -moz-inline-box;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.radio input {
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
-moz-opacity: 0;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* Uploader */
|
||||
|
||||
div.uploader {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
div.uploader span.action {
|
||||
float: left;
|
||||
display: inline;
|
||||
padding: 2px 0px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.uploader span.filename {
|
||||
padding: 0px 10px;
|
||||
float: left;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
div.uploader input {
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
-moz-opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
float: right;
|
||||
height: 25px;
|
||||
border: none;
|
||||
cursor: default;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 274 B |
|
After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 387 B |
|
After Width: | Height: | Size: 272 B |
|
After Width: | Height: | Size: 375 B |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 384 B |
|
After Width: | Height: | Size: 360 B |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
Copyright (c) 2008 Ryan Grove <ryan@wonko.com>. All rights reserved.
|
||||
Licensed under the BSD License:
|
||||
http://www.opensource.org/licenses/bsd-license.html
|
||||
Version: 1.0.4
|
||||
*/
|
||||
var LazyLoad=function(){var E=document,D=null,A=[],C;function B(){if(C){return }var G=navigator.userAgent,F;C={gecko:0,ie:0,webkit:0};F=G.match(/AppleWebKit\/(\S*)/);if(F&&F[1]){C.webkit=parseFloat(F[1])}else{F=G.match(/MSIE\s([^;]*)/);if(F&&F[1]){C.ie=parseFloat(F[1])}else{if((/Gecko\/(\S*)/).test(G)){C.gecko=1;F=G.match(/rv:([^\s\)]*)/);if(F&&F[1]){C.gecko=parseFloat(F[1])}}}}}return{load:function(K,L,J,I){var H=E.getElementsByTagName("head")[0],G,F;if(K){K=K.constructor===Array?K:[K];for(G=0;G<K.length;++G){A.push({url:K[G],callback:G===K.length-1?L:null,obj:J,scope:I})}}if(D||!(D=A.shift())){return }B();F=E.createElement("script");F.src=D.url;if(C.ie){F.onreadystatechange=function(){if(this.readyState==="loaded"||this.readyState==="complete"){LazyLoad.requestComplete()}}}else{if(C.gecko||C.webkit>=420){F.onload=LazyLoad.requestComplete;F.onerror=LazyLoad.requestComplete}}H.appendChild(F);if(!C.ie&&!C.gecko&&!(C.webkit>=420)){F=E.createElement("script");F.appendChild(E.createTextNode("LazyLoad.requestComplete();"));H.appendChild(F)}},loadOnce:function(N,O,L,P,G){var H=[],I=E.getElementsByTagName("script"),M,J,K,F;N=N.constructor===Array?N:[N];for(M=0;M<N.length;++M){K=false;F=N[M];for(J=0;J<I.length;++J){if(F===I[J].src){K=true;break}}if(!K){H.push(F)}}if(H.length>0){LazyLoad.load(H,O,L,P)}else{if(G){if(L){if(P){O.call(L)}else{O.call(window,L)}}else{O.call()}}}},requestComplete:function(){if(D.callback){if(D.obj){if(D.scope){D.callback.call(D.obj)}else{D.callback.call(window,D.obj)}}else{D.callback.call()}}D=null;if(A.length){LazyLoad.load()}}}}();
|
||||
@@ -0,0 +1,82 @@
|
||||
var js_libraries = [];
|
||||
|
||||
var fnOpenEditForm = function(this_element){
|
||||
|
||||
var href_url = this_element.attr("href");
|
||||
|
||||
var dialog_height = $(window).height() - 80;
|
||||
|
||||
//Close all
|
||||
$(".ui-dialog-content").dialog("close");
|
||||
|
||||
$.ajax({
|
||||
url: href_url,
|
||||
data: {
|
||||
is_ajax: 'true'
|
||||
},
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
this_element.closest('.flexigrid').addClass('loading-opacity');
|
||||
this_element.closest('.dataTablesContainer').addClass('loading-opacity');
|
||||
},
|
||||
complete: function(){
|
||||
this_element.closest('.flexigrid').removeClass('loading-opacity');
|
||||
this_element.closest('.dataTablesContainer').removeClass('loading-opacity');
|
||||
},
|
||||
success: function (data) {
|
||||
if (typeof CKEDITOR !== 'undefined' && typeof CKEDITOR.instances !== 'undefined') {
|
||||
$.each(CKEDITOR.instances,function(index){
|
||||
delete CKEDITOR.instances[index];
|
||||
});
|
||||
}
|
||||
|
||||
LazyLoad.loadOnce(data.js_lib_files);
|
||||
LazyLoad.load(data.js_config_files);
|
||||
|
||||
$.each(data.css_files,function(index,css_file){
|
||||
load_css_file(css_file);
|
||||
});
|
||||
|
||||
$("<div/>").html(data.output).dialog({
|
||||
width: 910,
|
||||
modal: true,
|
||||
height: dialog_height,
|
||||
close: function(){
|
||||
$(this).remove();
|
||||
},
|
||||
open: function(){
|
||||
var this_dialog = $(this);
|
||||
|
||||
$('#cancel-button').click(function(){
|
||||
this_dialog.dialog("close");
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var add_edit_button_listener = function () {
|
||||
|
||||
//If dialog AJAX forms is turned on from grocery CRUD config
|
||||
if (dialog_forms) {
|
||||
|
||||
$('.edit_button,.add_button').unbind('click');
|
||||
$('.edit_button,.add_button').click(function(){
|
||||
|
||||
fnOpenEditForm($(this));
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var load_css_file = function(css_file) {
|
||||
if ($('head').find('link[href="'+css_file+'"]').length == 0) {
|
||||
$('head').append($('<link/>').attr("type","text/css")
|
||||
.attr("rel","stylesheet").attr("href",css_file));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||