Merge branch 'arslancb:master' into master
This commit is contained in:
commit
bdd170ddf3
279 changed files with 24955 additions and 1148 deletions
11
README.md
11
README.md
|
@ -1,6 +1,9 @@
|
|||
#ClipBucket - Broadcasting like a boss!
|
||||

|
||||
</br>
|
||||
# ClipBucket - Open Source Video Streaming Platform
|
||||
|
||||
## Read the Developer Guides here
|
||||
https://docs.clipbucket.com/
|
||||
|
||||
Should have added years ago, but...well now atleast its here
|
||||
|
||||
<div align="center">
|
||||
<a href="http://demo.clipbucket.com/">View Demo</a> | <a href="http://clip-bucket.com/download">Download</a>
|
||||
|
@ -16,7 +19,7 @@ You can start a fully dedicated video sharing website or photo sharing websites
|
|||
</br>
|
||||
<a href="http://clip-bucket.com">ClipBucket Official Website </a>
|
||||
</br>
|
||||
<a href="http://docs.clip-bucket.com">ClipBucket Documentation</a>
|
||||
<a href="https://docs.clipbucket.com/">ClipBucket Documentation</a>
|
||||
|
||||
# Server Requirements
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
<li>Linux Server (some old distributions are not supported)</li>
|
||||
<li>Apache Web Server</li>
|
||||
<li>MySQL (version 4 +)</li>
|
||||
<li>PHP ( PHP 5)</li>
|
||||
<li>PHP ( PHP 5 - 7.0 )</li>
|
||||
<li>PHP Configuration</li>
|
||||
<ul>
|
||||
<ul>
|
||||
<li>safe_mode = off</li>
|
||||
<li>max_execution_time = 1000 (recommended to prevent timeouts during video upload/conversion)</li>
|
||||
<li>session.gc_maxlifetime = 14000 (recommended to prevent session expires during video upload)</li>
|
||||
|
@ -25,6 +25,7 @@
|
|||
<li>upload_max_filesize = 100M (recommended maximum video upload size in MB)</li>
|
||||
<li>post_max_size = 100M (recommended maximum video upload size in MB)</li>
|
||||
<li>GD library Enabled (v2 or higher) </li>
|
||||
<li>PHP fileinfo extension is a must to be installed and enabled</li>
|
||||
</ul>
|
||||
<li><strong>Mplayer + Mencoder</strong> (<a rel="nofollow" href="http://www.mplayerhq.hu/design7/dload.html">http://www.mplayerhq.hu/design7/dload.html</a>)</li>
|
||||
<li><strong>Flv2tool</strong> (<a rel="nofollow" href="http://inlet-media.de/flvtool2">http://inlet-media.de/flvtool2</a>)</li>
|
||||
|
|
5
package.json
Normal file
5
package.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name": "ClipBucket",
|
||||
"description": "Open Source Video Sjaring Script",
|
||||
"version": "4.1"
|
||||
}
|
|
@ -6,7 +6,7 @@ CREATE TABLE `user_levels` (
|
|||
`user_level_name` varchar(100) CHARACTER SET latin1 NOT NULL,
|
||||
`user_level_is_default` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`user_level_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=16 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=16 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `user_levels`
|
||||
|
@ -50,7 +50,7 @@ CREATE TABLE `user_levels_permissions` (
|
|||
`edit_video` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
`admin_del_access` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
PRIMARY KEY (`user_level_permission_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=14 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=14 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `user_levels_permissions`
|
||||
|
@ -79,7 +79,7 @@ CREATE TABLE `user_permissions` (
|
|||
`permission_default` enum('yes','no') CHARACTER SET latin1 NOT NULL DEFAULT 'yes',
|
||||
PRIMARY KEY (`permission_id`),
|
||||
UNIQUE KEY `permission_code` (`permission_code`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=33 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=33 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `user_permissions`
|
||||
|
|
|
@ -14,7 +14,7 @@ CREATE TABLE `phrases` (
|
|||
`varname` varchar(250) NOT NULL DEFAULT '',
|
||||
`text` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=860 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=860 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `phrases`
|
||||
|
@ -891,6 +891,6 @@ CREATE TABLE `cb_stats` (
|
|||
`user_stats` text NOT NULL,
|
||||
`group_stats` text NOT NULL,
|
||||
PRIMARY KEY (`stat_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
|
||||
|
|
|
@ -13,6 +13,6 @@ CREATE TABLE `cb_sessions` (
|
|||
`agent` text NOT NULL,
|
||||
`last_active` datetime NOT NULL,
|
||||
PRIMARY KEY (`session_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
ALTER TABLE `cb_users` ADD `album_privacy` ENUM( 'public', 'private', 'friends' ) NOT NULL DEFAULT 'private' AFTER `is_subscribed`
|
|
@ -9,4 +9,4 @@ CREATE TABLE IF NOT EXISTS `cb_counters` (
|
|||
`date_added` varchar(200) NOT NULL,
|
||||
PRIMARY KEY (`counter_id`),
|
||||
UNIQUE KEY `query_md5` (`query_md5`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
|
|
@ -32,7 +32,7 @@ CREATE TABLE IF NOT EXISTS `action_log` (
|
|||
`action_success` enum('yes','no') CHARACTER SET latin1 NOT NULL,
|
||||
`action_details` text CHARACTER SET latin1 NOT NULL,
|
||||
PRIMARY KEY (`action_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `action_log`
|
||||
|
@ -55,7 +55,7 @@ CREATE TABLE IF NOT EXISTS `ads_data` (
|
|||
`ad_impressions` bigint(255) NOT NULL DEFAULT '0',
|
||||
`date_added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
PRIMARY KEY (`ad_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `ads_data`
|
||||
|
@ -84,7 +84,7 @@ CREATE TABLE IF NOT EXISTS `ads_placements` (
|
|||
`placement_name` varchar(50) NOT NULL,
|
||||
`disable` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`placement_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `ads_placements`
|
||||
|
@ -107,7 +107,7 @@ INSERT INTO `ads_placements` (`placement_id`, `placement`, `placement_name`, `di
|
|||
|
||||
CREATE TABLE IF NOT EXISTS `cb_global_announcement` (
|
||||
`announcement` text NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `cb_global_announcement`
|
||||
|
@ -133,7 +133,7 @@ CREATE TABLE IF NOT EXISTS `comments` (
|
|||
`voters` text NOT NULL,
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`comment_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `comments`
|
||||
|
@ -151,7 +151,7 @@ CREATE TABLE IF NOT EXISTS `config` (
|
|||
`name` varchar(100) NOT NULL DEFAULT '',
|
||||
`value` mediumtext NOT NULL,
|
||||
PRIMARY KEY (`configid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=84 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=84 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `config`
|
||||
|
@ -253,7 +253,7 @@ CREATE TABLE IF NOT EXISTS `contacts` (
|
|||
`userid` int(225) NOT NULL,
|
||||
`contact_userid` int(225) NOT NULL,
|
||||
PRIMARY KEY (`contact_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `contacts`
|
||||
|
@ -274,7 +274,7 @@ CREATE TABLE IF NOT EXISTS `conversion_queue` (
|
|||
`cqueue_conversion` enum('yes','no','p') NOT NULL DEFAULT 'no',
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`cqueue_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `conversion_queue`
|
||||
|
@ -293,7 +293,7 @@ CREATE TABLE IF NOT EXISTS `countries` (
|
|||
`iso3` char(3) CHARACTER SET latin1 DEFAULT NULL,
|
||||
`name_en` varchar(64) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Dumping data for table `countries`
|
||||
|
@ -555,7 +555,7 @@ CREATE TABLE IF NOT EXISTS `custom_fields` (
|
|||
`custom_field_hint_2` text NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`custom_field_list_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `custom_fields`
|
||||
|
@ -575,7 +575,7 @@ CREATE TABLE IF NOT EXISTS `editors_picks` (
|
|||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`status` enum('0','1') NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`pick_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `editors_picks`
|
||||
|
@ -594,7 +594,7 @@ CREATE TABLE IF NOT EXISTS `email_settings` (
|
|||
`email_settings_value` mediumtext NOT NULL,
|
||||
`email_settings_headers` mediumtext NOT NULL,
|
||||
PRIMARY KEY (`email_settings_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `email_settings`
|
||||
|
@ -625,7 +625,7 @@ CREATE TABLE IF NOT EXISTS `email_templates` (
|
|||
`email_template_allowed_tags` mediumtext NOT NULL,
|
||||
PRIMARY KEY (`email_template_id`),
|
||||
UNIQUE KEY `email_template_code` (`email_template_code`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `email_templates`
|
||||
|
@ -649,7 +649,7 @@ CREATE TABLE IF NOT EXISTS `favorites` (
|
|||
`userid` int(225) NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`favorite_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `favorites`
|
||||
|
@ -668,7 +668,7 @@ CREATE TABLE IF NOT EXISTS `flagged_videos` (
|
|||
`username` varchar(20) NOT NULL,
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`flagged_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `flagged_videos`
|
||||
|
@ -689,7 +689,7 @@ CREATE TABLE IF NOT EXISTS `flags` (
|
|||
`flag_type` bigint(25) NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`flag_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `flags`
|
||||
|
@ -722,7 +722,7 @@ CREATE TABLE IF NOT EXISTS `groups` (
|
|||
`total_members` int(225) NOT NULL,
|
||||
`total_topics` int(225) NOT NULL,
|
||||
PRIMARY KEY (`group_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `groups`
|
||||
|
@ -742,7 +742,7 @@ CREATE TABLE IF NOT EXISTS `group_invitations` (
|
|||
`invited_by` varchar(16) NOT NULL,
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`invitation_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `group_invitations`
|
||||
|
@ -763,7 +763,7 @@ CREATE TABLE IF NOT EXISTS `group_members` (
|
|||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`active` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
PRIMARY KEY (`group_mid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `group_members`
|
||||
|
@ -785,7 +785,7 @@ CREATE TABLE IF NOT EXISTS `group_posts` (
|
|||
`reply_to` int(225) NOT NULL,
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`post_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `group_posts`
|
||||
|
@ -809,7 +809,7 @@ CREATE TABLE IF NOT EXISTS `group_topics` (
|
|||
`videokey` mediumtext NOT NULL,
|
||||
`approved` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
PRIMARY KEY (`topic_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `group_topics`
|
||||
|
@ -831,7 +831,7 @@ CREATE TABLE IF NOT EXISTS `group_videos` (
|
|||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`approved` enum('yes','no') NOT NULL,
|
||||
PRIMARY KEY (`group_vid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `group_videos`
|
||||
|
@ -851,7 +851,7 @@ CREATE TABLE IF NOT EXISTS `languages` (
|
|||
`language_regex` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`language_default` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`language_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `languages`
|
||||
|
@ -879,7 +879,7 @@ CREATE TABLE IF NOT EXISTS `messages` (
|
|||
`reply_to` int(225) NOT NULL DEFAULT '0',
|
||||
`message_box` enum('in','out') NOT NULL DEFAULT 'in',
|
||||
PRIMARY KEY (`message_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `messages`
|
||||
|
@ -899,7 +899,7 @@ CREATE TABLE IF NOT EXISTS `modules` (
|
|||
`active` varchar(5) NOT NULL,
|
||||
`module_include_file` text NOT NULL,
|
||||
PRIMARY KEY (`module_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `modules`
|
||||
|
@ -918,7 +918,7 @@ CREATE TABLE IF NOT EXISTS `phrases` (
|
|||
`varname` varchar(250) CHARACTER SET utf8 NOT NULL DEFAULT '',
|
||||
`text` text COLLATE utf8_unicode_ci,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=839 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=839 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `phrases`
|
||||
|
@ -1771,7 +1771,7 @@ CREATE TABLE IF NOT EXISTS `players` (
|
|||
`player_file` varchar(30) NOT NULL,
|
||||
`template_id` varchar(15) NOT NULL,
|
||||
PRIMARY KEY (`player_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `players`
|
||||
|
@ -1791,7 +1791,7 @@ CREATE TABLE IF NOT EXISTS `player_skins` (
|
|||
`player_skin_file` text CHARACTER SET latin1 NOT NULL,
|
||||
`player_skin_type` enum('name','file') CHARACTER SET latin1 NOT NULL DEFAULT 'file',
|
||||
PRIMARY KEY (`player_skins_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `player_skins`
|
||||
|
@ -1814,7 +1814,7 @@ CREATE TABLE IF NOT EXISTS `plugins` (
|
|||
`plugin_license_code` text NOT NULL,
|
||||
`plugin_active` enum('yes','no') NOT NULL,
|
||||
PRIMARY KEY (`plugin_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `plugins`
|
||||
|
@ -1836,7 +1836,7 @@ CREATE TABLE IF NOT EXISTS `plugin_config` (
|
|||
`player_admin_file` text CHARACTER SET latin1 NOT NULL,
|
||||
`player_include_file` text CHARACTER SET latin1 NOT NULL,
|
||||
PRIMARY KEY (`plugin_config_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `plugin_config`
|
||||
|
@ -1856,7 +1856,7 @@ CREATE TABLE IF NOT EXISTS `sessions` (
|
|||
`session_value` varchar(32) NOT NULL,
|
||||
`session_date` datetime NOT NULL,
|
||||
PRIMARY KEY (`session_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `sessions`
|
||||
|
@ -1874,7 +1874,7 @@ CREATE TABLE IF NOT EXISTS `stats` (
|
|||
`name` varchar(60) NOT NULL,
|
||||
`value` varchar(60) NOT NULL,
|
||||
PRIMARY KEY (`stat_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `stats`
|
||||
|
@ -1893,7 +1893,7 @@ CREATE TABLE IF NOT EXISTS `subscriptions` (
|
|||
`subscribed_to` mediumtext NOT NULL,
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`subscription_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `subscriptions`
|
||||
|
@ -1911,7 +1911,7 @@ CREATE TABLE IF NOT EXISTS `template` (
|
|||
`template_name` varchar(25) NOT NULL,
|
||||
`template_dir` varchar(30) NOT NULL,
|
||||
PRIMARY KEY (`template_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `template`
|
||||
|
@ -1973,7 +1973,7 @@ CREATE TABLE IF NOT EXISTS `users` (
|
|||
KEY `ind_status_doj` (`doj`),
|
||||
KEY `ind_status_id` (`userid`),
|
||||
KEY `ind_hits_doj` (`profile_hits`,`doj`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `users`
|
||||
|
@ -1994,7 +1994,7 @@ CREATE TABLE IF NOT EXISTS `user_levels` (
|
|||
`user_level_name` varchar(100) CHARACTER SET latin1 NOT NULL,
|
||||
`user_level_is_default` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`user_level_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `user_levels`
|
||||
|
@ -2026,7 +2026,7 @@ CREATE TABLE IF NOT EXISTS `user_levels_permissions` (
|
|||
`video_moderation` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
`member_moderation` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`user_level_permission_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `user_levels_permissions`
|
||||
|
@ -2054,7 +2054,7 @@ CREATE TABLE IF NOT EXISTS `user_permissions` (
|
|||
`permission_default` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
PRIMARY KEY (`permission_id`),
|
||||
UNIQUE KEY `permission_code` (`permission_code`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `user_permissions`
|
||||
|
@ -2082,7 +2082,7 @@ CREATE TABLE IF NOT EXISTS `user_permission_types` (
|
|||
`user_permission_type_name` varchar(225) NOT NULL,
|
||||
`user_permission_type_desc` mediumtext NOT NULL,
|
||||
PRIMARY KEY (`user_permission_type_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `user_permission_types`
|
||||
|
@ -2138,7 +2138,7 @@ CREATE TABLE IF NOT EXISTS `user_profile` (
|
|||
PRIMARY KEY (`user_profile_id`),
|
||||
KEY `ind_status_id` (`userid`),
|
||||
FULLTEXT KEY `profile_tags` (`profile_tags`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `user_profile`
|
||||
|
@ -2160,7 +2160,7 @@ CREATE TABLE IF NOT EXISTS `validation_re` (
|
|||
`re_code` varchar(60) CHARACTER SET utf8 NOT NULL,
|
||||
`re_syntax` text CHARACTER SET utf8 NOT NULL,
|
||||
PRIMARY KEY (`re_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `validation_re`
|
||||
|
@ -2215,7 +2215,7 @@ CREATE TABLE IF NOT EXISTS `video` (
|
|||
`default_thumb` int(3) NOT NULL DEFAULT '1',
|
||||
`embed_code` text NOT NULL,
|
||||
PRIMARY KEY (`videoid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `video`
|
||||
|
@ -2236,7 +2236,7 @@ CREATE TABLE IF NOT EXISTS `video_categories` (
|
|||
`category_thumb` mediumtext NOT NULL,
|
||||
`isdefault` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`category_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `video_categories`
|
||||
|
@ -2255,7 +2255,7 @@ CREATE TABLE IF NOT EXISTS `video_favourites` (
|
|||
`userid` int(11) NOT NULL,
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`fav_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `video_favourites`
|
||||
|
@ -2312,7 +2312,7 @@ CREATE TABLE IF NOT EXISTS `video_files` (
|
|||
`hq` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`id`),
|
||||
FULLTEXT KEY `src_bitrate` (`src_bitrate`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `video_files`
|
||||
|
|
|
@ -51,7 +51,7 @@ CREATE TABLE IF NOT EXISTS `cb_photos` (
|
|||
`downloaded` bigint(255) NOT NULL,
|
||||
`owner_ip` varchar(20) NOT NULL,
|
||||
PRIMARY KEY (`photo_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
-- Dumping data for table `cb_photos`
|
||||
|
|
|
@ -6,28 +6,28 @@ CREATE TABLE `clipbucket_svn`.`cb_collection_cateogries` (
|
|||
`date_added` MEDIUMTEXT NOT NULL ,
|
||||
`category_thumb` MEDIUMINT NOT NULL ,
|
||||
`isdefault` ENUM( 'yes', 'no' ) NOT NULL
|
||||
) ENGINE = MYISAM ;
|
||||
) ENGINE = InnoDB ;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `cb_collections` (
|
||||
`collection_id` bigint(25) NOT NULL AUTO_INCREMENT,
|
||||
`collection_name` varchar(225) NOT NULL,
|
||||
`collection_description` text NOT NULL,
|
||||
`collection_tags` text NOT NULL,
|
||||
`category` varchar(20) NOT NULL,
|
||||
`userid` int(10) NOT NULL,
|
||||
`views` bigint(20) NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
`featured` varchar(4) NOT NULL,
|
||||
`broadcast` varchar(10) NOT NULL,
|
||||
`allow_comments` varchar(4) NOT NULL,
|
||||
`total_comments` bigint(20) NOT NULL,
|
||||
`total_objects` bigint(20) NOT NULL,
|
||||
`active` varchar(4) NOT NULL,
|
||||
`public_upload` varchar(4) NOT NULL,
|
||||
`type` varchar(10) NOT NULL,
|
||||
PRIMARY KEY (`collection_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
CREATE TABLE IF NOT EXISTS `cb_collections` (
|
||||
`collection_id` bigint(25) NOT NULL AUTO_INCREMENT,
|
||||
`collection_name` varchar(225) NOT NULL,
|
||||
`collection_description` text NOT NULL,
|
||||
`collection_tags` text NOT NULL,
|
||||
`category` varchar(20) NOT NULL,
|
||||
`userid` int(10) NOT NULL,
|
||||
`views` bigint(20) NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
`featured` varchar(4) NOT NULL,
|
||||
`broadcast` varchar(10) NOT NULL,
|
||||
`allow_comments` varchar(4) NOT NULL,
|
||||
`total_comments` bigint(20) NOT NULL,
|
||||
`total_objects` bigint(20) NOT NULL,
|
||||
`active` varchar(4) NOT NULL,
|
||||
`public_upload` varchar(4) NOT NULL,
|
||||
`type` varchar(10) NOT NULL,
|
||||
PRIMARY KEY (`collection_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
ALTER TABLE `cb_collections` CHANGE `broadcast` `broadcast` VARCHAR( 10 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'public',
|
||||
CHANGE `allow_comments` `allow_comments` VARCHAR( 4 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'yes',
|
||||
|
@ -35,15 +35,15 @@ CHANGE `active` `active` VARCHAR( 4 ) CHARACTER SET latin1 COLLATE latin1_swed
|
|||
CHANGE `public_upload` `public_upload` VARCHAR( 4 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'yes'
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `cb_collection_items` (
|
||||
`ci_id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`collection_id` bigint(20) NOT NULL,
|
||||
`object_id` bigint(20) NOT NULL,
|
||||
`userid` bigint(20) NOT NULL,
|
||||
`type` varchar(10) NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`ci_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
CREATE TABLE IF NOT EXISTS `cb_collection_items` (
|
||||
`ci_id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`collection_id` bigint(20) NOT NULL,
|
||||
`object_id` bigint(20) NOT NULL,
|
||||
`userid` bigint(20) NOT NULL,
|
||||
`type` varchar(10) NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`ci_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
INSERT INTO `cb_email_templates` (`email_template_id`, `email_template_name`, `email_template_code`, `email_template_subject`, `email_template`, `email_template_allowed_tags`) VALUES (NULL, 'Collection Share Template', 'collection_share_template', '{username} wants to share collection with you', '<html>
|
||||
<head>
|
||||
|
|
|
@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `groups` (
|
|||
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`active` enum('yes','no') NOT NULL,
|
||||
PRIMARY KEY (`group_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `group_categories` (
|
||||
`category_id` int(225) NOT NULL AUTO_INCREMENT,
|
||||
|
@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS `group_categories` (
|
|||
`category_thumb` mediumtext NOT NULL,
|
||||
`isdefault` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`category_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `group_members` (
|
||||
`group_mid` int(225) NOT NULL AUTO_INCREMENT,
|
||||
|
@ -31,7 +31,7 @@ CREATE TABLE IF NOT EXISTS `group_members` (
|
|||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`active` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
PRIMARY KEY (`group_mid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `group_stats` (
|
||||
`id` int(255) NOT NULL AUTO_INCREMENT,
|
||||
|
@ -40,4 +40,4 @@ CREATE TABLE IF NOT EXISTS `group_stats` (
|
|||
`total_topics` int(255) NOT NULL,
|
||||
`total_posts` int(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
|
|
@ -12,121 +12,121 @@ if ( isset($_REQUEST['plupload']) )
|
|||
}
|
||||
|
||||
if($_FILES['photoUpload'])
|
||||
$mode = "uploadPhoto";
|
||||
$mode = "uploadPhoto";
|
||||
if($_POST['photoForm'])
|
||||
$mode = "get_photo_form";
|
||||
$mode = "get_photo_form";
|
||||
if($_POST['insertBeat'])
|
||||
$mode = "insert_beat";
|
||||
$mode = "insert_beat";
|
||||
if($_POST['updatePhoto'])
|
||||
$mode = "update_photo";
|
||||
$mode = "update_photo";
|
||||
|
||||
switch($mode)
|
||||
{
|
||||
case "insert_beat":
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case "update_photo":
|
||||
{
|
||||
$_POST['photo_title'] = genTags(str_replace(array('_','-'),' ',mysql_clean($_POST['photo_title'])));
|
||||
$_POST['photo_description'] = genTags(str_replace(array('_','-'),' ',mysql_clean($_POST['photo_description'])));
|
||||
$_POST['photo_tags'] = genTags(str_replace(array(' ','_','-'),', ',mysql_clean($_POST['photo_tags'])));
|
||||
|
||||
$cbphoto->update_photo();
|
||||
|
||||
if(error())
|
||||
$error = error('single');
|
||||
if(msg())
|
||||
$success = msg('single');
|
||||
|
||||
$updateResponse['error'] = $error;
|
||||
$updateResponse['success'] = $success;
|
||||
|
||||
echo json_encode($updateResponse);
|
||||
}
|
||||
break;
|
||||
case "uploadPhoto":
|
||||
{
|
||||
$exts = $cbphoto->exts;
|
||||
$max_size = 1048576; // 2MB in bytes
|
||||
$form = "photoUpload";
|
||||
$path = PHOTOS_DIR."/";
|
||||
|
||||
// These are found in $_FILES. We can access them like $_FILES['file']['error'].
|
||||
$upErrors = array(
|
||||
0 => "There is no error, the file uploaded with success.",
|
||||
1 => "The uploaded file exceeds the upload_max_filesize directive in php.ini.",
|
||||
2 => " The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.",
|
||||
3 => "The uploaded file was only partially uploaded.",
|
||||
4 => "No file was uploaded.",
|
||||
6 => "Missing a temporary folder.",
|
||||
7 => "Failed to write file to disk."
|
||||
);
|
||||
|
||||
// Let's see if everything is working fine by checking $_FILES.
|
||||
if(!isset($_FILES[$form])) {
|
||||
upload_error("No upload found in \$_FILES for " . $form);
|
||||
exit(0);
|
||||
}
|
||||
elseif(isset($_FILES[$form]['error']) && $_FILES[$form]['error'] != 0) {
|
||||
upload_error($upErrors[$_FILES[$form]['error']]);
|
||||
exit(0);
|
||||
}
|
||||
elseif(!isset($_FILES[$form]["tmp_name"]) || !@is_uploaded_file($_FILES[$form]["tmp_name"])) {
|
||||
upload_error("Upload failed is_uploaded_file test.");
|
||||
exit(0);
|
||||
} elseif(empty($_FILES[$form]['name'])) {
|
||||
upload_error("File name is empty");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// Time to check if Filesize is according to demands
|
||||
//$filesize = filesize($_FILES[$form]['tmp_name']);
|
||||
//if(!$filesize || $filesize > $max_size)
|
||||
//{
|
||||
// upload_error("File exceeds the maximum allowed size");
|
||||
// exit(0);
|
||||
//}
|
||||
//
|
||||
//if($filesize < 0)
|
||||
//{
|
||||
// upload_error("File size outside allowed lower bound");
|
||||
// exit(0);
|
||||
//}
|
||||
|
||||
//Checking Extension of File
|
||||
$info = pathinfo($_FILES[$form]['name']);
|
||||
$extension = strtolower($info['extension']);
|
||||
$valid_extension = false;
|
||||
|
||||
foreach ($exts as $ext) {
|
||||
if (strcasecmp($extension, $ext) == 0) {
|
||||
$valid_extension = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$valid_extension)
|
||||
{
|
||||
upload_error("Invalid file extension");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$filename = $cbphoto->create_filename();
|
||||
|
||||
|
||||
//Now uploading the file
|
||||
if(move_uploaded_file($_FILES[$form]['tmp_name'],$path.$filename.".".$extension))
|
||||
{
|
||||
echo json_encode(array("success"=>"yes","filename"=>$filename,"extension"=>$extension));
|
||||
|
||||
} else {
|
||||
upload_error("File could not be saved.");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "insert_beat":
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case "update_photo":
|
||||
{
|
||||
$_POST['photo_title'] = genTags(str_replace(array('_','-'),' ',mysql_clean($_POST['photo_title'])));
|
||||
$_POST['photo_description'] = genTags(str_replace(array('_','-'),' ',mysql_clean($_POST['photo_description'])));
|
||||
$_POST['photo_tags'] = genTags(str_replace(array(' ','_','-'),', ',mysql_clean($_POST['photo_tags'])));
|
||||
|
||||
$cbphoto->update_photo();
|
||||
|
||||
if(error())
|
||||
$error = error('single');
|
||||
if(msg())
|
||||
$success = msg('single');
|
||||
|
||||
$updateResponse['error'] = $error;
|
||||
$updateResponse['success'] = $success;
|
||||
|
||||
echo json_encode($updateResponse);
|
||||
}
|
||||
break;
|
||||
/* case "uploadPhoto":
|
||||
{
|
||||
$exts = $cbphoto->exts;
|
||||
$max_size = 1048576; // 2MB in bytes
|
||||
$form = "photoUpload";
|
||||
$path = PHOTOS_DIR."/";
|
||||
|
||||
// These are found in $_FILES. We can access them like $_FILES['file']['error'].
|
||||
$upErrors = array(
|
||||
0 => "There is no error, the file uploaded with success.",
|
||||
1 => "The uploaded file exceeds the upload_max_filesize directive in php.ini.",
|
||||
2 => " The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.",
|
||||
3 => "The uploaded file was only partially uploaded.",
|
||||
4 => "No file was uploaded.",
|
||||
6 => "Missing a temporary folder.",
|
||||
7 => "Failed to write file to disk."
|
||||
);
|
||||
|
||||
// Let's see if everything is working fine by checking $_FILES.
|
||||
if(!isset($_FILES[$form])) {
|
||||
upload_error("No upload found in \$_FILES for " . $form);
|
||||
exit(0);
|
||||
}
|
||||
elseif(isset($_FILES[$form]['error']) && $_FILES[$form]['error'] != 0) {
|
||||
upload_error($upErrors[$_FILES[$form]['error']]);
|
||||
exit(0);
|
||||
}
|
||||
elseif(!isset($_FILES[$form]["tmp_name"]) || !@is_uploaded_file($_FILES[$form]["tmp_name"])) {
|
||||
upload_error("Upload failed is_uploaded_file test.");
|
||||
exit(0);
|
||||
} elseif(empty($_FILES[$form]['name'])) {
|
||||
upload_error("File name is empty");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// Time to check if Filesize is according to demands
|
||||
//$filesize = filesize($_FILES[$form]['tmp_name']);
|
||||
//if(!$filesize || $filesize > $max_size)
|
||||
//{
|
||||
// upload_error("File exceeds the maximum allowed size");
|
||||
// exit(0);
|
||||
//}
|
||||
//
|
||||
//if($filesize < 0)
|
||||
//{
|
||||
// upload_error("File size outside allowed lower bound");
|
||||
// exit(0);
|
||||
//}
|
||||
|
||||
//Checking Extension of File
|
||||
$info = pathinfo($_FILES[$form]['name']);
|
||||
$extension = strtolower($info['extension']);
|
||||
$valid_extension = false;
|
||||
|
||||
foreach ($exts as $ext) {
|
||||
if (strcasecmp($extension, $ext) == 0) {
|
||||
$valid_extension = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$valid_extension)
|
||||
{
|
||||
upload_error("Invalid file extension");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$filename = $cbphoto->create_filename();
|
||||
|
||||
|
||||
//Now uploading the file
|
||||
if(move_uploaded_file($_FILES[$form]['tmp_name'],$path.$filename.".".$extension))
|
||||
{
|
||||
echo json_encode(array("success"=>"yes","filename"=>$filename,"extension"=>$extension));
|
||||
|
||||
} else {
|
||||
upload_error("File could not be saved.");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
break;*/
|
||||
|
||||
|
||||
case 'plupload': {
|
||||
|
@ -139,6 +139,23 @@ switch($mode)
|
|||
header("Pragma: no-cache");
|
||||
#exit("BEATS: ".CB_BEATS_UPLOAD_DIR." and PHOTO ".PHOTOS_DIR);
|
||||
//pr($_REQUEST);
|
||||
|
||||
#checking for if the right file is uploaded
|
||||
$content_type = get_mime_type($_FILES['file']['tmp_name']);
|
||||
if ( $content_type != 'audio') {
|
||||
echo json_encode(array("status"=>"400","err"=>"Invalid Content"));
|
||||
exit();
|
||||
}
|
||||
|
||||
$extension = getExt( $_FILES['file']['name']);
|
||||
$types = strtolower(config('allowed_types'));
|
||||
$supported_extensions = explode(',', $types);
|
||||
|
||||
if (!in_array($extension, $supported_extensions)) {
|
||||
echo json_encode(array("status"=>"504","msg"=>"Invalid extension"));
|
||||
exit();
|
||||
}
|
||||
|
||||
$targetDir = CB_BEATS_UPLOAD_DIR;
|
||||
# $directory = create_dated_folder( CB_BEATS_UPLOAD_DIR );
|
||||
# $targetDir .= '/'.$directory;
|
||||
|
@ -175,7 +192,7 @@ switch($mode)
|
|||
// Create target dir
|
||||
if (!file_exists($targetDir))
|
||||
{
|
||||
echo "creating file";
|
||||
echo "creating file";
|
||||
mkdir($targetDir);
|
||||
}
|
||||
|
||||
|
@ -276,6 +293,6 @@ switch($mode)
|
|||
//function used to display error
|
||||
function upload_error($error)
|
||||
{
|
||||
echo json_encode(array("error"=>$error));
|
||||
echo json_encode(array("error"=>$error));
|
||||
}
|
||||
?>
|
|
@ -54,11 +54,12 @@ if(!isCurlInstalled())
|
|||
if(!userid())
|
||||
exit(json_encode(array('error'=>'You are not logged in')));
|
||||
|
||||
/*Setting up file name for the video to be converted*/
|
||||
$file_name = time().RandomString(5);
|
||||
|
||||
if(isset($_POST['youtube']))
|
||||
{
|
||||
$youtube_url = $_POST['file'];
|
||||
$filename = $_POST['file_name'];
|
||||
|
||||
$ParseUrl = parse_url($youtube_url);
|
||||
parse_str($ParseUrl['query'], $youtube_url_prop);
|
||||
$YouTubeId = isset($youtube_url_prop['v']) ? $youtube_url_prop['v'] : '';
|
||||
|
@ -82,7 +83,17 @@ if(isset($_POST['youtube']))
|
|||
$apiKey = $Cbucket->configs['youtube_api_key'];
|
||||
// grabs video details (snippet, contentDetails)
|
||||
$request = 'https://www.googleapis.com/youtube/v3/videos?id='.$YouTubeId.'&key='.$apiKey.'&part=snippet,contentDetails';
|
||||
$youtube_content = file_get_contents($request);
|
||||
//replaced file get contents
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_URL, $request);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
|
||||
$youtube_content = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
|
||||
$content = json_decode($youtube_content,true);
|
||||
$thumb_contents = maxres_youtube($content);
|
||||
$max_quality_thumb = $thumb_contents['thumb'];
|
||||
|
@ -112,7 +123,7 @@ if(isset($_POST['youtube']))
|
|||
$file_directory = createDataFolders();
|
||||
$vid_array['file_directory'] = $file_directory;
|
||||
$vid_array['category'] = array($cbvid->get_default_cid());
|
||||
$vid_array['file_name'] = $filename;
|
||||
$vid_array['file_name'] = $file_name;
|
||||
$vid_array['userid'] = userid();
|
||||
|
||||
$duration = $vid_array['duration'];
|
||||
|
@ -133,12 +144,12 @@ if(isset($_POST['youtube']))
|
|||
$db->update(tbl("video"),array("status","refer_url","duration"),array('Successful',$ref_url,$duration)," videoid='$vid'");
|
||||
|
||||
//Downloading thumb
|
||||
$downloaded_thumb = snatch_it(urlencode($max_quality_thumb),THUMBS_DIR.'/'.$file_directory,$filename."-ytmax.jpg");
|
||||
$downloaded_thumb = snatch_it(urlencode($max_quality_thumb),THUMBS_DIR.'/'.$file_directory,$file_name."-ytmax.jpg");
|
||||
|
||||
$params = array();
|
||||
$params['filepath'] = $downloaded_thumb;
|
||||
$params['files_dir'] = $file_directory;
|
||||
$params['file_name'] = $filename;
|
||||
$params['file_name'] = $file_name;
|
||||
$params['width'] = $thumb_contents['width'];
|
||||
$params['height'] = $thumb_contents['height'];
|
||||
|
||||
|
@ -208,7 +219,7 @@ function callback($resource, $download_size, $downloaded, $upload_size, $uploade
|
|||
|
||||
|
||||
$file = $_POST['file'];
|
||||
$file_name = mysql_clean($_POST['file_name']);
|
||||
//$file_name = mysql_clean($_POST['file_name']);
|
||||
// $file = "http://clipbucket.dev/abc.mp4";
|
||||
// $file_name = "abc";
|
||||
|
||||
|
|
|
@ -136,8 +136,16 @@ switch($mode)
|
|||
$config_for_mp4 = $Cbucket->configs['stay_mp4'];
|
||||
$ffmpegpath = $Cbucket->configs['ffmpegpath'];
|
||||
$extension = getExt( $_FILES['Filedata']['name']);
|
||||
/*$raw_content_type = mime_content_type($_FILES['Filedata']['tmp_name']);
|
||||
$content_type = substr($raw_content_type, 0,strpos($raw_content_type, '/'));*/
|
||||
|
||||
#checking for if the right file is uploaded
|
||||
$content_type = get_mime_type($_FILES['Filedata']['tmp_name']);
|
||||
if ( $content_type != 'video') {
|
||||
echo json_encode(array("status"=>"400","err"=>"Invalid Content"));
|
||||
exit();
|
||||
}
|
||||
|
||||
// pex($content_type,true);
|
||||
|
||||
$types = strtolower(config('allowed_types'));
|
||||
$supported_extensions = explode(',', $types);
|
||||
|
||||
|
|
|
@ -161,6 +161,14 @@ switch($mode)
|
|||
upload_error("Invalid file extension");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#checking for if the right file is uploaded
|
||||
$content_type = get_mime_type($_FILES[$form]['tmp_name']);
|
||||
if ( $content_type != 'image') {
|
||||
upload_error("Invalid file type");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
$filename = $cbphoto->create_filename();
|
||||
|
||||
|
@ -187,6 +195,22 @@ switch($mode)
|
|||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
#checking for if the right file is uploaded
|
||||
$content_type = get_mime_type($_FILES['file']['tmp_name']);
|
||||
if ( $content_type != 'image') {
|
||||
echo json_encode(array("status"=>"400","err"=>"Invalid Content"));
|
||||
exit();
|
||||
}
|
||||
|
||||
$extension = getExt( $_FILES['file']['name']);
|
||||
$types = strtolower(config('allowed_types'));
|
||||
$supported_extensions = explode(',', $types);
|
||||
|
||||
if (!in_array($extension, $supported_extensions)) {
|
||||
echo json_encode(array("status"=>"504","msg"=>"Invalid extension"));
|
||||
exit();
|
||||
}
|
||||
|
||||
//pr($_REQUEST);
|
||||
$targetDir = PHOTOS_DIR;
|
||||
$directory = create_dated_folder( PHOTOS_DIR );
|
||||
|
@ -312,7 +336,7 @@ switch($mode)
|
|||
|
||||
echo json_encode( array("success"=>"yes","file_name"=>$filename, "extension" => getExt( $filePath ), "file_directory" => $directory ) );
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
include('../includes/config.inc.php');
|
||||
|
||||
exit(json_encode(array("alert"=>"This API has been deprecated")));
|
||||
$vote = $_POST["vote"];
|
||||
$userid = $_POST["channelId"];
|
||||
//if($userquery->login_check('',true)){
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
*/
|
||||
|
||||
function translate_phrase($phrase, $phrase_code, $to, $total, $current) {
|
||||
global $MrsTranslator;
|
||||
global $GoogleTranslator;
|
||||
/**
|
||||
* There is no point in starting with empty phrase
|
||||
* or invalid language code
|
||||
|
@ -55,11 +55,11 @@
|
|||
|
||||
if (!empty($phrase) && strlen($to) == 2) {
|
||||
# Feed file to Bing API for translation
|
||||
$translation = $MrsTranslator->translate($phrase,$to,'en',"text/html");
|
||||
$translation = $GoogleTranslator->translate($phrase,$to,'en',"text/html");
|
||||
|
||||
# In case, it failed in translation, lets give it another try
|
||||
if (!$translation) {
|
||||
$translation = $MrsTranslator->translate($phrase,$to,'en',"text/html");
|
||||
$translation = $GoogleTranslator->translate($phrase,$to,'en',"text/html");
|
||||
}
|
||||
|
||||
if (!empty($translation)) {
|
||||
|
|
|
@ -11,13 +11,7 @@ require'../includes/admin_config.php';
|
|||
$userquery->admin_login_check();
|
||||
$userquery->login_check('web_config_access');
|
||||
$pages->page_redir();
|
||||
$access_token = $MrsTranslator->get_access_token();
|
||||
|
||||
if(isset($_COOKIE['bing_access_token'])){
|
||||
//Do nothing
|
||||
}else{
|
||||
setcookie('bing_access_token', $access_token, time()+600);
|
||||
}
|
||||
/* Assigning page and subpage */
|
||||
if(!defined('MAIN_PAGE')){
|
||||
define('MAIN_PAGE', 'General Configurations');
|
||||
|
|
|
@ -67,7 +67,7 @@ if(isset($_POST['update'])){
|
|||
'collection_rating',
|
||||
'collectionsSection',
|
||||
'comments_per_page',
|
||||
'captcha_type',
|
||||
/*'captcha_type',*/
|
||||
'con_modules_type',
|
||||
'comments_captcha',
|
||||
'comment_rating',
|
||||
|
@ -86,6 +86,7 @@ if(isset($_POST['update'])){
|
|||
'debug_level',
|
||||
'default_country_iso2',
|
||||
'default_time_zone',
|
||||
'pick_geo_country',
|
||||
'disallowed_usernames',
|
||||
'use_subs',
|
||||
|
||||
|
@ -176,7 +177,7 @@ if(isset($_POST['update'])){
|
|||
'photo_other_limit',
|
||||
|
||||
|
||||
'quick_conv',
|
||||
/*'quick_conv',*/
|
||||
|
||||
'resize',
|
||||
'remoteUpload',
|
||||
|
@ -199,7 +200,7 @@ if(isset($_POST['update'])){
|
|||
'thumb_height',
|
||||
|
||||
'use_ffmpeg_vf',
|
||||
'use_crons',
|
||||
/*'use_crons',*/
|
||||
'user_comment_own',
|
||||
'user_rate_opt1' ,
|
||||
'users_items_subscriptions',
|
||||
|
|
|
@ -48,7 +48,7 @@ if(isset($_POST['mass_upload_video']))
|
|||
$file_arr = $files[$i];
|
||||
$file_path = $files[$i]['path'];
|
||||
$file_orgname = $files[$i]['file'];
|
||||
|
||||
|
||||
if($cbmass->is_mass_file($file_arr))
|
||||
{
|
||||
$code = $i+1;
|
||||
|
@ -91,6 +91,7 @@ if(isset($_POST['mass_upload_video']))
|
|||
'tags' => $_POST['tags'][$i],
|
||||
'category' => array($cbvid->get_default_cid()),
|
||||
'file_name' => $file_name,
|
||||
'file_directory' => $file_directory,
|
||||
);
|
||||
|
||||
$vid = $Upload->submit_upload($array);
|
||||
|
@ -107,13 +108,16 @@ if(isset($_POST['mass_upload_video']))
|
|||
return false;
|
||||
}
|
||||
|
||||
$file_directory = createDataFolders();
|
||||
$array = array(
|
||||
'title' => $_POST['title'][$i],
|
||||
'description' => $_POST['description'][$i],
|
||||
'tags' => $_POST['tags'][$i],
|
||||
'category' => $_POST['category'.$code],
|
||||
'file_name' => $file_key,
|
||||
'file_directory' => $file_directory,
|
||||
);
|
||||
//pex($array,true);
|
||||
$vid = $Upload->submit_upload($array);
|
||||
}else{
|
||||
e("\"".$file_arr['title']."\" is not available");
|
||||
|
@ -137,11 +141,23 @@ if(isset($_POST['mass_upload_video']))
|
|||
//Moving file to temp dir and Inserting in conversion queue..
|
||||
|
||||
$file_name = $cbmass->move_to_temp($file_arr,$file_key);
|
||||
$file_directory = createDataFolders();
|
||||
|
||||
createDataFolders(LOGS_DIR);
|
||||
$logFile = LOGS_DIR.'/'.$file_directory.'/'.$file_key.'.log';
|
||||
//pex($logFile,true);
|
||||
$log = new SLog($logFile);
|
||||
|
||||
$log->newSection("Pre-Check Configurations");
|
||||
$log->writeLine("File to be converted", 'Initializing File <strong>'.$file_name.'.mp4</strong> and pre checking configurations...', true);
|
||||
$hardware = shell_exec('lshw -short');
|
||||
if ($hardware){
|
||||
$log->writeLine("System hardware Information", $hardware, true);
|
||||
}else{
|
||||
$log->writeLine('System hardware Information', 'Unable log System hardware information, plaese install "lshw" ', true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$results=$Upload->add_conversion_queue($file_name);
|
||||
$str = "/".date("Y")."/".date("m")."/".date("d")."/";
|
||||
$str1 = date("Y")."/".date("m")."/".date("d");
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
{if $edit_category != "show"}
|
||||
<div id="content" style="display: none">
|
||||
<form action="category.php" method="post" enctype="multipart/form-data" name="add_category" id="Add Category">
|
||||
|
@ -162,6 +162,7 @@
|
|||
{else}
|
||||
No Category Has Been Created Yet
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
{if $useSubs == 1}
|
||||
<div class="col-md-4">
|
||||
<label>Parent Category</label>
|
||||
{cbCategories output="dropdown" class="form-control" name="parent_cat" id="parent_cat" blank_option=TRUE echo=TRUE type="video"}
|
||||
{cbCategories output="dropdown" class="form-control" name="parent_cat" id="parent_cat" blank_option=TRUE echo=TRUE type="collection"}
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
|
|
@ -176,7 +176,7 @@
|
|||
<tr>
|
||||
<td class="first"><label for="filename">Uploaded Date</label></td>
|
||||
<td class="last">
|
||||
<p><span>{$data.datecreated|nicetime}</span></p>
|
||||
<p><span>{$data.date_added|date_only}</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -345,7 +345,24 @@
|
|||
|
||||
<div class="col-md-12">
|
||||
{$field.class='form-control'}
|
||||
{$field.hint_1}<br>{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
|
||||
{$field.hint_1}<br>
|
||||
{ANCHOR place=$field.anchor_before}
|
||||
|
||||
<!-- checkmate -->
|
||||
{if $field.name=='embed_code'}
|
||||
{if ($data.embed_code == '' || $data.embed_code == 'none' || $data.embed_code ==NULL)}
|
||||
{$field.extra_tags='disabled="disabled"'}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $field.name=='remote_play_url'}
|
||||
{if ($data.remote_play_url == '' || $data.remote_play_url == 'none' || $data.remote_play_url ==NULL)}
|
||||
{$field.extra_tags=' disabled="disabled"'}
|
||||
{/if}
|
||||
{/if}
|
||||
<!-- checkmate -->
|
||||
|
||||
{$formObj->createField($field)}
|
||||
</div><br>
|
||||
{$field.hint_2}
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div id="navbar" class="navbar-container container">
|
||||
<div class="navbar-header pull-left">
|
||||
<div class="logoContainer clearfix">
|
||||
<a class="navbar-brand" href="{$baseurl}/admin_area">
|
||||
<a class="navbar-brand" href="{$admin_baseurl}">
|
||||
<img class="pull-left" src="{$imageurl}/login_logo.png" height="30">
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -298,7 +298,7 @@
|
|||
},
|
||||
{
|
||||
"category": "Videos",
|
||||
"column-1": '{get_videos|number_format count_only=yes}'
|
||||
"column-1": '{get_videos count_only=yes}'
|
||||
},
|
||||
{
|
||||
"category": "Collections",
|
||||
|
@ -357,6 +357,7 @@
|
|||
AmCharts.makeChart("ubarchart",
|
||||
{
|
||||
"type": "serial",
|
||||
"pathToImages": "https://www.amcharts.com/lib/3/images/",
|
||||
"categoryField": "category",
|
||||
"startDuration": 1,
|
||||
"mouseWheelZoomEnabled": true,
|
||||
|
@ -417,6 +418,7 @@
|
|||
AmCharts.makeChart("vbarchart",
|
||||
{
|
||||
"type": "serial",
|
||||
"pathToImages": "https://www.amcharts.com/lib/3/images/",
|
||||
"categoryField": "category",
|
||||
"startDuration": 1,
|
||||
"mouseWheelZoomEnabled": true,
|
||||
|
|
|
@ -1,76 +1,4 @@
|
|||
{$secret_Id = $secret_Id|@json_encode}
|
||||
{if $edit_lang != 'yes'}
|
||||
<h3>API KEYS</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<form name="lang_ids" method="post" action="?default">
|
||||
<label>ClientID :</label> <input type="text" name="client_id" value={$client_id}></br></br>
|
||||
<label> SecretID :</label> <input type="text" name="sec_id" value={$secret_Id}></br></br>
|
||||
<input type="submit" name="set_language" id="set_language" value="Set Language Ids" class="btn btn-primary" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6" style="float:right;">
|
||||
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">How to get API Keys</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="myModal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Bing API</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><strong>Step 1. Sign in and Register.</strong></br>
|
||||
Sign-in to Windows Azure Marketplace. If this is your first time, you’ll likely see this registration page.
|
||||
Fill out your details, and press the ‘Continue’ button.
|
||||
You’ll be taken to the Terms of Use page. Read it carefully, and if you accept it, check the box at the bottom of the screen that says ‘I accept the Terms of Use’, and press the ‘Register’ button.
|
||||
</p>
|
||||
<p><strong>Step 2. Subscribe to the Microsoft Translator API.</strong></br>
|
||||
In this section you’ll subscribe to the Microsoft Translator API in the Windows Azure Marketplace. There are a number of service options you can choose, and in this walkthrough you’ll see how to use the free one.
|
||||
</p>
|
||||
<p><strong>Step 2.1. Find the Microsoft Translator API service in the Windows Azure Marketplace
|
||||
</strong></br>
|
||||
If you’ve completed the Windows Azure Marketplace registration (Step 1), then visit <a href="https://datamarket.azure.com/home/">https://datamarket.azure.com/home/</a> to see the main Marketplace home page. At the top of the screen, you’ll see a ‘Search’ box.
|
||||
Type ‘translator’ into this box and press enter, or click the button on the right that is shaped like a magnifying glass.
|
||||
</p>
|
||||
<p><strong>Step 2.2. Subscribe to the Translator API service.
|
||||
</strong></br>
|
||||
Click on ’Microsoft Translator’ and you’ll be taken to the Microsoft Translator API Offer page on Windows Azure Marketplace.
|
||||
(Note: For a short cut, you can also go directly to the screen by visiting this URL: <a href="https://datamarket.azure.com/dataset/bing/microsofttranslator">https://datamarket.azure.com/dataset/bing/microsofttranslator</a>
|
||||
On the right hand side of the screen, you’ll see a number of different monthly volume offers. Choose the one that meets your monthly volume usage needs. For this guide, you’ll use the free 2 million characters per month subscription offer, which you can find at the bottom of the list.
|
||||
Press the ‘Sign Up’ link on your chosen offer and you’ll be taken to a page where you are asked to confirm and agree that you will adhere to the Translator API ‘Offer Terms and Privacy Policy’.
|
||||
If you agree, check the box and press the Sign Up button.
|
||||
You’ll then be taken to the page confirming that you’ve successfully subscribed to the service and the volume goes into effect at that time. In the next step, you’ll get your developer credentials from Windows Azure Marketplace, and you’ll use these when building your apps.
|
||||
</p>
|
||||
<p><strong>Step 3. Getting your Developer Credentials</strong></br>
|
||||
This step assumes that you have:
|
||||
· Completed Steps 1 and 2
|
||||
· You have registered for a Windows Azure Marketplace account
|
||||
· You have used your Marketplace account to subscribe to the Microsoft Translator API service.
|
||||
</p>
|
||||
<p><strong>Step 3.1. Registering your application on the Windows Azure Marketplace.</strong></br>
|
||||
Sign in to <a href= "https://datamarket.azure.com/home/">https://datamarket.azure.com/home/</a>, and you’ll see the familiar welcome page.
|
||||
At the bottom of the page, you’ll see a number of links, organized into columns.
|
||||
One of these reads ‘Develop’, and under it you’ll see a link that says ‘Register your Application’.
|
||||
Select this and you’ll be taken to the screen that allows you register your application.
|
||||
</p>
|
||||
<p><strong>Step 3.2. Getting your Client ID and Client Secret</strong></br>
|
||||
You use this to get the Client ID and Client Secret values that your application will need to authenticate your service when you build your application.
|
||||
· Fill out the Client ID, and Name fields.
|
||||
· The Client Secret field is already completed for you. Do not change it.
|
||||
· Fill out the ‘Redirect URI’ field with any valid URL that uses https, for example https://microsoft.com. This field is not used by the Microsoft Translator API.
|
||||
· You can also leave the ‘Enable subdomain access’ checkbox unchecked, as Translator doesn’t use it.
|
||||
Remember and note the Client ID and Client Secret fields. You will need these when you write your app.
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="heading">
|
||||
<h2>Language Settings</h2>
|
||||
</div>
|
||||
|
@ -313,7 +241,7 @@
|
|||
var NewLang,langExists,sizeOfArray;
|
||||
var percentPakro,allTextLines = [];
|
||||
var set=true;
|
||||
var sec = {$secret_Id};
|
||||
var sec = '{$secret_Id}';
|
||||
var firstHit = true;
|
||||
var dialogLangPack= $('<div class="alert-msg-holder" id="headErr"><div role="alert" class="alert alert-success alert-dismissible alert-ajax"><button aria-label="Close" data-dismiss="alert" class="close" type="button"><span aria-hidden="true">×</span></button><strong>Language Pack Uploaded </strong></div></div>');
|
||||
var log = $('<div class="alert-msg-holder" id="headErr"><div role="alert" class="alert alert-danger alert-dismissible alert-ajax"><button aria-label="Close" data-dismiss="alert" class="close" type="button"><span aria-hidden="true">×</span></button><strong>Invalid keys stored in database </strong></div></div>');
|
||||
|
@ -426,9 +354,11 @@
|
|||
$.each( thePhrases, function( phrase_code, phrase ) {
|
||||
totalPhrases = totalPhrases + 1;
|
||||
});
|
||||
totalPhrases = totalPhrases -1;
|
||||
|
||||
function sendAjax(data) {
|
||||
goodToGo = false;
|
||||
|
||||
$.ajax({
|
||||
//async: false,
|
||||
url: 'ajaxLang.php',
|
||||
|
@ -436,7 +366,9 @@
|
|||
data: data,
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
success:function(xhr) {
|
||||
|
||||
if (xhr.phrase != 'aye') {
|
||||
|
@ -454,8 +386,8 @@
|
|||
currentKey = currentKey + 1;
|
||||
phrase_code = Object.keys(thePhrases)[currentKey];
|
||||
phrase = thePhrases[phrase_code];
|
||||
|
||||
phraseNum = phraseNum + 1;
|
||||
|
||||
data = {
|
||||
'selectFieldValue': $('#lang_option').val(),
|
||||
'langDetect': $('#lang_option option:selected').attr('data-check'),
|
||||
|
@ -464,12 +396,13 @@
|
|||
'totalPhrases' : totalPhrases,
|
||||
'phraseNum' : phraseNum
|
||||
}
|
||||
|
||||
sendAjax(data);
|
||||
} else {
|
||||
$('#submit_lang1').text('Successfully completed');
|
||||
$('#lang_option, #submit_lang1').attr("disabled",false);
|
||||
$('#submit_lang1').val('Successfully completed');
|
||||
}
|
||||
if (!xhr.status == 'success') {
|
||||
$('#lang_option, #submit_lang1').attr("disabled",false);
|
||||
alert("Unable to translate "+phrase);
|
||||
}
|
||||
//alert("NOW");
|
||||
|
@ -497,7 +430,7 @@
|
|||
sendAjax(data);
|
||||
|
||||
|
||||
phraseNum = phraseNum + 1;
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -231,6 +231,13 @@
|
|||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="pick_geo_country">Pick signup country geologically(if yes default country won't work)</label>
|
||||
<select name="pick_geo_country" id="pick_geo_country" class="form-control">
|
||||
<option value="yes" {if $row.pick_geo_country!='no'} selected="selected"{/if}>Yes</option>
|
||||
<option value="no" {if $row.pick_geo_country=='no'} selected="selected"{/if}>No</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
|
@ -624,7 +631,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<!-- <div class="col-md-4">
|
||||
<h5>Use Crons</h5>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="use_crons" value="yes" id="use_crons_0" {if $row.use_crons =='yes'} checked="checked"{/if} />Yes
|
||||
|
@ -633,7 +640,7 @@
|
|||
<label class="radio-inline">
|
||||
<input type="radio" name="use_crons" value="no" id="use_crons_1" {if $row.use_crons =='no'} checked="checked"{/if} />No
|
||||
</label>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="col-md-4">
|
||||
<label for="ffmpegpath">FFMPEG Path</label>
|
||||
|
@ -760,14 +767,14 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<!-- <div class="col-md-4">
|
||||
<h5>Quick Conversion</h5>
|
||||
<label class="checkbox" for="quick_conv">
|
||||
<input type="checkbox" name="quick_conv" id="quick_conv" value="yes" {if $row.quick_conv=='yes'} checked="checked"{/if}/>
|
||||
Turn on Quick Conversion
|
||||
<a href="javascript:void(0)" target="_blank"><img src="{$imageurl}/help.png" alt="info" border="0" class="tipsy_tip" title="If you check this option, videos will be converted as soon as uploading is complete, make sure your php path is correct before enabling this option otherwise may cause your website inaccessible" /></a>
|
||||
</label>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!--
|
||||
<div class="col-md-4">
|
||||
|
@ -1365,7 +1372,7 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<!-- <div class="col-md-4">
|
||||
<label for="varification_captcha">Image verification (captcha)</label>
|
||||
<select class="form-control" name="captcha_type">
|
||||
<option value="0" {if $row.captcha_type == 0}
|
||||
|
@ -1378,7 +1385,7 @@
|
|||
selected="selected"
|
||||
{/if}>Secured</option>
|
||||
</select>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
@ -1481,9 +1488,10 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label for="max_profile_pic_width">Max profile pic dimension</label>
|
||||
<input class="form-control" name="max_profile_pic_width" type="text" id="max_profile_pic_width" value="{$row.max_profile_pic_width}" size="6" maxlength="10" />
|
||||
<br>
|
||||
<label for="max_profile_pic_width">Max profile pic dimension</label>
|
||||
<input class="form-control" name="max_profile_pic_width" type="text" id="max_profile_pic_width" value="{$row.max_profile_pic_width}" size="6" maxlength="10" />
|
||||
Pixels
|
||||
<br>
|
||||
<label for="max_bg_width">Max Background Dimension</label>
|
||||
<input class="form-control" name="max_bg_width" type="text" id="max_bg_width" value="{$row.max_bg_width}" size="6" maxlength="10" />
|
||||
Pixels
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<div class="heading">
|
||||
<h2>Mass Uploader</h2>
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<strong>Warning!</strong> Videos with only allowed extensions will be shown here.
|
||||
</div>
|
||||
|
||||
{$mass_upload_config = config('delete_mass_upload')}
|
||||
|
||||
{assign var=vid_files value=$cbmass->get_video_files()}
|
||||
|
@ -8,31 +12,38 @@
|
|||
{if $vid_files}
|
||||
{assign var = i value = 0}
|
||||
<div id="massUploadSelectAll">
|
||||
<h3>Select/Deselect</h3>
|
||||
<input type="checkbox" id="massUploadSelect"/>
|
||||
<h3>Select/Deselect</h3>
|
||||
<input type="checkbox" id="massUploadSelect"/>
|
||||
</div>
|
||||
<div id="massUploadCategoriesSelection">
|
||||
<h3>Mass Category Selection</h3>
|
||||
{foreach $cats as $cat}
|
||||
<label><input type="checkbox" class="checkall" value='{$cat['category_id']}'/> {$cat['category_name']}</label>
|
||||
{$i = $i+1}
|
||||
{/foreach}
|
||||
<h3>Mass Category Selection</h3>
|
||||
{foreach $cats as $cat}
|
||||
<label><input type="checkbox" class="checkall" value='{$cat['category_id']}'/> {$cat['category_name']}</label>
|
||||
{$i = $i+1}
|
||||
{/foreach}
|
||||
</div>
|
||||
<!-- checkmate -->
|
||||
{$count=0}
|
||||
<!-- checkmate -->
|
||||
<form name="mass_upload" method="post" class="cbform">
|
||||
{foreach from=$vid_files item=file name=mass_files}
|
||||
{assign var='requiredFields' value=$Upload->loadRequiredFields($file)}
|
||||
{assign var='optionFields' value=$Upload->loadOptionFields($file)}
|
||||
{assign var='locationFields' value=$Upload->loadLocationFields($file)}
|
||||
{assign var='cust_fields' value=$Upload->custom_form_fields}
|
||||
|
||||
<input class="lead" type="hidden" name="mass_up[]" value="{$file.title}" />
|
||||
|
||||
<div class="well">
|
||||
<input type="checkbox" name="filesToImport[]" class="checkboxMassImport"/>
|
||||
<!-- checkmate -->
|
||||
<input type="checkbox" name="filesToImport[{$count}]" class="checkboxMassImport"/>
|
||||
{$count=$count+1}
|
||||
<!-- checkmate -->
|
||||
<span class="label label-danger" style="cursor: pointer;" onclick="$(this).next().toggle();return false;"><b>{$file.title}</b>{$smarty.foreach.mass_files}</span>
|
||||
<div class="" style="display:none">
|
||||
{foreach from=$requiredFields item=field}
|
||||
{$field.class='form-control'}
|
||||
{if $field.title=='Title'}
|
||||
{if $field.id=='title'}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for="{$field.id}"><b style="color: #000000">{$field.name}</b></label>
|
||||
|
@ -42,7 +53,7 @@
|
|||
{/foreach}
|
||||
{foreach from=$requiredFields item=field}
|
||||
{$field.class='form-control'}
|
||||
{if $field.title=='Description'}
|
||||
{if $field.id=='desc'}
|
||||
<div class="col-md-6">
|
||||
<label for="{$field.id}"><b style="color: #000000">{$field.name}</b></label>
|
||||
{$formObj->createField($field, true)}
|
||||
|
@ -53,7 +64,7 @@
|
|||
<div class="row">
|
||||
{foreach from=$requiredFields item=field}
|
||||
{$field.class='form-control'}
|
||||
{if $field.title=='Video Category'}
|
||||
{if $field.id=='category'}
|
||||
<div class="col-md-6">
|
||||
<label for="{$field.id}"><b style="color: #000000">{$field.name}</b></label>
|
||||
<div class="scroll categories">
|
||||
|
@ -64,7 +75,7 @@
|
|||
{/foreach}
|
||||
{foreach from=$requiredFields item=field}
|
||||
{$field.class='form-control'}
|
||||
{if $field.title=='Tags'}
|
||||
{if $field.id=='tags'}
|
||||
<div class="col-md-6">
|
||||
<label for="{$field.id}"><b style="color: #000000">{$field.name}</b></label>
|
||||
{$formObj->createField($field, true)}
|
||||
|
@ -98,25 +109,25 @@ Uploaded Videos are stored in mass_uploads/processed.
|
|||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(document).on('change', '.checkall', function()
|
||||
{
|
||||
var id_cat = this.value;
|
||||
var to_check = this.checked;
|
||||
{
|
||||
$(document).on('change', '.checkall', function()
|
||||
{
|
||||
var id_cat = this.value;
|
||||
var to_check = this.checked;
|
||||
|
||||
$(".categories input").each(function() {
|
||||
if( this.value == id_cat )
|
||||
this.checked = to_check;
|
||||
});
|
||||
});
|
||||
$(".categories input").each(function() {
|
||||
if( this.value == id_cat )
|
||||
this.checked = to_check;
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', '#massUploadSelect', function()
|
||||
{
|
||||
var to_check = this.checked;
|
||||
$(document).on('change', '#massUploadSelect', function()
|
||||
{
|
||||
var to_check = this.checked;
|
||||
|
||||
$(".checkboxMassImport").each(function() {
|
||||
this.checked = to_check;
|
||||
});
|
||||
});
|
||||
});
|
||||
$(".checkboxMassImport").each(function() {
|
||||
this.checked = to_check;
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -15,18 +15,14 @@
|
|||
<div id="content" style="display: none">
|
||||
<form action="user_category.php" method="post" enctype="multipart/form-data" name="add_category" id="Add Category">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<label>Category Name*</label>
|
||||
<input type="text" id="name" name="name" class="form-control" >
|
||||
<input type="text" id="name" name="name" required="required" class="form-control" >
|
||||
</div>
|
||||
{assign var=useSubs value=config(use_subs)}
|
||||
{if $useSubs == 1}
|
||||
<div class="col-md-4">
|
||||
<label>Parent Category</label>
|
||||
{cbCategories output="dropdown" class="form-control" name="parent_cat" id="parent_cat" blank_option=TRUE echo=TRUE type="user"}
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<label>Make Default Category</label>
|
||||
<select class="form-control" name="default_categ">
|
||||
<option class="form-control" name="default" id="default_0" value="yes">Yes</option>
|
||||
|
@ -37,9 +33,18 @@
|
|||
<div class="row">
|
||||
|
||||
<div class="col-md-8" style="margin-top: 15px">
|
||||
<textarea class="form-control" name="desc" id="desc" cols="33" rows="5">{'desc'|post_form_val}</textarea>
|
||||
<hr>
|
||||
<label>Decription</label>
|
||||
<textarea class="form-control" name="desc" id="description" cols="33" rows="5">{'desc'|post_form_val}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="row">
|
||||
|
||||
<div class="col-md-8" style="margin-top: 15px">
|
||||
<textarea class="form-control" name="desc" id="desc" cols="33" rows="5">{'desc'|post_form_val}</textarea>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<br>
|
||||
|
@ -65,15 +70,12 @@
|
|||
<input name="cid" value="{$cat_details.category_id}" type="hidden" />
|
||||
<input name="cur_name" value="{$cat_details.category_name}" type="hidden" />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<label>Category Name*</label>
|
||||
<input name="name" class="form-control" type="text" id="name" value="{$cat_details.category_name}" size="45" />
|
||||
<input name="name" class="form-control" type="text" id="name" required="required" value="{$cat_details.category_name}" size="45" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Parent Category</label>
|
||||
{cbCategories output="dropdown" class='form-control' selected=$cat_details.parent_id name="parent_cat" id="parent_cat" blank_option=TRUE type="user" echo=TRUE}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>Make Default Category</label>
|
||||
<select class="form-control" name="default_categ">
|
||||
<option class="form-control" name="default" id="default_0" {if $cat_details.isdefault=='yes'} checked="checked"{/if} >Yes</option>
|
||||
|
@ -84,7 +86,9 @@
|
|||
<div class="row">
|
||||
<div class="col-md-6"></div>
|
||||
<div class="col-md-8">
|
||||
<textarea class="form-control" name="desc" id="desc" cols="33" rows="5">{$cat_details.category_desc}</textarea>
|
||||
<hr>
|
||||
<label>Decription</label>
|
||||
<textarea class="form-control" name="desc" id="description" cols="33" rows="5">{$cat_details.category_desc}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
@ -113,7 +117,6 @@
|
|||
<td width="20"><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/></td>
|
||||
<td width="225" class="left_head" style="text-indent:10px">Category Name</td>
|
||||
<td width="75" align="left" class="head">Order</td>
|
||||
<td width="225" align="left" class="head">Parent Category</td>
|
||||
<td width="250" class="head">Description</td>
|
||||
<td width="100" class="head">Default</td>
|
||||
<td width="150" class="head">Action</td>
|
||||
|
@ -132,7 +135,6 @@
|
|||
{else}
|
||||
{assign var=p_name value=$cbvid->get_category_field($category[list].parent_id,'category_name')}
|
||||
{/if}
|
||||
<td>{$p_name}</td>
|
||||
<td>{if $category[list].category_desc}{$category[list].category_desc}{else}<em>N/A</em>{/if}</td>
|
||||
<td>{$category[list].isdefault}</td>
|
||||
<td>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
{assign var='types' value=$userquery->get_level_types()}
|
||||
{section name=t loop=$types}
|
||||
{assign var=perms value=$userquery->get_permissions($types[t].user_permission_type_id)}
|
||||
{pr($perms,true)}
|
||||
<!-- {pr($perms,true)} -->
|
||||
{if $types[t].user_permission_type_name == 'Viewing Permission'}
|
||||
<h2>Viewing Permission</h2>
|
||||
<div class="row">
|
||||
|
|
|
@ -21,8 +21,8 @@ if(isset($_POST['button']))
|
|||
}
|
||||
|
||||
//Getting lang variables
|
||||
|
||||
$query = mysql_query("SELECT * FROM ".tbl("phrases")." ORDER BY text ASC");
|
||||
global $db;
|
||||
$query = mysqli_query($db,"SELECT * FROM ".tbl("phrases")." ORDER BY text ASC");
|
||||
|
||||
?>
|
||||
<form id="form1" name="form1" method="post" action="">
|
||||
|
@ -58,7 +58,7 @@ $query = mysql_query("SELECT * FROM ".tbl("phrases")." ORDER BY text ASC");
|
|||
</td>
|
||||
</tr>
|
||||
<?
|
||||
while($data=mysql_fetch_array($query))
|
||||
while($data=mysqli_fetch_array($query))
|
||||
{
|
||||
?>
|
||||
<td align="left"><?=$data['varname']?>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
define("THIS_PAGE",'ajax');
|
||||
|
||||
$is_ajax = true;
|
||||
$mode = $_POST['mode'];
|
||||
require 'includes/config.inc.php';
|
||||
|
||||
|
@ -438,7 +438,7 @@ if(!empty($mode))
|
|||
{
|
||||
case 'v':
|
||||
case 'video':
|
||||
default:
|
||||
// default:
|
||||
{
|
||||
$id = $_POST['id'];
|
||||
$reported = $cbvideo->action->report_it($id);
|
||||
|
@ -477,7 +477,7 @@ if(!empty($mode))
|
|||
|
||||
case 'g':
|
||||
case 'group':
|
||||
default:
|
||||
// default:
|
||||
{
|
||||
$id = $_POST['id'];
|
||||
$cbgroup->action->report_it($id);
|
||||
|
@ -486,7 +486,7 @@ if(!empty($mode))
|
|||
|
||||
case 'u':
|
||||
case 'user':
|
||||
default:
|
||||
// default:
|
||||
{
|
||||
$id = $_POST['id'];
|
||||
$userquery->action->report_it($id);
|
||||
|
@ -530,16 +530,26 @@ if(!empty($mode))
|
|||
case 'subscribe_user':
|
||||
{
|
||||
$subscribe_to = mysql_clean($_POST['subscribe_to']);
|
||||
$username = username();
|
||||
$mailId = $userquery->get_user_details($subscribe_to,false,true);
|
||||
$userquery->subscribe_user($subscribe_to);
|
||||
if(msg())
|
||||
{
|
||||
$msg = msg_list();
|
||||
$msg = '<div class="msg">'.$msg[0].'</div>';
|
||||
$msg['msg'] = $msg[0]; unset($msg[0]);
|
||||
$msg['typ'] = 'msg';
|
||||
if(!userid()) $msg['severity'] = 2;
|
||||
else $msg['severity'] = 1;
|
||||
$msg = json_encode($msg);
|
||||
}
|
||||
if(error())
|
||||
{
|
||||
$msg = error_list();
|
||||
$msg = '<div class="error">'.$msg[0].'</div>';
|
||||
$msg['msg'] = $msg[0]; unset($msg[0]);
|
||||
$msg['typ'] = 'err';
|
||||
if(!userid()) $msg['severity'] = 2;
|
||||
else $msg['severity'] = 1;
|
||||
$msg = json_encode($msg);
|
||||
}
|
||||
echo $msg;
|
||||
}
|
||||
|
@ -563,6 +573,18 @@ if(!empty($mode))
|
|||
}
|
||||
break;
|
||||
|
||||
case 'get_subscribers_count':
|
||||
$userid = $_POST['userid'];
|
||||
if(isset($userid) ) {
|
||||
$sub_count = $userquery->get_user_subscribers($userid,true);
|
||||
echo json_encode(array("subscriber_count"=>$sub_count));
|
||||
}
|
||||
else{
|
||||
echo json_encode(array("msg"=>"Userid is empty"));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 'add_friend':
|
||||
{
|
||||
|
|
|
@ -7,22 +7,24 @@
|
|||
* @author: Saqib Razzaq
|
||||
* @modified: 8th April, 2016
|
||||
*/
|
||||
|
||||
$is_ajax = true;
|
||||
require '../includes/config.inc.php';
|
||||
if (isset($_POST['mode'])) {
|
||||
$mode = $_POST['mode'];
|
||||
global $db;
|
||||
switch ($mode) {
|
||||
case 'emailExists':
|
||||
$email = $_POST['email'];
|
||||
$check = $db->select(tbl('users'),"email"," email='$email'");
|
||||
$email = mysql_clean($_POST['email']);
|
||||
$check = $db->select(tbl('users'),"email"," email='$email'",false,false,false,true);
|
||||
if (!$check) {
|
||||
echo "NO";
|
||||
}else{
|
||||
echo "Fuck";
|
||||
}
|
||||
break;
|
||||
|
||||
case 'userExists':
|
||||
$username = $_POST['username'];
|
||||
$username = mysql_clean($_POST['username']);
|
||||
$check = $db->select(tbl('users'),"username"," username='$username'");
|
||||
if (!$check) {
|
||||
echo "NO";
|
||||
|
@ -31,7 +33,7 @@
|
|||
case 'get_video':{
|
||||
$response = array();
|
||||
try{
|
||||
$videoid = $_POST['videoid'];
|
||||
$videoid = (int)$_POST['videoid'];
|
||||
$videoDetails = $cbvid->get_video($videoid);
|
||||
if ( $videoDetails && video_playable($videoDetails) ){
|
||||
assign('video',$videoDetails);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* @author: Saqib Razzaq
|
||||
* @modified: 8th April, 2016
|
||||
*/
|
||||
|
||||
$is_ajax = true;
|
||||
require '../includes/config.inc.php';
|
||||
$params = array();
|
||||
if (isset($_POST['load_type'])) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* @author: Saqib Razzaq
|
||||
* @modified: 8th April, 2016
|
||||
*/
|
||||
|
||||
$is_ajax = true;
|
||||
require '../includes/config.inc.php';
|
||||
if (isset($_POST['mode'])) {
|
||||
$mode = $_POST['mode'];
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* @author: Saqib Razzaq
|
||||
* @modified: 8th April, 2016
|
||||
*/
|
||||
|
||||
$is_ajax = true;
|
||||
require '../includes/config.inc.php';
|
||||
if (isset($_POST['mode'])) {
|
||||
$mode = $_POST['mode'];
|
||||
|
|
|
@ -21,9 +21,9 @@ class API extends REST
|
|||
//Database connection
|
||||
private function dbConnect()
|
||||
{
|
||||
$this->db = mysql_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD);
|
||||
$this->db = mysqli_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD);
|
||||
if($this->db)
|
||||
mysql_select_db(self::DB,$this->db);
|
||||
mysqli_select_db($this->db,self::DB);
|
||||
}
|
||||
|
||||
//Public method for access api.
|
||||
|
@ -47,11 +47,11 @@ class API extends REST
|
|||
{
|
||||
$this->response('',406);
|
||||
}
|
||||
$sql = mysql_query("SELECT user_id, user_fullname, user_email FROM users WHERE user_status = 1", $this->db);
|
||||
if(mysql_num_rows($sql) > 0)
|
||||
$sql = mysqli_query($this->db ,"SELECT user_id, user_fullname, user_email FROM users WHERE user_status = 1");
|
||||
if(mysqli_num_rows($sql) > 0)
|
||||
{
|
||||
$result = array();
|
||||
while($rlt = mysql_fetch_array($sql,MYSQL_ASSOC))
|
||||
while($rlt = mysqli_fetch_array($sql,MYSQLI_ASSOC))
|
||||
{
|
||||
$result[] = $rlt;
|
||||
}
|
||||
|
@ -70,9 +70,9 @@ class API extends REST
|
|||
if($id > 0)
|
||||
{
|
||||
|
||||
mysql_query("DELETE FROM users WHERE user_id = $id");
|
||||
mysqli_query($this->db,"DELETE FROM users WHERE user_id = $id");
|
||||
|
||||
if (mysql_affected_rows() > 0)
|
||||
if (mysqli_affected_rows($this->db) > 0)
|
||||
$success = array('status' => "Success", "msg" => "Successfully one record deleted.");
|
||||
else
|
||||
$success = array('status' => "Failure", "msg" => "No such id exist in database");
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* @Author : Arslan Hassan
|
||||
*/
|
||||
include('../includes/config.inc.php');
|
||||
|
||||
exit(json_encode(array("Alert"=>"This is deprectaed ! ")));
|
||||
$request = $_REQUEST;
|
||||
|
||||
$file_name = $request['file_name'];
|
||||
|
|
|
@ -35,9 +35,9 @@ class API extends REST
|
|||
//Database connection
|
||||
private function dbConnect()
|
||||
{
|
||||
$this->db = mysql_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD);
|
||||
$this->db = mysqli_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD);
|
||||
if($this->db)
|
||||
mysql_select_db(self::DB,$this->db);
|
||||
mysqli_select_db($this->db,self::DB);
|
||||
}
|
||||
|
||||
//Public method for access api.
|
||||
|
|
3
upload/cache/comments/.gitignore
vendored
3
upload/cache/comments/.gitignore
vendored
|
@ -0,0 +1,3 @@
|
|||
*
|
||||
|
||||
!.gitignore
|
3
upload/cache/userfeeds/.gitignore
vendored
3
upload/cache/userfeeds/.gitignore
vendored
|
@ -0,0 +1,3 @@
|
|||
*
|
||||
|
||||
!.gitignore
|
3
upload/cache/views/.gitignore
vendored
Normal file
3
upload/cache/views/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*
|
||||
|
||||
!.gitignore
|
|
@ -21,15 +21,15 @@ include('clipbucket.php');
|
|||
$dbuser = $_POST['dbuser'];
|
||||
$dbname = $_POST['dbname'];
|
||||
|
||||
$cnnct = @mysql_connect($dbhost,$dbuser,$dbpass);
|
||||
$cnnct = @mysqli_connect($dbhost,$dbuser,$dbpass);
|
||||
|
||||
if(!$cnnct)
|
||||
$result['err'] = "<span class='alert'>Unable to connect to mysql : ".mysql_error().'</span>';
|
||||
$result['err'] = "<span class='alert'>Unable to connect to mysql : ".mysqli_connect_error().'</span>';
|
||||
else
|
||||
{
|
||||
$dbselect = @mysql_select_db($dbname,$cnnct);
|
||||
$dbselect = @mysqli_select_db($cnnct,$dbname);
|
||||
if(!$dbselect)
|
||||
$result['err'] = "<span class='alert'>Unable to select database : ".mysql_error().'</span>';
|
||||
$result['err'] = "<span class='alert'>Unable to select database : ".mysqli_error($cnnct).'</span>';
|
||||
}
|
||||
echo json_encode($result);
|
||||
}
|
||||
|
@ -59,15 +59,15 @@ include('clipbucket.php');
|
|||
$dbname = $_POST['dbname'];
|
||||
$dbprefix = $_POST['dbprefix'];
|
||||
|
||||
$cnnct = @mysql_connect($dbhost,$dbuser,$dbpass);
|
||||
$cnnct = @mysqli_connect($dbhost,$dbuser,$dbpass);
|
||||
|
||||
if(!$cnnct)
|
||||
$result['err'] = "<span class='alert'>Unable to connect to mysql : ".mysql_error().'</span>';
|
||||
$result['err'] = "<span class='alert'>Unable to connect to mysql : ".mysqli_connect_error().'</span>';
|
||||
else
|
||||
{
|
||||
$dbselect = @mysql_select_db($dbname,$cnnct);
|
||||
$dbselect = @mysqli_select_db($cnnct,$dbname);
|
||||
if(!$dbselect)
|
||||
$result['err'] = "<span class='alert'>Unable to select database : ".mysql_error().'</span>';
|
||||
$result['err'] = "<span class='alert'>Unable to select database : ".mysqli_error($cnnct).'</span>';
|
||||
}
|
||||
|
||||
if(@$result['err'])
|
||||
|
@ -125,7 +125,7 @@ include('clipbucket.php');
|
|||
if (substr(trim($line), -1, 1) == ';')
|
||||
{
|
||||
@$templine = preg_replace("/{tbl_prefix}/",$dbprefix,$templine);
|
||||
mysql_query($templine);
|
||||
mysqli_query($cnnct,$templine);
|
||||
$templine = '';
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ include('clipbucket.php');
|
|||
if (substr(trim($line), -1, 1) == ';')
|
||||
{
|
||||
@$templine = preg_replace("/{tbl_prefix}/",$dbprefix,$templine);
|
||||
mysql_query($templine);
|
||||
mysqli_query($cnnct,$templine);
|
||||
$templine = '';
|
||||
}
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ include('clipbucket.php');
|
|||
if (substr(trim($line), -1, 1) == ';')
|
||||
{
|
||||
@$templine = preg_replace("/{tbl_prefix}/",$dbprefix,$templine);
|
||||
mysql_query($templine);
|
||||
mysqli_query($cnnct,$templine);
|
||||
$templine = '';
|
||||
}
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ include('clipbucket.php');
|
|||
|
||||
case "create_files":
|
||||
{
|
||||
mysql_close($cnnct);
|
||||
mysqli_close($cnnct);
|
||||
$dbconnect = file_get_contents(BASEDIR.'/cb_install/dbconnect.php');
|
||||
$dbconnect = str_replace('_DB_HOST_', $dbhost, $dbconnect);
|
||||
$dbconnect = str_replace('_DB_NAME_', $dbname, $dbconnect);
|
||||
|
@ -269,7 +269,7 @@ include('clipbucket.php');
|
|||
{
|
||||
@$templine = preg_replace("/{tbl_prefix}/",TABLE_PREFIX,$templine);
|
||||
$templine;
|
||||
$db->execute($templine);//mysql_query($templine);
|
||||
$db->execute($templine);//mysqli_query($templine);
|
||||
$templine = '';
|
||||
}
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ include('clipbucket.php');
|
|||
//therefore we are dumping all existing email templates and re-import them
|
||||
if($upgrade<'2.4.5')
|
||||
{
|
||||
mysql_query('TRUNCATE '.TABLE_PREFIX.'email_templates');
|
||||
mysqli_query($cnnct,'TRUNCATE '.TABLE_PREFIX.'email_templates');
|
||||
//Dumping
|
||||
$sqlfile = BASEDIR."/cb_install/sql/email_templates.sql";
|
||||
if(file_exists($sqlfile))
|
||||
|
@ -296,7 +296,7 @@ include('clipbucket.php');
|
|||
{
|
||||
@$templine = preg_replace("/{tbl_prefix}/",TABLE_PREFIX,$templine);
|
||||
$templine;
|
||||
$db->execute($templine);//mysql_query($templine);
|
||||
$db->execute($templine);//mysqli_query($templine);
|
||||
$templine = '';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
*/
|
||||
|
||||
define("ClipBucket","ClipBucket - Open Source Media Sharing Script by Arslan Hassan");
|
||||
define("VERSION","2.8.3");
|
||||
define("STATE","STABLE");
|
||||
define("REV","4829");
|
||||
define("RELEASED","12-06-2017");
|
||||
define("AUTHORS","ARSLAN HASSAN,FAHAD ABBAS");
|
||||
define("VERSION","4.2");
|
||||
define("STATE","RC1");
|
||||
define("REV","4974");
|
||||
define("RELEASED","31-01-2019");
|
||||
define("AUTHORS","ARSLAN HASSAN,FAHAD ABBAS,AWAIS FIAZ");
|
||||
|
||||
?>
|
|
@ -1,230 +1,230 @@
|
|||
-- Configurations
|
||||
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES
|
||||
(1, 'site_title', 'ClipBucket v2'),
|
||||
(2, 'site_slogan', 'A way to broadcast yourself'),
|
||||
(3, 'baseurl', ''),
|
||||
(4, 'basedir', ''),
|
||||
(5, 'template_dir', 'cb_28'),
|
||||
(6, 'player_file', 'cb_video_js.php'),
|
||||
(7, 'closed', '0'),
|
||||
(8, 'closed_msg', 'We Are Updating Our Website, Please Visit us after few hours.'),
|
||||
(9, 'description', 'Clip Bucket is an ultimate Video Sharing script'),
|
||||
(10, 'keywords', 'clip bucket video sharing website script'),
|
||||
(11, 'ffmpegpath', '/usr/local/bin/ffmpeg'),
|
||||
(12, 'flvtool2path', '/usr/local/bin/flvtool2'),
|
||||
(13, 'mp4boxpath', '/usr/local/bin/MP4Box'),
|
||||
(14, 'vbrate', '300000'),
|
||||
(15, 'srate', '22050'),
|
||||
(16, 'r_height', ''),
|
||||
(17, 'r_width', ''),
|
||||
(18, 'resize', ''),
|
||||
(19, 'mencoderpath', ''),
|
||||
(20, 'keep_original', '1'),
|
||||
(21, 'activation', ''),
|
||||
(22, 'mplayerpath', ''),
|
||||
(23, 'email_verification', '1'),
|
||||
(24, 'allow_registeration', '1'),
|
||||
(25, 'php_path', '/usr/bin/php'),
|
||||
(26, 'videos_list_per_page', '30'),
|
||||
(27, 'channels_list_per_page', '25'),
|
||||
(28, 'videos_list_per_tab', '1'),
|
||||
(29, 'channels_list_per_tab', '1'),
|
||||
(30, 'video_comments', '1'),
|
||||
(31, 'video_rating', '1'),
|
||||
(32, 'comment_rating', '1'),
|
||||
(33, 'video_download', '1'),
|
||||
(34, 'video_embed', '1'),
|
||||
(35, 'groups_list_per_page', '25'),
|
||||
(36, 'seo', 'no'),
|
||||
(37, 'admin_pages', '100'),
|
||||
(38, 'search_list_per_page', '25'),
|
||||
(39, 'recently_viewed_limit', '10'),
|
||||
(40, 'max_upload_size', '1000'),
|
||||
(41, 'sbrate', '128000'),
|
||||
(42, 'thumb_width', '120'),
|
||||
(43, 'thumb_height', '90'),
|
||||
(45, 'user_comment_opt1', ''),
|
||||
(44, 'ffmpeg_type', ''),
|
||||
(46, 'user_comment_opt2', ''),
|
||||
(47, 'user_comment_opt3', ''),
|
||||
(48, 'user_comment_opt4', ''),
|
||||
(49, 'user_rate_opt1', ''),
|
||||
(50, 'captcha_type', '0'),
|
||||
(51, 'allow_upload', ''),
|
||||
(52, 'allowed_types', 'wmv,avi,divx,3gp,mov,mpeg,mpg,xvid,flv,asf,rm,dat,mp4,png,jpg'),
|
||||
(53, 'version', '2.0.1'),
|
||||
(54, 'version_type', 'Alpha'),
|
||||
(55, 'allow_template_change', '1'),
|
||||
(56, 'allow_language_change', '1'),
|
||||
(57, 'default_site_lang', ''),
|
||||
(58, 'video_require_login', ''),
|
||||
(59, 'audio_codec', 'libfdk_aac'),
|
||||
(60, 'con_modules_type', ''),
|
||||
(61, 'remoteUpload', ''),
|
||||
(62, 'embedUpload', ''),
|
||||
(63, 'player_div_id', ''),
|
||||
(64, 'code_dev', '(Powered by ClipBucket)'),
|
||||
(65, 'sys_os', ''),
|
||||
(66, 'debug_level', ''),
|
||||
(67, 'enable_troubleshooter', '1'),
|
||||
(68, 'vrate', '25'),
|
||||
(69, 'num_thumbs', '5'),
|
||||
(70, 'big_thumb_width', '320'),
|
||||
(71, 'big_thumb_height', '240'),
|
||||
(72, 'user_max_chr', '15'),
|
||||
(73, 'disallowed_usernames', 'shit, asshole, fucker'),
|
||||
(74, 'min_age_reg', '0'),
|
||||
(75, 'max_comment_chr', '800'),
|
||||
(76, 'user_comment_own', ''),
|
||||
(77, 'anonym_comments', 'yes'),
|
||||
(78, 'player_dir', 'CB_video_js'),
|
||||
(79, 'player_width', '661'),
|
||||
(80, 'player_height', '360'),
|
||||
(81, 'default_country_iso2', 'PK'),
|
||||
(82, 'channel_player_width', '600'),
|
||||
(83, 'channel_player_height', '281'),
|
||||
(84, 'videos_items_grp_page', '24'),
|
||||
(85, 'videos_items_hme_page', '25'),
|
||||
(86, 'videos_items_columns', '12'),
|
||||
(87, 'videos_items_ufav_page', '25'),
|
||||
(88, 'videos_items_uvid_page', '25'),
|
||||
(89, 'videos_items_search_page', '30'),
|
||||
(90, 'videos_item_channel_page', '25'),
|
||||
(91, 'users_items_subscriptions', '5'),
|
||||
(92, 'users_items_subscibers', '5'),
|
||||
(93, 'users_items_contacts_channel', '5'),
|
||||
(94, 'users_items_search_page', '12'),
|
||||
(95, 'users_items_group_page', '15'),
|
||||
(96, 'cbhash', 'PGRpdiBhbGlnbj0iY2VudGVyIj48IS0tIERvIG5vdCByZW1vdmUgdGhpcyBjb3B5cmlnaHQgbm90aWNlIC0tPg0KUG93ZXJlZCBieSA8YSBocmVmPSJodHRwOi8vY2xpcC1idWNrZXQuY29tLyI+Q2xpcEJ1Y2tldDwvYT4gJXMgfCA8YSBocmVmPSJodHRwOi8vY2xpcC1idWNrZXQuY29tL2Fyc2xhbi1oYXNzYW4iPkFyc2xhbiBIYXNzYW48L2E+DQo8IS0tIERvIG5vdCByZW1vdmUgdGhpcyBjb3B5cmlnaHQgbm90aWNlIC0tPjwvZGl2Pg=='),
|
||||
(97, 'min_video_title', '4'),
|
||||
(98, 'max_video_title', '80'),
|
||||
(99, 'min_video_desc', '5'),
|
||||
(100, 'max_video_desc', '300'),
|
||||
(101, 'video_categories', '4'),
|
||||
(102, 'min_video_tags', '3'),
|
||||
(103, 'max_video_tags', '30'),
|
||||
(104, 'video_codec', 'libx264'),
|
||||
(105, 'date_released', '01-05-2010'),
|
||||
(106, 'date_installed', '01-05-2010'),
|
||||
(107, 'date_updated', '2010-01-09 18:36:16'),
|
||||
(108, 'support_email', 'webmaster@localhost'),
|
||||
(109, 'website_email', 'webmaster@localhost'),
|
||||
(110, 'welcome_email', 'webmaster@localhost'),
|
||||
(112, 'anonymous_id', '99'),
|
||||
(113, 'date_format', 'Y-m-d'),
|
||||
(114, 'default_time_zone', '5'),
|
||||
(156, 'use_crons', 'no'),
|
||||
(115, 'autoplay_video', 'no'),
|
||||
(116, 'default_country_iso2', 'PK'),
|
||||
(117, 'channel_comments', '1'),
|
||||
(118, 'max_profile_pic_size', '2500'),
|
||||
(119, 'max_profile_pic_height', ''),
|
||||
(120, 'max_profile_pic_width', '230'),
|
||||
(121, 'gravatars', ''),
|
||||
(122, 'picture_url', 'yes'),
|
||||
(123, 'picture_upload', 'yes'),
|
||||
(124, 'background_url', 'yes'),
|
||||
(125, 'background_upload', 'yes'),
|
||||
(126, 'max_bg_size', '2500'),
|
||||
(127, 'max_bg_width', '1600'),
|
||||
(128, 'max_bg_height', ''),
|
||||
(129, 'background_color', 'yes'),
|
||||
(130, 'send_comment_notification', 'yes'),
|
||||
(131, 'approve_video_notification', 'yes'),
|
||||
(132, 'keep_mp4_as_is', 'yes'),
|
||||
(133, 'hq_output', 'yes'),
|
||||
(134, 'grp_categories', '3'),
|
||||
(136, 'grps_items_search_page', '25'),
|
||||
(137, 'grp_thumb_height', '140'),
|
||||
(138, 'grp_thumb_width', '140'),
|
||||
(139, 'grp_max_title', '20'),
|
||||
(140, 'grp_max_desc', '500'),
|
||||
(141, 'quick_conv', ''),
|
||||
(142, 'server_friendly_conversion', ''),
|
||||
(143, 'max_conversion', '2'),
|
||||
(144, 'max_time_wait', '7200'),
|
||||
(145, 'allow_unicode_usernames', 'yes'),
|
||||
(146, 'min_username', '3'),
|
||||
(147, 'max_username', '15'),
|
||||
(154, 'youtube_enabled', 'yes'),
|
||||
(148, 'allow_username_spaces', 'yes'),
|
||||
(149, 'use_playlist', 'yes'),
|
||||
(150, 'comments_captcha', 'guests'),
|
||||
(151, 'player_logo_file', 'logo.jpg'),
|
||||
(152, 'logo_placement', 'tl'),
|
||||
(153, 'buffer_time', '5'),
|
||||
(155, 'use_ffmpeg_vf', 'yes'),
|
||||
(224, 'own_photo_rating', ''),
|
||||
(157, 'mail_type', 'mail'),
|
||||
(158, 'smtp_host', ''),
|
||||
(159, 'smtp_user', ''),
|
||||
(160, 'smtp_pass', ''),
|
||||
(161, 'smtp_auth', 'no'),
|
||||
(162, 'smtp_port', ''),
|
||||
(163, 'use_subs', '1'),
|
||||
(164, 'pak_license', ''),
|
||||
(165, 'photo_ratio', '16:10'),
|
||||
(166, 'photo_thumb_width', '600'),
|
||||
(167, 'photo_thumb_height', '75'),
|
||||
(168, 'photo_med_width', '300'),
|
||||
(169, 'photo_med_height', '116'),
|
||||
(170, 'photo_lar_width', '600'),
|
||||
(171, 'photo_crop', '1'),
|
||||
(172, 'photo_multi_upload', '5'),
|
||||
(173, 'photo_download', '1'),
|
||||
(174, 'photo_comments', '1'),
|
||||
(175, 'photo_rating', '1'),
|
||||
(176, 'max_photo_size', '2'),
|
||||
(177, 'watermark_photo', '0'),
|
||||
(178, 'watermark_max_width', '120'),
|
||||
(179, 'watermark_placement', 'left:top'),
|
||||
(180, 'load_upload_form', 'yes'),
|
||||
(181, 'load_remote_upload_form', 'yes'),
|
||||
(182, 'load_embed_form', 'yes'),
|
||||
(183, 'load_link_video_form', 'yes'),
|
||||
(184, 'enable_groups', ''),
|
||||
(185, 'groupsSection', 'yes'),
|
||||
(186, 'videosSection', 'yes'),
|
||||
(187, 'photosSection', 'yes'),
|
||||
(188, 'homeSection', 'yes'),
|
||||
(189, 'signupSection', 'yes'),
|
||||
(190, 'uploadSection', 'yes'),
|
||||
(191, 'collectionsSection', 'yes'),
|
||||
(192, 'channelsSection', 'yes'),
|
||||
(193, 'flvtoolpp', ''),
|
||||
(194, 'normal_resolution', '480'),
|
||||
(195, 'high_resolution', '720'),
|
||||
(196, 'max_video_duration', '320'),
|
||||
(197, 'embed_player_height', '250'),
|
||||
(198, 'embed_player_width', '300'),
|
||||
(199, 'autoplay_embed', 'yes'),
|
||||
(200, 'playlistsSection', 'yes'),
|
||||
(201, 'photo_main_list', '10'),
|
||||
(202, 'photo_home_tabs', '30'),
|
||||
(203, 'photo_search_result', '30'),
|
||||
(204, 'photo_channel_page', '10'),
|
||||
(205, 'photo_user_photos', '20'),
|
||||
(206, 'photo_user_favorites', '20'),
|
||||
(207, 'photo_other_limit', '8'),
|
||||
(208, 'collection_per_page', '30'),
|
||||
(209, 'collection_home_page', '10'),
|
||||
(210, 'collection_search_result', '20'),
|
||||
(211, 'collection_channel_page', '10'),
|
||||
(212, 'collection_user_collections', '20'),
|
||||
(213, 'collection_user_favorites', '20'),
|
||||
(214, 'collection_items_page', '20'),
|
||||
(218, 'reCaptcha_private_key', '6LcQI8ESAAAAALc_oz1xuNsBVRNx554CaJHjcoXt'),
|
||||
(217, 'reCaptcha_public_key', '6LcQI8ESAAAAALN1vYQovst9c6nlU52iHdqWExp8'),
|
||||
(219, 'channel_rating', '1'),
|
||||
(220, 'own_channel_rating', '1'),
|
||||
(221, 'collection_rating', '1'),
|
||||
(222, 'own_collection_rating', '1'),
|
||||
(223, 'own_video_rating', '1'),
|
||||
(224, 'vbrate_hd', '500000'),
|
||||
(225, 'store_guest_session', 'no'),
|
||||
(226, 'delete_mass_upload', 'no'),
|
||||
(227, 'pseudostreaming', 'yes');
|
||||
(NULL, 'site_title', 'ClipBucket v2'),
|
||||
(NULL, 'site_slogan', 'A way to broadcast yourself'),
|
||||
(NULL, 'baseurl', ''),
|
||||
(NULL, 'basedir', ''),
|
||||
(NULL, 'template_dir', 'cb_28'),
|
||||
(NULL, 'player_file', 'cb_video_js.php'),
|
||||
(NULL, 'closed', '0'),
|
||||
(NULL, 'closed_msg', 'We Are Updating Our Website, Please Visit us after few hours.'),
|
||||
(NULL, 'description', 'Clip Bucket is an ultimate Video Sharing script'),
|
||||
(NULL, 'keywords', 'clip bucket video sharing website script'),
|
||||
(NULL, 'ffmpegpath', '/usr/local/bin/ffmpeg'),
|
||||
(NULL, 'flvtool2path', '/usr/local/bin/flvtool2'),
|
||||
(NULL, 'mp4boxpath', '/usr/local/bin/MP4Box'),
|
||||
(NULL, 'vbrate', '300000'),
|
||||
(NULL, 'srate', '22050'),
|
||||
(NULL, 'r_height', ''),
|
||||
(NULL, 'r_width', ''),
|
||||
(NULL, 'resize', ''),
|
||||
(NULL, 'mencoderpath', ''),
|
||||
(NULL, 'keep_original', '1'),
|
||||
(NULL, 'activation', ''),
|
||||
(NULL, 'mplayerpath', ''),
|
||||
(NULL, 'email_verification', '1'),
|
||||
(NULL, 'allow_registeration', '1'),
|
||||
(NULL, 'php_path', '/usr/bin/php'),
|
||||
(NULL, 'videos_list_per_page', '30'),
|
||||
(NULL, 'channels_list_per_page', '25'),
|
||||
(NULL, 'videos_list_per_tab', '1'),
|
||||
(NULL, 'channels_list_per_tab', '1'),
|
||||
(NULL, 'video_comments', '1'),
|
||||
(NULL, 'video_rating', '1'),
|
||||
(NULL, 'comment_rating', '1'),
|
||||
(NULL, 'video_download', '1'),
|
||||
(NULL, 'video_embed', '1'),
|
||||
(NULL, 'groups_list_per_page', '25'),
|
||||
(NULL, 'seo', 'no'),
|
||||
(NULL, 'admin_pages', '100'),
|
||||
(NULL, 'search_list_per_page', '25'),
|
||||
(NULL, 'recently_viewed_limit', '10'),
|
||||
(NULL, 'max_upload_size', '1000'),
|
||||
(NULL, 'sbrate', '128000'),
|
||||
(NULL, 'thumb_width', '120'),
|
||||
(NULL, 'thumb_height', '90'),
|
||||
(NULL, 'user_comment_opt1', ''),
|
||||
(NULL, 'ffmpeg_type', ''),
|
||||
(NULL, 'user_comment_opt2', ''),
|
||||
(NULL, 'user_comment_opt3', ''),
|
||||
(NULL, 'user_comment_opt4', ''),
|
||||
(NULL, 'user_rate_opt1', ''),
|
||||
(NULL, 'captcha_type', '0'),
|
||||
(NULL, 'allow_upload', ''),
|
||||
(NULL, 'allowed_types', 'wmv,avi,divx,3gp,mov,mpeg,mpg,xvid,flv,asf,rm,dat,mp4,png,jpg'),
|
||||
(NULL, 'version', '2.0.1'),
|
||||
(NULL, 'version_type', 'Alpha'),
|
||||
(NULL, 'allow_template_change', '1'),
|
||||
(NULL, 'allow_language_change', '1'),
|
||||
(NULL, 'default_site_lang', ''),
|
||||
(NULL, 'video_require_login', ''),
|
||||
(NULL, 'audio_codec', 'libfdk_aac'),
|
||||
(NULL, 'con_modules_type', ''),
|
||||
(NULL, 'remoteUpload', ''),
|
||||
(NULL, 'embedUpload', ''),
|
||||
(NULL, 'player_div_id', ''),
|
||||
(NULL, 'code_dev', '(Powered by ClipBucket)'),
|
||||
(NULL, 'sys_os', ''),
|
||||
(NULL, 'debug_level', ''),
|
||||
(NULL, 'enable_troubleshooter', '1'),
|
||||
(NULL, 'vrate', '25'),
|
||||
(NULL, 'num_thumbs', '5'),
|
||||
(NULL, 'big_thumb_width', '320'),
|
||||
(NULL, 'big_thumb_height', '240'),
|
||||
(NULL, 'user_max_chr', '15'),
|
||||
(NULL, 'disallowed_usernames', 'shit, asshole, fucker'),
|
||||
(NULL, 'min_age_reg', '0'),
|
||||
(NULL, 'max_comment_chr', '800'),
|
||||
(NULL, 'user_comment_own', ''),
|
||||
(NULL, 'anonym_comments', 'yes'),
|
||||
(NULL, 'player_dir', 'CB_video_js'),
|
||||
(NULL, 'player_width', '661'),
|
||||
(NULL, 'player_height', '360'),
|
||||
(NULL, 'default_country_iso2', 'PK'),
|
||||
(NULL, 'channel_player_width', '600'),
|
||||
(NULL, 'channel_player_height', '281'),
|
||||
(NULL, 'videos_items_grp_page', '24'),
|
||||
(NULL, 'videos_items_hme_page', '25'),
|
||||
(NULL, 'videos_items_columns', '12'),
|
||||
(NULL, 'videos_items_ufav_page', '25'),
|
||||
(NULL, 'videos_items_uvid_page', '25'),
|
||||
(NULL, 'videos_items_search_page', '30'),
|
||||
(NULL, 'videos_item_channel_page', '25'),
|
||||
(NULL, 'users_items_subscriptions', '5'),
|
||||
(NULL, 'users_items_subscibers', '5'),
|
||||
(NULL, 'users_items_contacts_channel', '5'),
|
||||
(NULL, 'users_items_search_page', '12'),
|
||||
(NULL, 'users_items_group_page', '15'),
|
||||
(NULL, 'cbhash', 'PGRpdiBhbGlnbj0iY2VudGVyIj48IS0tIERvIG5vdCByZW1vdmUgdGhpcyBjb3B5cmlnaHQgbm90aWNlIC0tPg0KUG93ZXJlZCBieSA8YSBocmVmPSJodHRwOi8vY2xpcC1idWNrZXQuY29tLyI+Q2xpcEJ1Y2tldDwvYT4gJXMgfCA8YSBocmVmPSJodHRwOi8vY2xpcC1idWNrZXQuY29tL2Fyc2xhbi1oYXNzYW4iPkFyc2xhbiBIYXNzYW48L2E+DQo8IS0tIERvIG5vdCByZW1vdmUgdGhpcyBjb3B5cmlnaHQgbm90aWNlIC0tPjwvZGl2Pg=='),
|
||||
(NULL, 'min_video_title', '4'),
|
||||
(NULL, 'max_video_title', '80'),
|
||||
(NULL, 'min_video_desc', '5'),
|
||||
(NULL, 'max_video_desc', '300'),
|
||||
(NULL, 'video_categories', '4'),
|
||||
(NULL, 'min_video_tags', '3'),
|
||||
(NULL, 'max_video_tags', '30'),
|
||||
(NULL, 'video_codec', 'libx264'),
|
||||
(NULL, 'date_released', '01-05-2010'),
|
||||
(NULL, 'date_installed', '01-05-2010'),
|
||||
(NULL, 'date_updated', '2010-01-09 18:36:16'),
|
||||
(NULL, 'support_email', 'webmaster@localhost'),
|
||||
(NULL, 'website_email', 'webmaster@localhost'),
|
||||
(NULL, 'welcome_email', 'webmaster@localhost'),
|
||||
(NULL, 'anonymous_id', '99'),
|
||||
(NULL, 'date_format', 'Y-m-d'),
|
||||
(NULL, 'default_time_zone', '5'),
|
||||
(NULL, 'autoplay_video', 'no'),
|
||||
(NULL, 'default_country_iso2', 'PK'),
|
||||
(NULL, 'channel_comments', '1'),
|
||||
(NULL, 'max_profile_pic_size', '2500'),
|
||||
(NULL, 'max_profile_pic_height', ''),
|
||||
(NULL, 'max_profile_pic_width', '230'),
|
||||
(NULL, 'gravatars', ''),
|
||||
(NULL, 'picture_url', 'yes'),
|
||||
(NULL, 'picture_upload', 'yes'),
|
||||
(NULL, 'background_url', 'yes'),
|
||||
(NULL, 'background_upload', 'yes'),
|
||||
(NULL, 'max_bg_size', '2500'),
|
||||
(NULL, 'max_bg_width', '1600'),
|
||||
(NULL, 'max_bg_height', ''),
|
||||
(NULL, 'background_color', 'yes'),
|
||||
(NULL, 'send_comment_notification', 'yes'),
|
||||
(NULL, 'approve_video_notification', 'yes'),
|
||||
(NULL, 'keep_mp4_as_is', 'yes'),
|
||||
(NULL, 'hq_output', 'yes'),
|
||||
(NULL, 'grp_categories', '3'),
|
||||
(NULL, 'grps_items_search_page', '25'),
|
||||
(NULL, 'grp_thumb_height', '140'),
|
||||
(NULL, 'grp_thumb_width', '140'),
|
||||
(NULL, 'grp_max_title', '20'),
|
||||
(NULL, 'grp_max_desc', '500'),
|
||||
(NULL, 'quick_conv', ''),
|
||||
(NULL, 'server_friendly_conversion', ''),
|
||||
(NULL, 'max_conversion', '2'),
|
||||
(NULL, 'max_time_wait', '7200'),
|
||||
(NULL, 'allow_unicode_usernames', 'yes'),
|
||||
(NULL, 'min_username', '3'),
|
||||
(NULL, 'max_username', '15'),
|
||||
(NULL, 'youtube_enabled', 'yes'),
|
||||
(NULL, 'allow_username_spaces', 'yes'),
|
||||
(NULL, 'use_playlist', 'yes'),
|
||||
(NULL, 'comments_captcha', 'guests'),
|
||||
(NULL, 'player_logo_file', 'logo.jpg'),
|
||||
(NULL, 'logo_placement', 'tl'),
|
||||
(NULL, 'buffer_time', '5'),
|
||||
(NULL, 'use_ffmpeg_vf', 'yes'),
|
||||
(NULL, 'own_photo_rating', ''),
|
||||
(NULL, 'mail_type', 'mail'),
|
||||
(NULL, 'smtp_host', ''),
|
||||
(NULL, 'smtp_user', ''),
|
||||
(NULL, 'smtp_pass', ''),
|
||||
(NULL, 'smtp_auth', 'no'),
|
||||
(NULL, 'smtp_port', ''),
|
||||
(NULL, 'use_subs', '1'),
|
||||
(NULL, 'pak_license', ''),
|
||||
(NULL, 'photo_ratio', '16:10'),
|
||||
(NULL, 'photo_thumb_width', '600'),
|
||||
(NULL, 'photo_thumb_height', '75'),
|
||||
(NULL, 'photo_med_width', '300'),
|
||||
(NULL, 'photo_med_height', '116'),
|
||||
(NULL, 'photo_lar_width', '600'),
|
||||
(NULL, 'photo_crop', '1'),
|
||||
(NULL, 'photo_multi_upload', '5'),
|
||||
(NULL, 'photo_download', '1'),
|
||||
(NULL, 'photo_comments', '1'),
|
||||
(NULL, 'photo_rating', '1'),
|
||||
(NULL, 'max_photo_size', '2'),
|
||||
(NULL, 'watermark_photo', '0'),
|
||||
(NULL, 'watermark_max_width', '120'),
|
||||
(NULL, 'watermark_placement', 'left:top'),
|
||||
(NULL, 'load_upload_form', 'yes'),
|
||||
(NULL, 'load_remote_upload_form', 'yes'),
|
||||
(NULL, 'load_embed_form', 'yes'),
|
||||
(NULL, 'load_link_video_form', 'yes'),
|
||||
(NULL, 'enable_groups', ''),
|
||||
(NULL, 'groupsSection', 'yes'),
|
||||
(NULL, 'videosSection', 'yes'),
|
||||
(NULL, 'photosSection', 'yes'),
|
||||
(NULL, 'homeSection', 'yes'),
|
||||
(NULL, 'signupSection', 'yes'),
|
||||
(NULL, 'uploadSection', 'yes'),
|
||||
(NULL, 'collectionsSection', 'yes'),
|
||||
(NULL, 'channelsSection', 'yes'),
|
||||
(NULL, 'flvtoolpp', ''),
|
||||
(NULL, 'normal_resolution', '480'),
|
||||
(NULL, 'high_resolution', '720'),
|
||||
(NULL, 'max_video_duration', '320'),
|
||||
(NULL, 'embed_player_height', '250'),
|
||||
(NULL, 'embed_player_width', '300'),
|
||||
(NULL, 'autoplay_embed', 'yes'),
|
||||
(NULL, 'playlistsSection', 'yes'),
|
||||
(NULL, 'photo_main_list', '10'),
|
||||
(NULL, 'photo_home_tabs', '30'),
|
||||
(NULL, 'photo_search_result', '30'),
|
||||
(NULL, 'photo_channel_page', '10'),
|
||||
(NULL, 'photo_user_photos', '20'),
|
||||
(NULL, 'photo_user_favorites', '20'),
|
||||
(NULL, 'photo_other_limit', '8'),
|
||||
(NULL, 'collection_per_page', '30'),
|
||||
(NULL, 'collection_home_page', '10'),
|
||||
(NULL, 'collection_search_result', '20'),
|
||||
(NULL, 'collection_channel_page', '10'),
|
||||
(NULL, 'collection_user_collections', '20'),
|
||||
(NULL, 'collection_user_favorites', '20'),
|
||||
(NULL, 'collection_items_page', '20'),
|
||||
(NULL, 'reCaptcha_private_key', '6LcQI8ESAAAAALc_oz1xuNsBVRNx554CaJHjcoXt'),
|
||||
(NULL, 'reCaptcha_public_key', '6LcQI8ESAAAAALN1vYQovst9c6nlU52iHdqWExp8'),
|
||||
(NULL, 'channel_rating', '1'),
|
||||
(NULL, 'own_channel_rating', '1'),
|
||||
(NULL, 'collection_rating', '1'),
|
||||
(NULL, 'own_collection_rating', '1'),
|
||||
(NULL, 'own_video_rating', '1'),
|
||||
(NULL, 'vbrate_hd', '500000'),
|
||||
(NULL, 'store_guest_session', 'no'),
|
||||
(NULL, 'delete_mass_upload', 'no'),
|
||||
(NULL, 'use_crons', 'no'),
|
||||
(NULL, 'pseudostreaming', 'yes');
|
||||
|
||||
|
||||
|
||||
|
@ -287,5 +287,29 @@ INSERT INTO `{tbl_prefix}config`(`name`, `value`) VALUES ('popup_video','yes');
|
|||
-- Addition for 2.8.3
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES (NULL, 'video_round_views', 'yes');
|
||||
|
||||
-- Addition for 4.0
|
||||
-- Addition for Cooporate cb seting bitrates for dash/hls
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'vbrate_240', '192000'),
|
||||
('', 'vbrate_360', '272000'),
|
||||
('', 'vbrate_480', '352000'),
|
||||
('', 'vbrate_720', '432000'),
|
||||
('', 'vbrate_1080', '512000');
|
||||
|
||||
-- Addition for Cooporate cb use video watermark or not
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'use_watermark', 'no');
|
||||
|
||||
-- Addition for Cooporate cb stream via hls or dash
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'stream_via', 'hls');
|
||||
|
||||
-- Addition for Cooporate cb access to logged in users
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'access_to_logged_in', 'no');
|
||||
|
||||
-- Addition for clipbucket license --
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'cb_license', 'CBCORP-XXXXXXXXXXX');
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'cb_license_local', '');
|
||||
|
||||
-- Addition for Cooporate cb allowing collection and playlist page
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'playlistsSection', 'yes');
|
||||
|
||||
-- Addition for Cooporate pick default sign up country geologically
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'pick_geo_country', 'yes');
|
|
@ -14,6 +14,7 @@ INSERT INTO `{tbl_prefix}email_templates` (`email_template_id`, `email_template_
|
|||
(12, 'Contact Form', 'contact_form', '[{website_title} - Contact] {reason} from {name}', 'Name : {name}\r\nEmail : {email}\r\nReason : {reason}\r\n\r\nMessage:\r\n{message}\r\n\r\n===============\r\nIp : {ip_address}\r\ndate : {now}', ''),
|
||||
(13, 'Video Acitvation Email', 'video_activation_email', '[{website_title}] - Your video has been activated', 'Hello {username},\r\nYour video has been reviewed and activated by one of our staff, thanks for uploading this video. You can view this video here.\r\n{video_link}\r\n\r\nThanks\r\n{website_title} Team', ''),
|
||||
(14, 'User Comment Email', 'user_comment_email', '[{website_title}] {username} made comment on your {obj}', '{username} has commented on your {obj}\r\n"{comment}"\r\n\r\n<a href="{obj_link}">{obj_link}</a>\r\n\r\n{website_title} team', ''),
|
||||
(15, 'Photo Share Template', 'photo_share_template', '{username} wants to share photo with you', '<html>\r\n<head>\r\n<style type="text/css">\r\n<!--\r\n.title {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #FFFFFF;\r\n font-size: 16px;\r\n}\r\n.title2 {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 14px;\r\n}\r\n.messege {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 12px;\r\n}\r\n#videoThumb{\r\n float:left;\r\n padding: 2px;\r\n margin: 3px;\r\n border: 1px solid #F0F0F0;\r\n text-align: center;\r\n vertical-align: middle;\r\n}\r\n#videoThumb img{border:0px}\r\nbody,td,th {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #FFFFFF;\r\n}\r\n.text {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #000000;\r\n padding: 5px;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellspacing="0" cellpadding="5">\r\n <tr>\r\n <td bgcolor="#0099cc" ><span class="title">{website_title}</span></td>\r\n </tr>\r\n\r\n <tr>\r\n <td height="20" class="messege">{username} wants to share this photo with you<br>\r\n <div id="videoThumb"><a class="text" title="{photo_title}" href="{photo_link}"><img src="{photo_thumb}"><br>\r\n View Photo</a></div></td>\r\n </tr>\r\n <tr>\r\n <td class="text" ><span class="title2">Photo Description</span><br>\r\n <span class="text">{photo_description}</span></td>\r\n </tr>\r\n <tr>\r\n <td><span class="title2">Personal Message</span><br>\r\n <span class="text">{user_message}\r\n </span><br>\r\n <br>\r\n<span class="text">Thanks,</span><br> \r\n<span class="text">{website_title}</span></td>\r\n </tr>\r\n <tr>\r\n <td bgcolor="#0099cc">copyrights {date_year} {website_title}</td>\r\n </tr>\r\n</table>\r\n</body>\r\n</html>', ''),
|
||||
(16, 'Video Subscription Email', 'video_subscription_email', '{uploader} has uploaded new video on {website_title}', 'Hello {username}\r\n\r\nYou have been notified by {website_title} that {uploader} has uploaded new video \r\n\r\nVideo Title : {video_title}\r\nVideo Description : {video_description}\r\n\r\n\r\n<a href="{video_link}">\r\n<img src="{video_thumb}" border="0" height="90" width="120"><br>\r\nclick here to watch this video</a>\r\n\r\n\r\nYou are notified because you are subscribed to {uploader}, you can manage your subscriptions by going to your account and click on manage subscriptions.\r\n{website_title}', ''),
|
||||
(17, 'Collection Share Template', 'collection_share_template', '{username} wants to share collection with you', '<html>\r\n<head>\r\n<style type="text/css">\r\n<!--\r\n.title {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #FFFFFF;\r\n font-size: 16px;\r\n}\r\n.title2 {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 14px;\r\n}\r\n.messege {\r\n font-family:Tahoma, Geneva, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 11px;\r\n}\r\n#videoThumb{\r\n float:left;\r\n padding: 2px;\r\n margin: 3px;\r\n border: 1px solid #F0F0F0;\r\n text-align: center;\r\n vertical-align: middle;\r\n}\r\n#videoThumb img{border:0px}\r\nbody,td,th {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #FFFFFF;\r\n}\r\n.text, .text2 {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #000000;\r\n padding: 5px;\r\n}\r\n\r\n.text2 {\r\n font-size: 10px;\r\n padding: 0px;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellspacing="0" cellpadding="5">\r\n <tr>\r\n <td bgcolor="#0099cc" ><span class="title">{website_title}</span></td>\r\n </tr>\r\n\r\n <tr>\r\n <td height="20" class="messege">{username} wants to share this collection with you.<br>\r\n <div id="videoThumb"><a class="text" title="{name}" href="{collection_link}"><img src="{collection_thumb}"><br>\r\n View Collection <small class=''text2''>({total_items} {type})</small></a></div></td>\r\n </tr>\r\n <tr>\r\n <td class="text" ><span class="title2">Collection Description</span><br>\r\n <span class="text">{description}</span></td>\r\n </tr>\r\n <tr>\r\n <td><span class="title2">Personal Message</span><br>\r\n <span class="text">{user_message}\r\n </span><br>\r\n <br>\r\n<span class="text">Thanks,</span><br> \r\n<span class="text">{website_title}</span></td>\r\n </tr>\r\n <tr>\r\n <td bgcolor="#0099cc">copyrights {date_year} {website_title}</td>\r\n </tr>\r\n</table>\r\n</body>\r\n</html>', '');
|
||||
(15, 'User Reply Email', 'user_reply_email', '[{website_title}] {username} made reply on your comment', '{username} has replied on your comment\r\n"{comment}"\r\n\r\n<a href="{obj_link}">{obj_link}</a>\r\n\r\n{website_title} team', ''),
|
||||
(16, 'Photo Share Template', 'photo_share_template', '{username} wants to share photo with you', '<html>\r\n<head>\r\n<style type="text/css">\r\n<!--\r\n.title {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #FFFFFF;\r\n font-size: 16px;\r\n}\r\n.title2 {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 14px;\r\n}\r\n.messege {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 12px;\r\n}\r\n#videoThumb{\r\n float:left;\r\n padding: 2px;\r\n margin: 3px;\r\n border: 1px solid #F0F0F0;\r\n text-align: center;\r\n vertical-align: middle;\r\n}\r\n#videoThumb img{border:0px}\r\nbody,td,th {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #FFFFFF;\r\n}\r\n.text {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #000000;\r\n padding: 5px;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellspacing="0" cellpadding="5">\r\n <tr>\r\n <td bgcolor="#0099cc" ><span class="title">{website_title}</span></td>\r\n </tr>\r\n\r\n <tr>\r\n <td height="20" class="messege">{username} wants to share this photo with you<br>\r\n <div id="videoThumb"><a class="text" title="{photo_title}" href="{photo_link}"><img src="{photo_thumb}"><br>\r\n View Photo</a></div></td>\r\n </tr>\r\n <tr>\r\n <td class="text" ><span class="title2">Photo Description</span><br>\r\n <span class="text">{photo_description}</span></td>\r\n </tr>\r\n <tr>\r\n <td><span class="title2">Personal Message</span><br>\r\n <span class="text">{user_message}\r\n </span><br>\r\n <br>\r\n<span class="text">Thanks,</span><br> \r\n<span class="text">{website_title}</span></td>\r\n </tr>\r\n <tr>\r\n <td bgcolor="#0099cc">copyrights {date_year} {website_title}</td>\r\n </tr>\r\n</table>\r\n</body>\r\n</html>', ''),
|
||||
(17, 'Video Subscription Email', 'video_subscription_email', '{uploader} has uploaded new video on {website_title}', 'Hello {username}\r\n\r\nYou have been notified by {website_title} that {uploader} has uploaded new video \r\n\r\nVideo Title : {video_title}\r\nVideo Description : {video_description}\r\n\r\n\r\n<a href="{video_link}">\r\n<img src="{video_thumb}" border="0" height="90" width="120"><br>\r\nclick here to watch this video</a>\r\n\r\n\r\nYou are notified because you are subscribed to {uploader}, you can manage your subscriptions by going to your account and click on manage subscriptions.\r\n{website_title}', ''),
|
||||
(18, 'Collection Share Template', 'collection_share_template', '{username} wants to share collection with you', '<html>\r\n<head>\r\n<style type="text/css">\r\n<!--\r\n.title {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #FFFFFF;\r\n font-size: 16px;\r\n}\r\n.title2 {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 14px;\r\n}\r\n.messege {\r\n font-family:Tahoma, Geneva, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 11px;\r\n}\r\n#videoThumb{\r\n float:left;\r\n padding: 2px;\r\n margin: 3px;\r\n border: 1px solid #F0F0F0;\r\n text-align: center;\r\n vertical-align: middle;\r\n}\r\n#videoThumb img{border:0px}\r\nbody,td,th {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #FFFFFF;\r\n}\r\n.text, .text2 {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #000000;\r\n padding: 5px;\r\n}\r\n\r\n.text2 {\r\n font-size: 10px;\r\n padding: 0px;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellspacing="0" cellpadding="5">\r\n <tr>\r\n <td bgcolor="#0099cc" ><span class="title">{website_title}</span></td>\r\n </tr>\r\n\r\n <tr>\r\n <td height="20" class="messege">{username} wants to share this collection with you.<br>\r\n <div id="videoThumb"><a class="text" title="{name}" href="{collection_link}"><img src="{collection_thumb}"><br>\r\n View Collection <small class=''text2''>({total_items} {type})</small></a></div></td>\r\n </tr>\r\n <tr>\r\n <td class="text" ><span class="title2">Collection Description</span><br>\r\n <span class="text">{description}</span></td>\r\n </tr>\r\n <tr>\r\n <td><span class="title2">Personal Message</span><br>\r\n <span class="text">{user_message}\r\n </span><br>\r\n <br>\r\n<span class="text">Thanks,</span><br> \r\n<span class="text">{website_title}</span></td>\r\n </tr>\r\n <tr>\r\n <td bgcolor="#0099cc">copyrights {date_year} {website_title}</td>\r\n </tr>\r\n</table>\r\n</body>\r\n</html>', '');
|
||||
|
|
|
@ -19,7 +19,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}action_log` (
|
|||
`action_obj_id` int(255) NOT NULL,
|
||||
`action_done_id` int(255) NOT NULL,
|
||||
PRIMARY KEY (`action_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2687 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2687 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -33,7 +33,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}admin_notes` (
|
|||
`date_added` datetime NOT NULL,
|
||||
`userid` int(225) NOT NULL,
|
||||
PRIMARY KEY (`note_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=84 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=84 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -52,7 +52,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}ads_data` (
|
|||
`last_viewed` datetime NOT NULL,
|
||||
`date_added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
PRIMARY KEY (`ad_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=14 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=14 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -66,7 +66,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}ads_placements` (
|
|||
`placement_name` varchar(50) NOT NULL,
|
||||
`disable` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`placement_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -97,7 +97,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}collections` (
|
|||
`public_upload` varchar(4) NOT NULL,
|
||||
`type` varchar(10) NOT NULL,
|
||||
PRIMARY KEY (`collection_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -115,7 +115,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}collection_categories` (
|
|||
`category_thumb` mediumint(9) NOT NULL,
|
||||
`isdefault` enum('yes','no') NOT NULL,
|
||||
PRIMARY KEY (`category_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -131,7 +131,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}collection_items` (
|
|||
`type` varchar(10) NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`ci_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=30 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=30 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -156,7 +156,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}comments` (
|
|||
`date_added` datetime NOT NULL,
|
||||
`comment_ip` text NOT NULL,
|
||||
PRIMARY KEY (`comment_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=535 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=535 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -169,7 +169,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}config` (
|
|||
`name` varchar(100) NOT NULL DEFAULT '',
|
||||
`value` mediumtext NOT NULL,
|
||||
PRIMARY KEY (`configid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=225 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=225 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -186,7 +186,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}contacts` (
|
|||
`request_type` enum('in','out') NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`contact_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -204,7 +204,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}conversion_queue` (
|
|||
`time_started` varchar(32) NOT NULL DEFAULT 0,
|
||||
`time_completed` varchar(32) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`cqueue_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=262 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=262 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -219,8 +219,9 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}countries` (
|
|||
`name_en` varchar(80) CHARACTER SET utf8 NOT NULL,
|
||||
`iso3` char(3) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`numcode` smallint(6) DEFAULT NULL,
|
||||
`is_blocked` int(10) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`country_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=240 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=240 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -234,7 +235,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}editors_picks` (
|
|||
`sort` bigint(5) NOT NULL DEFAULT '1',
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`pick_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -251,7 +252,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}email_templates` (
|
|||
`email_template_allowed_tags` mediumtext CHARACTER SET utf8 NOT NULL,
|
||||
PRIMARY KEY (`email_template_id`),
|
||||
UNIQUE KEY `email_template_code` (`email_template_code`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=16 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=16 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -266,7 +267,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}favorites` (
|
|||
`userid` int(225) NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`favorite_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=36 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=36 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -282,7 +283,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}flags` (
|
|||
`flag_type` bigint(25) NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`flag_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -309,7 +310,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}groups` (
|
|||
`total_members` int(225) NOT NULL,
|
||||
`total_topics` int(225) NOT NULL,
|
||||
PRIMARY KEY (`group_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -326,7 +327,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}group_categories` (
|
|||
`category_thumb` mediumtext NOT NULL,
|
||||
`isdefault` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`category_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -341,7 +342,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}group_invitations` (
|
|||
`invited` int(225) NOT NULL,
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`invitation_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -356,7 +357,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}group_members` (
|
|||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`active` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
PRIMARY KEY (`group_mid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -371,7 +372,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}group_posts` (
|
|||
`post_content` text NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`post_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -393,7 +394,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}group_topics` (
|
|||
`topic_icon` varchar(225) NOT NULL,
|
||||
`approved` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
PRIMARY KEY (`topic_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=14 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=14 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -409,7 +410,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}group_videos` (
|
|||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`approved` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`group_video_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -425,7 +426,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}languages` (
|
|||
`language_active` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
`language_default` enum('yes','no') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`language_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -446,7 +447,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}messages` (
|
|||
`reply_to` int(225) NOT NULL DEFAULT '0',
|
||||
`message_box` enum('in','out') NOT NULL DEFAULT 'in',
|
||||
PRIMARY KEY (`message_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=53 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=53 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -461,7 +462,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}modules` (
|
|||
`active` varchar(5) NOT NULL,
|
||||
`module_include_file` text NOT NULL,
|
||||
PRIMARY KEY (`module_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -479,7 +480,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}pages` (
|
|||
`delete_able` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`page_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -519,7 +520,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}photos` (
|
|||
`server_url` text NOT NULL,
|
||||
`owner_ip` varchar(20) NOT NULL,
|
||||
PRIMARY KEY (`photo_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -533,7 +534,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}phrases` (
|
|||
`varname` varchar(250) NOT NULL DEFAULT '',
|
||||
`text` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9392 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9392 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -548,7 +549,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}playlists` (
|
|||
`playlist_type` varchar(10) CHARACTER SET utf8 NOT NULL,
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`playlist_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -564,7 +565,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}playlist_items` (
|
|||
`userid` int(255) NOT NULL,
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`playlist_item_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -582,7 +583,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}plugins` (
|
|||
`plugin_license_code` text NOT NULL,
|
||||
`plugin_active` enum('yes','no') NOT NULL,
|
||||
PRIMARY KEY (`plugin_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=78 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=78 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -599,14 +600,14 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}plugin_config` (
|
|||
`player_admin_file` text CHARACTER SET utf8 NOT NULL,
|
||||
`player_include_file` text CHARACTER SET utf8 NOT NULL,
|
||||
PRIMARY KEY (`plugin_config_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `sessions`
|
||||
--
|
||||
CREATE TABLE `{tbl_prefix}sessions` (
|
||||
CREATE TABLE IF NOT EXISTS `{tbl_prefix}sessions` (
|
||||
`session_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`session` varchar(100) NOT NULL,
|
||||
`session_user` int(11) NOT NULL,
|
||||
|
@ -619,7 +620,7 @@ CREATE TABLE `{tbl_prefix}sessions` (
|
|||
`agent` text NOT NULL,
|
||||
`last_active` datetime NOT NULL,
|
||||
PRIMARY KEY (`session_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -634,7 +635,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}stats` (
|
|||
`user_stats` text NOT NULL,
|
||||
`group_stats` text NOT NULL,
|
||||
PRIMARY KEY (`stat_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -648,7 +649,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}subscriptions` (
|
|||
`subscribed_to` mediumtext NOT NULL,
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`subscription_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=29 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=29 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -661,7 +662,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}template` (
|
|||
`template_name` varchar(25) NOT NULL,
|
||||
`template_dir` varchar(30) NOT NULL,
|
||||
PRIMARY KEY (`template_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -722,7 +723,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}users` (
|
|||
KEY `ind_status_doj` (`doj`),
|
||||
KEY `ind_status_id` (`userid`),
|
||||
KEY `ind_hits_doj` (`profile_hits`,`doj`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2;
|
||||
ALTER TABLE `{tbl_prefix}users` ADD `album_privacy` ENUM( 'public', 'private', 'friends' ) NOT NULL DEFAULT 'private' ;
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -739,7 +740,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}user_categories` (
|
|||
`category_thumb` mediumtext NOT NULL,
|
||||
`isdefault` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`category_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -753,7 +754,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}user_levels` (
|
|||
`user_level_name` varchar(100) CHARACTER SET utf8 NOT NULL,
|
||||
`user_level_is_default` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`user_level_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -786,7 +787,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}user_levels_permissions` (
|
|||
`download_video` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
`admin_del_access` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`user_level_permission_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -803,7 +804,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}user_permissions` (
|
|||
`permission_default` enum('yes','no') CHARACTER SET utf8 NOT NULL DEFAULT 'yes',
|
||||
PRIMARY KEY (`permission_id`),
|
||||
UNIQUE KEY `permission_code` (`permission_code`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=34 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=34 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -816,7 +817,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}user_permission_types` (
|
|||
`user_permission_type_name` varchar(225) CHARACTER SET utf8 NOT NULL,
|
||||
`user_permission_type_desc` mediumtext CHARACTER SET utf8 NOT NULL,
|
||||
PRIMARY KEY (`user_permission_type_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -871,9 +872,8 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}user_profile` (
|
|||
`show_my_subscribers` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
`show_my_friends` enum('yes','no') NOT NULL DEFAULT 'yes',
|
||||
PRIMARY KEY (`user_profile_id`),
|
||||
KEY `ind_status_id` (`userid`),
|
||||
FULLTEXT KEY `profile_tags` (`profile_tags`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
KEY `ind_status_id` (`userid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -887,7 +887,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}validation_re` (
|
|||
`re_code` varchar(60) NOT NULL,
|
||||
`re_syntax` text NOT NULL,
|
||||
PRIMARY KEY (`re_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -955,9 +955,8 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}video` (
|
|||
`has_hd` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
`video_version` varchar(30) NOT NULL DEFAULT '2.6',
|
||||
`extras` varchar(225) NOT NULL,
|
||||
PRIMARY KEY (`videoid`),
|
||||
FULLTEXT KEY `description` (`description`,`title`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=960 ;
|
||||
PRIMARY KEY (`videoid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=960 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -975,7 +974,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}video_categories` (
|
|||
`category_thumb` mediumtext NOT NULL,
|
||||
`isdefault` enum('yes','no') NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`category_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -989,7 +988,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}video_favourites` (
|
|||
`userid` int(11) NOT NULL,
|
||||
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`fav_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -1039,9 +1038,8 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}video_files` (
|
|||
`output_audio_channels` char(16) CHARACTER SET utf8 NOT NULL,
|
||||
`hd` enum('yes','no') CHARACTER SET utf8 NOT NULL DEFAULT 'no',
|
||||
`hq` enum('yes','no') CHARACTER SET utf8 NOT NULL DEFAULT 'no',
|
||||
PRIMARY KEY (`id`),
|
||||
FULLTEXT KEY `src_bitrate` (`src_bitrate`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
|
||||
-- Alterations
|
||||
|
@ -1050,8 +1048,8 @@ ALTER TABLE `{tbl_prefix}video` ADD `video_password` VARCHAR( 255 ) NOT NULL AFT
|
|||
ALTER TABLE `{tbl_prefix}video` ADD `video_users` TEXT NOT NULL AFTER `video_password`;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `category_parents` TEXT NOT NULL AFTER `category` ;
|
||||
|
||||
ALTER TABLE `{tbl_prefix}_video` ADD `subscription_email` ENUM( "pending", "sent" ) NOT NULL DEFAULT 'pending' AFTER `last_commented` ;
|
||||
ALTER TABLE `{tbl_prefix}_groups` ADD `group_admins` TEXT NOT NULL AFTER `userid` ;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `subscription_email` ENUM( "pending", "sent" ) NOT NULL DEFAULT 'pending' AFTER `last_commented` ;
|
||||
|
||||
|
||||
-- Alterations for 2.4.5
|
||||
|
||||
|
@ -1075,14 +1073,14 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}counters` (
|
|||
`date_added` varchar(200) NOT NULL,
|
||||
PRIMARY KEY (`counter_id`),
|
||||
UNIQUE KEY `query_md5` (`query_md5`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
|
||||
ALTER TABLE `{tbl_prefix}user_levels_permissions` ADD `photos_moderation` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no',
|
||||
ADD `collection_moderation` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `photos_moderation` ,
|
||||
ADD `plugins_moderation` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `collection_moderation` ,
|
||||
ADD `tool_box` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `plugins_moderation` ,
|
||||
ADD `plugins_perms` varchar(20) NOT NULL DEFAULT 'none' AFTER `tool_box` ;
|
||||
ADD `plugins_perms` text NOT NULL AFTER `tool_box` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `{tbl_prefix}mass_emails` (
|
||||
`id` int(255) NOT NULL AUTO_INCREMENT,
|
||||
|
@ -1099,12 +1097,12 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}mass_emails` (
|
|||
`date_added` datetime NOT NULL,
|
||||
`last_update` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
|
||||
-- naveed
|
||||
-- added photo_details
|
||||
ALTER TABLE `photos` ADD `{tbl_prefix}photo_details` TEXT NOT NULL AFTER `photo_id`;
|
||||
ALTER TABLE `{tbl_prefix}photos` ADD `{tbl_prefix}photo_details` TEXT NOT NULL AFTER `photo_id`;
|
||||
|
||||
-- 2.7
|
||||
-- Added Collection contributors
|
||||
|
@ -1137,16 +1135,6 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}video_views` (
|
|||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
-- Adding File Directory for Photos and videos
|
||||
ALTER TABLE `{tbl_prefix}photos` ADD `file_directory` VARCHAR( 25 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `filename`;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `file_directory` VARCHAR( 25 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `file_name`;
|
||||
|
||||
|
||||
--
|
||||
-- cb_video video table change
|
||||
--
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `video_version` varchar(30) NOT NULL DEFAULT "2.6";
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `extras` varchar(225) NOT NULL;
|
||||
|
||||
|
||||
-- Updating playlist tables
|
||||
|
@ -1168,6 +1156,8 @@ ALTER TABLE `{tbl_prefix}playlists` ADD `first_item` text CHARACTER SET utf8 N
|
|||
ALTER TABLE `{tbl_prefix}playlists` ADD `cover` text CHARACTER SET utf8 NOT NULL AFTER `first_item`;
|
||||
|
||||
ALTER TABLE `{tbl_prefix}users` ADD `likes` INT( 11 ) NOT NULL DEFAULT '0';
|
||||
-- Alterations for 4.0
|
||||
ALTER TABLE `{tbl_prefix}users` ADD `is_live` enum('yes','no') NOT NULL DEFAULT 'no' AFTER `likes`;
|
||||
ALTER TABLE `{tbl_prefix}users` CHANGE `voted` `voted` INT( 11 ) NOT NULL DEFAULT '0';
|
||||
|
||||
ALTER TABLE `{tbl_prefix}photos` ADD `photo_details` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;
|
||||
|
@ -1185,7 +1175,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}admin_todo` (
|
|||
`date_added` datetime NOT NULL,
|
||||
`userid` int(225) NOT NULL,
|
||||
PRIMARY KEY (`todo_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
|
||||
|
||||
ALTER TABLE `{tbl_prefix}action_log` DROP `action_link`;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `file_directory` VARCHAR( 10 ) NOT NULL AFTER `file_server_path`;
|
||||
|
@ -1198,7 +1188,6 @@ INSERT INTO `{tbl_prefix}config` (`name`, `value`) VALUES ('clientid', 'your_cli
|
|||
INSERT INTO `{tbl_prefix}config` (`name`, `value`) VALUES ('secretId', 'your_client_secret_here');
|
||||
UPDATE `{tbl_prefix}config` SET value = 'cb_28' WHERE name = 'template_dir';
|
||||
|
||||
ALTER TABLE `{tbl_prefix}collection_categories` ADD `parent_id` int DEFAULT 1;
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES (NULL, 'youtube_api_key', 'key_here');
|
||||
/*Indexing of following tables*/
|
||||
/*Author: Sikander Ali */
|
||||
|
@ -1226,10 +1215,16 @@ ALTER TABLE `{tbl_prefix}video` ADD INDEX(`last_viewed`);
|
|||
ALTER TABLE `{tbl_prefix}video` ADD INDEX(`rating`);
|
||||
ALTER TABLE `{tbl_prefix}video` ADD INDEX(`comments_count`);
|
||||
ALTER TABLE `{tbl_prefix}video` ADD INDEX(`last_viewed`);
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `video_files` text(33) NOT NULL;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `re_conv_status` text(33) NOT NULL;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `conv_progress` TEXT NOT NULL;
|
||||
|
||||
-- Alterations for 4.0
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `file_type` INT( 10 ) NOT NULL DEFAULT '0' AFTER `file_name`;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `blocked_countries` TEXT( 255 ) NOT NULL AFTER `country`;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `sprite_count` INT(11) NOT NULL DEFAULT '0' AFTER `blocked_countries`;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD FULLTEXT INDEX (`title`,`tags`);
|
||||
ALTER TABLE `{tbl_prefix}photos` ADD FULLTEXT INDEX (`photo_title`,`photo_tags`);
|
||||
/*Cb_user_profile_info*/
|
||||
ALTER TABLE `{tbl_prefix}user_profile` ADD `fb_url` VARCHAR(200) NOT NULL AFTER `web_url`, ADD `twitter_url` VARCHAR(200) NOT NULL AFTER `fb_url`, ADD `insta_url` VARCHAR(200) NOT NULL AFTER `twitter_url`;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -19,5 +19,5 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}admin_todo` (
|
|||
`date_added` datetime NOT NULL,
|
||||
`userid` int(225) NOT NULL,
|
||||
PRIMARY KEY (`todo_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}collections` (
|
|||
`public_upload` varchar(4) NOT NULL,
|
||||
`type` varchar(10) NOT NULL,
|
||||
PRIMARY KEY (`collection_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `{tbl_prefix}collection_categories` (
|
||||
`category_id` int(255) NOT NULL AUTO_INCREMENT,
|
||||
|
@ -32,7 +32,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}collection_categories` (
|
|||
`category_thumb` mediumint(9) NOT NULL,
|
||||
`isdefault` enum('yes','no') NOT NULL,
|
||||
PRIMARY KEY (`category_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `{tbl_prefix}collection_items` (
|
||||
|
@ -43,7 +43,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}collection_items` (
|
|||
`type` varchar(10) NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`ci_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=30 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=30 ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `{tbl_prefix}photos` (
|
||||
`photo_id` bigint(255) NOT NULL AUTO_INCREMENT,
|
||||
|
@ -76,7 +76,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}photos` (
|
|||
`server_url` text NOT NULL,
|
||||
`owner_ip` varchar(20) NOT NULL,
|
||||
PRIMARY KEY (`photo_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ;
|
||||
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES (NULL, 'photo_ratio', '16:10'), (NULL, 'photo_thumb_width', '120'), (NULL, 'photo_thumb_height', '75'), (NULL, 'photo_med_width', '185'), (NULL, 'photo_med_height', '116'), (NULL, 'photo_lar_width', '600'), (NULL, 'photo_crop', '1'), (NULL, 'photo_multi_upload', '5'), (NULL, 'photo_download', '1'), (NULL, 'photo_comments', '1'), (NULL, 'photo_rating', '1');
|
||||
|
||||
|
|
|
@ -12,6 +12,6 @@ CREATE TABLE `{tbl_prefix}sessions` (
|
|||
`agent` text NOT NULL,
|
||||
`last_active` datetime NOT NULL,
|
||||
PRIMARY KEY (`session_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
ALTER TABLE `{tbl_prefix}users` ADD `album_privacy` ENUM( 'public', 'private', 'friends' ) NOT NULL DEFAULT 'private' ;
|
|
@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}collections` (
|
|||
`public_upload` varchar(4) NOT NULL,
|
||||
`type` varchar(10) NOT NULL,
|
||||
PRIMARY KEY (`collection_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `{tbl_prefix}collection_categories` (
|
||||
`category_id` int(255) NOT NULL AUTO_INCREMENT,
|
||||
|
@ -32,7 +32,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}collection_categories` (
|
|||
`category_thumb` mediumint(9) NOT NULL,
|
||||
`isdefault` enum('yes','no') NOT NULL,
|
||||
PRIMARY KEY (`category_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `{tbl_prefix}collection_items` (
|
||||
|
@ -43,7 +43,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}collection_items` (
|
|||
`type` varchar(10) NOT NULL,
|
||||
`date_added` datetime NOT NULL,
|
||||
PRIMARY KEY (`ci_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `{tbl_prefix}photos` (
|
||||
`photo_id` bigint(255) NOT NULL AUTO_INCREMENT,
|
||||
|
@ -76,7 +76,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}photos` (
|
|||
`server_url` text NOT NULL,
|
||||
`owner_ip` varchar(20) NOT NULL,
|
||||
PRIMARY KEY (`photo_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}counters` (
|
|||
`date_added` varchar(200) NOT NULL,
|
||||
PRIMARY KEY (`counter_id`),
|
||||
UNIQUE KEY `query_md5` (`query_md5`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
|
||||
ALTER TABLE `{tbl_prefix}user_levels_permissions` ADD `photos_moderation` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' ,
|
||||
|
@ -59,6 +59,6 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}mass_emails` (
|
|||
`date_added` datetime NOT NULL,
|
||||
`last_update` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
ALTER TABLE `{tbl_prefix}photos` ADD `photo_details` TEXT NOT NULL AFTER `photo_tags`;
|
|
@ -13,4 +13,4 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}admin_todo` (
|
|||
`date_added` datetime NOT NULL,
|
||||
`userid` int(225) NOT NULL,
|
||||
PRIMARY KEY (`todo_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
|
50
upload/cb_install/sql/upgrade_4.0.sql
Normal file
50
upload/cb_install/sql/upgrade_4.0.sql
Normal file
|
@ -0,0 +1,50 @@
|
|||
-- 4.0
|
||||
-- Author Awais
|
||||
|
||||
-- Addition for Cooporate cb seting bitrates for dash/hls
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'vbrate_240', '192000'),
|
||||
('', 'vbrate_360', '272000'),
|
||||
('', 'vbrate_480', '352000'),
|
||||
('', 'vbrate_720', '432000'),
|
||||
('', 'vbrate_1080', '512000');
|
||||
|
||||
-- Addition for Cooporate cb use video watermark or not
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'use_watermark', 'no');
|
||||
|
||||
-- Addition for Cooporate cb stream via hls or dash
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'stream_via', 'hls');
|
||||
-- Addition for video type
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `file_type` INT( 10 ) NOT NULL DEFAULT '0' AFTER `file_name`;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `blocked_countries` TEXT( 255 ) NOT NULL AFTER `country`;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `sprite_count` INT(11) NOT NULL DEFAULT '0' AFTER `blocked_countries`;
|
||||
--Addition in users table
|
||||
ALTER TABLE `{tbl_prefix}users` ADD `is_live` enum('yes','no') NOT NULL DEFAULT 'no' AFTER `likes`;
|
||||
|
||||
--Addition of social media link on channel
|
||||
ALTER TABLE `{tbl_prefix}user_profile` ADD `fb_url` VARCHAR(200) NOT NULL AFTER `web_url`, ADD `twitter_url` VARCHAR(200) NOT NULL AFTER `fb_url`, ADD `insta_url` VARCHAR(200) NOT NULL AFTER `twitter_url`;
|
||||
|
||||
|
||||
--Updating featured videos limit for new template
|
||||
UPDATE `{tbl_prefix}config` SET value = 'yes' WHERE name = 'cb_combo_res';
|
||||
|
||||
-- Addition for Cooporate cb access to logged in users
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'access_to_logged_in', 'no');
|
||||
|
||||
-- Addition for clipbucket license --
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'cb_license', 'CBCORP-XXXXXXXXXXX');
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'cb_license_local', '');
|
||||
|
||||
--Updating featured videos limit for new template
|
||||
-- value here is yes because no playlist page added yet in cb-git
|
||||
UPDATE `{tbl_prefix}config` SET value = 'yes' WHERE name = 'collectionsSection';
|
||||
-- Addition for Cooporate cb allowing collection and playlist page
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'playlistsSection', 'yes');
|
||||
|
||||
|
||||
-- Updating featured videos limit for new template
|
||||
-- Commented because cb-git version has difference from corporate
|
||||
-- UPDATE `{tbl_prefix}config` SET value = '3' WHERE name = 'index_featured';
|
||||
-- Reply email template added
|
||||
INSERT INTO `{tbl_prefix}email_templates` (`email_template_id`, `email_template_name`, `email_template_code`, `email_template_subject`, `email_template`, `email_template_allowed_tags`) VALUES ('', 'User Reply Email', 'user_reply_email', '[{website_title}] {username} made reply on your comment', '{username} has replied on your comment\r\n"{comment}"\r\n\r\n<a href="{obj_link}">{obj_link}</a>\r\n\r\n{website_title} team', '');
|
||||
-- Changing schema for plugin prems 4.0
|
||||
ALTER TABLE `{tbl_prefix}user_levels_permissions` MODIFY COLUMN `plugins_perms` text NOT NULL;
|
1
upload/cb_install/sql/upgrade_4.1.sql
Normal file
1
upload/cb_install/sql/upgrade_4.1.sql
Normal file
|
@ -0,0 +1 @@
|
|||
-- No db changes made
|
8
upload/cb_install/sql/upgrade_4.2.sql
Normal file
8
upload/cb_install/sql/upgrade_4.2.sql
Normal file
|
@ -0,0 +1,8 @@
|
|||
-- enabling Fulltext search with InnoDB as mysql engine
|
||||
ALTER TABLE `{tbl_prefix}video` ADD FULLTEXT INDEX (`title`,`tags`);
|
||||
|
||||
-- Addition for Cooporate pick default sign up country geologically
|
||||
INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'pick_geo_country', 'yes');
|
||||
|
||||
-- enabling Fulltext search with InnoDB as mysql engine
|
||||
ALTER TABLE `{tbl_prefix}photos` ADD FULLTEXT INDEX (`photo_title`,`photo_tags`);
|
|
@ -5,7 +5,7 @@
|
|||
,'2.0.7','2.0.8','2.0.9','2.0.91','2.1','2.2'
|
||||
,'2.3','2.4','2.4.5','2.5','2.5.1','2.6','2.7'
|
||||
,'2.7.0.1','2.7.0.02','2.7.0.3','2.7.0.4','2.7.0.5'
|
||||
,'2.7.1','2.7.2','2.7.3','2.7.4','2.7.5','2.7.6','2.8','2.8.1','2.8.2','2.8.3');
|
||||
,'2.7.1','2.7.2','2.7.3','2.7.4','2.7.5','2.7.6','2.8','2.8.1','2.8.2','2.8.3','4.0','4.1','4.2');
|
||||
|
||||
/**
|
||||
* Function used to upgrade ClipBucket
|
||||
|
|
|
@ -30,7 +30,7 @@ if(isset($_POST['contact']))
|
|||
elseif(empty($message))
|
||||
e(lang("please_enter_something_for_message"));
|
||||
elseif(!verify_captcha())
|
||||
e(lang('usr_ccode_err'));
|
||||
e(lang('recap_verify_failed'));
|
||||
else
|
||||
{
|
||||
$tpl = $cbemail->get_template('contact_form');
|
||||
|
|
|
@ -33,21 +33,44 @@ if(isset($_POST['update_avatar_bg']))
|
|||
$array['userid'] = userid();
|
||||
$userquery->update_user_avatar_bg($array);
|
||||
}
|
||||
|
||||
if(isset($_FILES["coverPhoto"])){
|
||||
$array = $_FILES;
|
||||
$array['userid'] = userid();
|
||||
$coverUpload = $userquery->updateCover($array);
|
||||
$timeStamp = time();
|
||||
$response = array(
|
||||
"status" => $coverUpload["status"],
|
||||
"msg" => $coverUpload["msg"],
|
||||
"url" => $userquery->getCover(userid()) . "?{$timeStamp}",
|
||||
);
|
||||
echo json_encode($response);
|
||||
die();
|
||||
}
|
||||
if(isset($_FILES["coverPhoto"]) && get_mime_type($_FILES["coverPhoto"]['tmp_name']) == 'image'){
|
||||
$array = $_FILES;
|
||||
|
||||
$extension = getExt( $_FILES['coverPhoto']['name']);
|
||||
$types = strtolower(config('allowed_types'));
|
||||
$supported_extensions = explode(',', $types);
|
||||
|
||||
if (!in_array($extension, $supported_extensions)) {
|
||||
$response = array(
|
||||
"status" => false,
|
||||
"msg" => "Invalid extension provided",
|
||||
"url" => false,
|
||||
);
|
||||
echo json_encode($response);
|
||||
die();
|
||||
}
|
||||
|
||||
$array['userid'] = userid();
|
||||
$coverUpload = $userquery->updateCover($array);
|
||||
$timeStamp = time();
|
||||
$response = array(
|
||||
"status" => $coverUpload["status"],
|
||||
"msg" => $coverUpload["msg"],
|
||||
"url" => $userquery->getCover(userid()) . "?{$timeStamp}",
|
||||
);
|
||||
echo json_encode($response);
|
||||
die();
|
||||
}else{
|
||||
$response = array(
|
||||
"status" => false,
|
||||
"msg" => "Invalid Image provided",
|
||||
"url" => false,
|
||||
);
|
||||
echo json_encode($response);
|
||||
die();
|
||||
}
|
||||
}
|
||||
if(isset($_FILES["avatar_file"]) && $_GET['ajax'] == true){
|
||||
$array = $_FILES;
|
||||
$array['userid'] = userid();
|
||||
|
|
1
upload/files/.gitignore
vendored
Normal file
1
upload/files/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.txt
|
3
upload/files/conversion_queue/.gitignore
vendored
3
upload/files/conversion_queue/.gitignore
vendored
|
@ -0,0 +1,3 @@
|
|||
/*
|
||||
# But not these files...
|
||||
!.gitignore
|
3
upload/files/logs/.gitignore
vendored
3
upload/files/logs/.gitignore
vendored
|
@ -0,0 +1,3 @@
|
|||
/*
|
||||
# But not these files...
|
||||
!.gitignore
|
3
upload/files/mass_uploads/.gitignore
vendored
3
upload/files/mass_uploads/.gitignore
vendored
|
@ -0,0 +1,3 @@
|
|||
*
|
||||
|
||||
!.gitignore
|
3
upload/files/original/.gitignore
vendored
3
upload/files/original/.gitignore
vendored
|
@ -0,0 +1,3 @@
|
|||
*
|
||||
|
||||
!.gitignore
|
4
upload/files/temp/.gitignore
vendored
Normal file
4
upload/files/temp/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
# But not these files...
|
||||
!.gitignore
|
||||
!install.me
|
4
upload/files/thumbs/.gitignore
vendored
Normal file
4
upload/files/thumbs/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
# But not these files...
|
||||
!.gitignore
|
||||
!processing.jpg
|
5
upload/files/videos/.gitignore
vendored
Normal file
5
upload/files/videos/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
/*
|
||||
# But not these files...
|
||||
!.gitignore
|
||||
!no_video.flv
|
||||
!no_video.mp4
|
3
upload/includes/.gitignore
vendored
Normal file
3
upload/includes/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
/dbconnect.php
|
||||
/clipbucket.php
|
||||
/development.dev
|
|
@ -87,10 +87,10 @@ class ADODB_mysql extends ADOConnection {
|
|||
//Complete Query
|
||||
$query = "INSERT INTO $tbl ($fields_query) VALUES ($values_query) $ep";
|
||||
$this->total_queries_sql[] = $query;
|
||||
//if(!mysql_query($query)) die(mysql_error());
|
||||
//if(!mysqli_query($query)) die(mysqli_error());
|
||||
$this->total_queries++;
|
||||
$this->Execute($query);
|
||||
if(mysql_error()) die ($this->db_query.'<br>'.mysql_error());
|
||||
if(mysqli_error()) die ($this->db_query.'<br>'.mysqli_error());
|
||||
return $this->insert_id();
|
||||
|
||||
}
|
||||
|
@ -135,11 +135,11 @@ class ADODB_mysql extends ADOConnection {
|
|||
//Complete Query
|
||||
$query = "UPDATE $tbl SET $fields_query WHERE $cond $ep";
|
||||
|
||||
//if(!mysql_query($query)) die($query.'<br>'.mysql_error());
|
||||
//if(!mysqli_query($query)) die($query.'<br>'.mysqli_error());
|
||||
$this->total_queries++;
|
||||
$this->total_queries_sql[] = $query;
|
||||
$this->Execute($query);
|
||||
if(mysql_error()) die ($this->db_query.'<br>'.mysql_error());
|
||||
if(mysqli_error()) die ($this->db_query.'<br>'.mysqli_error());
|
||||
return $query;
|
||||
|
||||
}
|
||||
|
@ -177,11 +177,11 @@ class ADODB_mysql extends ADOConnection {
|
|||
}
|
||||
//Complete Query
|
||||
$query = "DELETE FROM $tbl WHERE $fields_query $ep";
|
||||
//if(!mysql_query($query)) die(mysql_error());
|
||||
//if(!mysqli_query($query)) die(mysqli_error());
|
||||
$this->total_queries++;
|
||||
$this->total_queries_sql[] = $query;
|
||||
$this->Execute($query);
|
||||
if(mysql_error()) die ($this->db_query.'<br>'.mysql_error());
|
||||
if(mysqli_error()) die ($this->db_query.'<br>'.mysqli_error());
|
||||
|
||||
}
|
||||
|
||||
|
@ -328,7 +328,7 @@ class ADODB_mysql extends ADOConnection {
|
|||
}
|
||||
|
||||
|
||||
// if magic quotes disabled, use mysql_real_escape_string()
|
||||
// if magic quotes disabled, use mysqli_real_escape_string()
|
||||
function qstr($s,$magic_quotes=false)
|
||||
{
|
||||
if (is_null($s)) return 'NULL';
|
||||
|
@ -337,7 +337,7 @@ class ADODB_mysql extends ADOConnection {
|
|||
|
||||
if (ADODB_PHPVER >= 0x4300) {
|
||||
if (is_resource($this->_connectionID))
|
||||
return "'".mysql_real_escape_string($s,$this->_connectionID)."'";
|
||||
return "'".mysqli_real_escape_string($s,$this->_connectionID)."'";
|
||||
}
|
||||
if ($this->replaceQuote[0] == '\\'){
|
||||
$s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s);
|
||||
|
@ -353,7 +353,7 @@ class ADODB_mysql extends ADOConnection {
|
|||
function _insertid()
|
||||
{
|
||||
return ADOConnection::GetOne('SELECT LAST_INSERT_ID()');
|
||||
//return mysql_insert_id($this->_connectionID);
|
||||
//return mysqli_insert_id($this->_connectionID);
|
||||
}
|
||||
|
||||
function GetOne($sql,$inputarr=false)
|
||||
|
@ -378,7 +378,7 @@ class ADODB_mysql extends ADOConnection {
|
|||
|
||||
function _affectedrows()
|
||||
{
|
||||
return mysql_affected_rows($this->_connectionID);
|
||||
return mysqli_affected_rows($this->_connectionID);
|
||||
}
|
||||
|
||||
// See http://www.mysql.com/doc/M/i/Miscellaneous_functions.html
|
||||
|
@ -420,7 +420,7 @@ class ADODB_mysql extends ADOConnection {
|
|||
}
|
||||
|
||||
if ($rs) {
|
||||
$this->genID = mysql_insert_id($this->_connectionID);
|
||||
$this->genID = mysqli_insert_id($this->_connectionID);
|
||||
$rs->Close();
|
||||
} else
|
||||
$this->genID = 0;
|
||||
|
@ -447,12 +447,12 @@ class ADODB_mysql extends ADOConnection {
|
|||
|
||||
function &MetaDatabases()
|
||||
{
|
||||
$qid = mysql_list_dbs($this->_connectionID);
|
||||
$qid = mysqli_list_dbs($this->_connectionID);
|
||||
$arr = array();
|
||||
$i = 0;
|
||||
$max = mysql_num_rows($qid);
|
||||
$max = mysqli_num_rows($qid);
|
||||
while ($i < $max) {
|
||||
$db = mysql_tablename($qid,$i);
|
||||
$db = mysqli_tablename($qid,$i);
|
||||
if ($db != 'mysql') $arr[] = $db;
|
||||
$i += 1;
|
||||
}
|
||||
|
@ -576,13 +576,13 @@ class ADODB_mysql extends ADOConnection {
|
|||
if (!empty($this->port)) $argHostname .= ":".$this->port;
|
||||
|
||||
if (ADODB_PHPVER >= 0x4300)
|
||||
$this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword,
|
||||
$this->_connectionID = mysqli_connect($argHostname,$argUsername,$argPassword,
|
||||
$this->forceNewConnect,$this->clientFlags);
|
||||
else if (ADODB_PHPVER >= 0x4200)
|
||||
$this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword,
|
||||
$this->_connectionID = mysqli_connect($argHostname,$argUsername,$argPassword,
|
||||
$this->forceNewConnect);
|
||||
else
|
||||
$this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword);
|
||||
$this->_connectionID = mysqli_connect($argHostname,$argUsername,$argPassword);
|
||||
|
||||
if ($this->_connectionID === false) return false;
|
||||
if ($argDatabasename) return $this->SelectDB($argDatabasename);
|
||||
|
@ -595,9 +595,9 @@ class ADODB_mysql extends ADOConnection {
|
|||
if (!empty($this->port)) $argHostname .= ":".$this->port;
|
||||
|
||||
if (ADODB_PHPVER >= 0x4300)
|
||||
$this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this->clientFlags);
|
||||
$this->_connectionID = mysqli_pconnect($argHostname,$argUsername,$argPassword,$this->clientFlags);
|
||||
else
|
||||
$this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword);
|
||||
$this->_connectionID = mysqli_pconnect($argHostname,$argUsername,$argPassword);
|
||||
if ($this->_connectionID === false) return false;
|
||||
if ($this->autoRollback) $this->RollbackTrans();
|
||||
if ($argDatabasename) return $this->SelectDB($argDatabasename);
|
||||
|
@ -697,7 +697,7 @@ class ADODB_mysql extends ADOConnection {
|
|||
$this->database = $dbName;
|
||||
$this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions
|
||||
if ($this->_connectionID) {
|
||||
return @mysql_select_db($dbName,$this->_connectionID);
|
||||
return @mysqli_select_db($this->_connectionID,$dbName);
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
@ -722,7 +722,7 @@ class ADODB_mysql extends ADOConnection {
|
|||
//global $ADODB_COUNTRECS;
|
||||
//if($ADODB_COUNTRECS)
|
||||
$this->db_query = $sql;
|
||||
return mysql_query($sql,$this->_connectionID);
|
||||
return mysqli_query($this->_connectionID,$sql);
|
||||
//else return @mysql_unbuffered_query($sql,$this->_connectionID); // requires PHP >= 4.0.6
|
||||
}
|
||||
|
||||
|
@ -731,8 +731,8 @@ class ADODB_mysql extends ADOConnection {
|
|||
{
|
||||
|
||||
if ($this->_logsql) return $this->_errorMsg;
|
||||
if (empty($this->_connectionID)) $this->_errorMsg = @mysql_error();
|
||||
else $this->_errorMsg = @mysql_error($this->_connectionID);
|
||||
if (empty($this->_connectionID)) $this->_errorMsg = @mysqli_error();
|
||||
else $this->_errorMsg = @mysqli_error($this->_connectionID);
|
||||
|
||||
$msg = $this->db_query.'<br>';
|
||||
return $msg.$this->_errorMsg;
|
||||
|
@ -742,8 +742,8 @@ class ADODB_mysql extends ADOConnection {
|
|||
function ErrorNo()
|
||||
{
|
||||
if ($this->_logsql) return $this->_errorCode;
|
||||
if (empty($this->_connectionID)) return @mysql_errno();
|
||||
else return @mysql_errno($this->_connectionID);
|
||||
if (empty($this->_connectionID)) return @mysqli_errno();
|
||||
else return @mysqli_errno($this->_connectionID);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -816,7 +816,7 @@ class ADODB_mysql extends ADOConnection {
|
|||
// returns true or false
|
||||
function _close()
|
||||
{
|
||||
@mysql_close($this->_connectionID);
|
||||
@mysqli_close($this->_connectionID);
|
||||
$this->_connectionID = false;
|
||||
}
|
||||
|
||||
|
@ -899,12 +899,12 @@ class ADORecordSet_mysql extends ADORecordSet{
|
|||
}
|
||||
switch ($mode)
|
||||
{
|
||||
case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break;
|
||||
case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break;
|
||||
case ADODB_FETCH_NUM: $this->fetchMode = MYSQLI_NUM; break;
|
||||
case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQLI_ASSOC; break;
|
||||
case ADODB_FETCH_DEFAULT:
|
||||
case ADODB_FETCH_BOTH:
|
||||
default:
|
||||
$this->fetchMode = MYSQL_BOTH; break;
|
||||
$this->fetchMode = MYSQLI_BOTH; break;
|
||||
}
|
||||
$this->adodbFetchMode = $mode;
|
||||
$this->ADORecordSet($queryID);
|
||||
|
@ -913,24 +913,24 @@ class ADORecordSet_mysql extends ADORecordSet{
|
|||
function _initrs()
|
||||
{
|
||||
//GLOBAL $ADODB_COUNTRECS;
|
||||
// $this->_numOfRows = ($ADODB_COUNTRECS) ? @mysql_num_rows($this->_queryID):-1;
|
||||
$this->_numOfRows = @mysql_num_rows($this->_queryID);
|
||||
$this->_numOfFields = @mysql_num_fields($this->_queryID);
|
||||
$this->num_rows = @mysql_num_rows($this->_queryID);
|
||||
// $this->_numOfRows = ($ADODB_COUNTRECS) ? @mysqli_num_rows($this->_queryID):-1;
|
||||
$this->_numOfRows = @mysqli_num_rows($this->_queryID);
|
||||
$this->_numOfFields = @mysqli_num_fields($this->_queryID);
|
||||
$this->num_rows = @mysqli_num_rows($this->_queryID);
|
||||
}
|
||||
|
||||
function &FetchField($fieldOffset = -1)
|
||||
{
|
||||
if ($fieldOffset != -1) {
|
||||
$o = @mysql_fetch_field($this->_queryID, $fieldOffset);
|
||||
$f = @mysql_field_flags($this->_queryID,$fieldOffset);
|
||||
$o->max_length = @mysql_field_len($this->_queryID,$fieldOffset); // suggested by: Jim Nicholson (jnich#att.com)
|
||||
$o = @mysqli_fetch_field($this->_queryID, $fieldOffset);
|
||||
$f = @mysqli_field_flags($this->_queryID,$fieldOffset);
|
||||
$o->max_length = @mysqli_field_len($this->_queryID,$fieldOffset); // suggested by: Jim Nicholson (jnich#att.com)
|
||||
//$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
|
||||
$o->binary = (strpos($f,'binary')!== false);
|
||||
}
|
||||
else if ($fieldOffset == -1) { /* The $fieldOffset argument is not provided thus its -1 */
|
||||
$o = @mysql_fetch_field($this->_queryID);
|
||||
$o->max_length = @mysql_field_len($this->_queryID); // suggested by: Jim Nicholson (jnich#att.com)
|
||||
$o = @mysqli_fetch_field($this->_queryID);
|
||||
$o->max_length = @mysqli_field_len($this->_queryID); // suggested by: Jim Nicholson (jnich#att.com)
|
||||
//$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
|
||||
}
|
||||
|
||||
|
@ -939,7 +939,7 @@ class ADORecordSet_mysql extends ADORecordSet{
|
|||
|
||||
function &GetRowAssoc($upper=true)
|
||||
{
|
||||
if ($this->fetchMode == MYSQL_ASSOC && !$upper) $row = $this->fields;
|
||||
if ($this->fetchMode == MYSQLI_ASSOC && !$upper) $row = $this->fields;
|
||||
else $row =& ADORecordSet::GetRowAssoc($upper);
|
||||
return $row;
|
||||
}
|
||||
|
@ -948,7 +948,7 @@ class ADORecordSet_mysql extends ADORecordSet{
|
|||
function Fields($colname)
|
||||
{
|
||||
// added @ by "Michael William Miller" <mille562@pilot.msu.edu>
|
||||
if ($this->fetchMode != MYSQL_NUM) return @$this->fields[$colname];
|
||||
if ($this->fetchMode != MYSQLI_NUM) return @$this->fields[$colname];
|
||||
|
||||
if (!$this->bind) {
|
||||
$this->bind = array();
|
||||
|
@ -963,14 +963,14 @@ class ADORecordSet_mysql extends ADORecordSet{
|
|||
function _seek($row)
|
||||
{
|
||||
if ($this->_numOfRows == 0) return false;
|
||||
return @mysql_data_seek($this->_queryID,$row);
|
||||
return @mysqli_data_seek($this->_queryID,$row);
|
||||
}
|
||||
|
||||
function MoveNext()
|
||||
{
|
||||
//return adodb_movenext($this);
|
||||
//if (defined('ADODB_EXTENSION')) return adodb_movenext($this);
|
||||
if (@$this->fields = mysql_fetch_array($this->_queryID,$this->fetchMode)) {
|
||||
if (@$this->fields = mysqli_fetch_array($this->_queryID,$this->fetchMode)) {
|
||||
$this->_currentRow += 1;
|
||||
return true;
|
||||
}
|
||||
|
@ -983,7 +983,7 @@ class ADORecordSet_mysql extends ADORecordSet{
|
|||
|
||||
function _fetch()
|
||||
{
|
||||
$this->fields = @mysql_fetch_array($this->_queryID,$this->fetchMode);
|
||||
$this->fields = @mysqli_fetch_array($this->_queryID,$this->fetchMode);
|
||||
return is_array($this->fields);
|
||||
}
|
||||
|
||||
|
@ -993,7 +993,7 @@ class ADORecordSet_mysql extends ADORecordSet{
|
|||
}
|
||||
|
||||
function _close() {
|
||||
@mysql_free_result($this->_queryID);
|
||||
@mysqli_free_result($this->_queryID);
|
||||
$this->_queryID = false;
|
||||
}
|
||||
|
||||
|
@ -1061,12 +1061,12 @@ class ADORecordSet_ext_mysql extends ADORecordSet_mysql {
|
|||
}
|
||||
switch ($mode)
|
||||
{
|
||||
case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break;
|
||||
case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break;
|
||||
case ADODB_FETCH_NUM: $this->fetchMode = MYSQLI_NUM; break;
|
||||
case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQLI_ASSOC; break;
|
||||
case ADODB_FETCH_DEFAULT:
|
||||
case ADODB_FETCH_BOTH:
|
||||
default:
|
||||
$this->fetchMode = MYSQL_BOTH; break;
|
||||
$this->fetchMode = MYSQLI_BOTH; break;
|
||||
}
|
||||
$this->adodbFetchMode = $mode;
|
||||
$this->ADORecordSet($queryID);
|
||||
|
|
|
@ -68,7 +68,10 @@ class ClipBucket
|
|||
*/
|
||||
var $on_delete_video = array();
|
||||
|
||||
function ClipBucket()
|
||||
//This array contains the public pages name for private access to website
|
||||
var $public_pages = array("signup","view_page");
|
||||
|
||||
function __construct()
|
||||
{
|
||||
global $pages;
|
||||
//Assign Configs
|
||||
|
|
7
upload/includes/classes/GTvendor/autoload.php
Executable file
7
upload/includes/classes/GTvendor/autoload.php
Executable file
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
// autoload.php @generated by Composer
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit9aac88a7a049e0ea07c97a5e2f2dffea::getLoader();
|
445
upload/includes/classes/GTvendor/composer/ClassLoader.php
Executable file
445
upload/includes/classes/GTvendor/composer/ClassLoader.php
Executable file
|
@ -0,0 +1,445 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
/**
|
||||
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
||||
*
|
||||
* $loader = new \Composer\Autoload\ClassLoader();
|
||||
*
|
||||
* // register classes with namespaces
|
||||
* $loader->add('Symfony\Component', __DIR__.'/component');
|
||||
* $loader->add('Symfony', __DIR__.'/framework');
|
||||
*
|
||||
* // activate the autoloader
|
||||
* $loader->register();
|
||||
*
|
||||
* // to enable searching the include path (eg. for PEAR packages)
|
||||
* $loader->setUseIncludePath(true);
|
||||
*
|
||||
* In this example, if you try to use a class in the Symfony\Component
|
||||
* namespace or one of its children (Symfony\Component\Console for instance),
|
||||
* the autoloader will first look for the class under the component/
|
||||
* directory, and it will then fallback to the framework/ directory if not
|
||||
* found before giving up.
|
||||
*
|
||||
* This class is loosely based on the Symfony UniversalClassLoader.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @see http://www.php-fig.org/psr/psr-0/
|
||||
* @see http://www.php-fig.org/psr/psr-4/
|
||||
*/
|
||||
class ClassLoader
|
||||
{
|
||||
// PSR-4
|
||||
private $prefixLengthsPsr4 = array();
|
||||
private $prefixDirsPsr4 = array();
|
||||
private $fallbackDirsPsr4 = array();
|
||||
|
||||
// PSR-0
|
||||
private $prefixesPsr0 = array();
|
||||
private $fallbackDirsPsr0 = array();
|
||||
|
||||
private $useIncludePath = false;
|
||||
private $classMap = array();
|
||||
private $classMapAuthoritative = false;
|
||||
private $missingClasses = array();
|
||||
private $apcuPrefix;
|
||||
|
||||
public function getPrefixes()
|
||||
{
|
||||
if (!empty($this->prefixesPsr0)) {
|
||||
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
public function getPrefixesPsr4()
|
||||
{
|
||||
return $this->prefixDirsPsr4;
|
||||
}
|
||||
|
||||
public function getFallbackDirs()
|
||||
{
|
||||
return $this->fallbackDirsPsr0;
|
||||
}
|
||||
|
||||
public function getFallbackDirsPsr4()
|
||||
{
|
||||
return $this->fallbackDirsPsr4;
|
||||
}
|
||||
|
||||
public function getClassMap()
|
||||
{
|
||||
return $this->classMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $classMap Class to filename map
|
||||
*/
|
||||
public function addClassMap(array $classMap)
|
||||
{
|
||||
if ($this->classMap) {
|
||||
$this->classMap = array_merge($this->classMap, $classMap);
|
||||
} else {
|
||||
$this->classMap = $classMap;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix, either
|
||||
* appending or prepending to the ones previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param array|string $paths The PSR-0 root directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*/
|
||||
public function add($prefix, $paths, $prepend = false)
|
||||
{
|
||||
if (!$prefix) {
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
(array) $paths,
|
||||
$this->fallbackDirsPsr0
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
$this->fallbackDirsPsr0,
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$first = $prefix[0];
|
||||
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
||||
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
||||
|
||||
return;
|
||||
}
|
||||
if ($prepend) {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
(array) $paths,
|
||||
$this->prefixesPsr0[$first][$prefix]
|
||||
);
|
||||
} else {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
$this->prefixesPsr0[$first][$prefix],
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace, either
|
||||
* appending or prepending to the ones previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param array|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function addPsr4($prefix, $paths, $prepend = false)
|
||||
{
|
||||
if (!$prefix) {
|
||||
// Register directories for the root namespace.
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
(array) $paths,
|
||||
$this->fallbackDirsPsr4
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
$this->fallbackDirsPsr4,
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||
// Register directories for a new namespace.
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||
} elseif ($prepend) {
|
||||
// Prepend directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
(array) $paths,
|
||||
$this->prefixDirsPsr4[$prefix]
|
||||
);
|
||||
} else {
|
||||
// Append directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
$this->prefixDirsPsr4[$prefix],
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix,
|
||||
* replacing any others previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param array|string $paths The PSR-0 base directories
|
||||
*/
|
||||
public function set($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr0 = (array) $paths;
|
||||
} else {
|
||||
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace,
|
||||
* replacing any others previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param array|string $paths The PSR-4 base directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function setPsr4($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr4 = (array) $paths;
|
||||
} else {
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns on searching the include path for class files.
|
||||
*
|
||||
* @param bool $useIncludePath
|
||||
*/
|
||||
public function setUseIncludePath($useIncludePath)
|
||||
{
|
||||
$this->useIncludePath = $useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to check if the autoloader uses the include path to check
|
||||
* for classes.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUseIncludePath()
|
||||
{
|
||||
return $this->useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns off searching the prefix and fallback directories for classes
|
||||
* that have not been registered with the class map.
|
||||
*
|
||||
* @param bool $classMapAuthoritative
|
||||
*/
|
||||
public function setClassMapAuthoritative($classMapAuthoritative)
|
||||
{
|
||||
$this->classMapAuthoritative = $classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should class lookup fail if not found in the current class map?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isClassMapAuthoritative()
|
||||
{
|
||||
return $this->classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
||||
*
|
||||
* @param string|null $apcuPrefix
|
||||
*/
|
||||
public function setApcuPrefix($apcuPrefix)
|
||||
{
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The APCu prefix in use, or null if APCu caching is not enabled.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getApcuPrefix()
|
||||
{
|
||||
return $this->apcuPrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers this instance as an autoloader.
|
||||
*
|
||||
* @param bool $prepend Whether to prepend the autoloader or not
|
||||
*/
|
||||
public function register($prepend = false)
|
||||
{
|
||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters this instance as an autoloader.
|
||||
*/
|
||||
public function unregister()
|
||||
{
|
||||
spl_autoload_unregister(array($this, 'loadClass'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the given class or interface.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
* @return bool|null True if loaded, null otherwise
|
||||
*/
|
||||
public function loadClass($class)
|
||||
{
|
||||
if ($file = $this->findFile($class)) {
|
||||
includeFile($file);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the path to the file where the class is defined.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
*
|
||||
* @return string|false The path if found, false otherwise
|
||||
*/
|
||||
public function findFile($class)
|
||||
{
|
||||
// class map lookup
|
||||
if (isset($this->classMap[$class])) {
|
||||
return $this->classMap[$class];
|
||||
}
|
||||
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
||||
return false;
|
||||
}
|
||||
if (null !== $this->apcuPrefix) {
|
||||
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
||||
if ($hit) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
$file = $this->findFileWithExtension($class, '.php');
|
||||
|
||||
// Search for Hack files if we are running on HHVM
|
||||
if (false === $file && defined('HHVM_VERSION')) {
|
||||
$file = $this->findFileWithExtension($class, '.hh');
|
||||
}
|
||||
|
||||
if (null !== $this->apcuPrefix) {
|
||||
apcu_add($this->apcuPrefix.$class, $file);
|
||||
}
|
||||
|
||||
if (false === $file) {
|
||||
// Remember that this class does not exist.
|
||||
$this->missingClasses[$class] = true;
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
private function findFileWithExtension($class, $ext)
|
||||
{
|
||||
// PSR-4 lookup
|
||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||
|
||||
$first = $class[0];
|
||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
||||
$subPath = $class;
|
||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||
$subPath = substr($subPath, 0, $lastPos);
|
||||
$search = $subPath.'\\';
|
||||
if (isset($this->prefixDirsPsr4[$search])) {
|
||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-4 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr4 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 lookup
|
||||
if (false !== $pos = strrpos($class, '\\')) {
|
||||
// namespaced class name
|
||||
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
||||
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
||||
} else {
|
||||
// PEAR-like class name
|
||||
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
||||
}
|
||||
|
||||
if (isset($this->prefixesPsr0[$first])) {
|
||||
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
foreach ($dirs as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr0 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 include paths.
|
||||
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope isolated include.
|
||||
*
|
||||
* Prevents access to $this/self from included files.
|
||||
*/
|
||||
function includeFile($file)
|
||||
{
|
||||
include $file;
|
||||
}
|
21
upload/includes/classes/GTvendor/composer/LICENSE
Executable file
21
upload/includes/classes/GTvendor/composer/LICENSE
Executable file
|
@ -0,0 +1,21 @@
|
|||
|
||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
9
upload/includes/classes/GTvendor/composer/autoload_classmap.php
Executable file
9
upload/includes/classes/GTvendor/composer/autoload_classmap.php
Executable file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
);
|
12
upload/includes/classes/GTvendor/composer/autoload_files.php
Executable file
12
upload/includes/classes/GTvendor/composer/autoload_files.php
Executable file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
// autoload_files.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
);
|
10
upload/includes/classes/GTvendor/composer/autoload_namespaces.php
Executable file
10
upload/includes/classes/GTvendor/composer/autoload_namespaces.php
Executable file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
// autoload_namespaces.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Stichoza\\GoogleTranslate\\' => array($vendorDir . '/stichoza/google-translate-php/src'),
|
||||
);
|
14
upload/includes/classes/GTvendor/composer/autoload_psr4.php
Executable file
14
upload/includes/classes/GTvendor/composer/autoload_psr4.php
Executable file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
// autoload_psr4.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Stichoza\\GoogleTranslate\\' => array($vendorDir . '/stichoza/google-translate-php/src/Stichoza/GoogleTranslate'),
|
||||
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
|
||||
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
|
||||
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
|
||||
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
|
||||
);
|
70
upload/includes/classes/GTvendor/composer/autoload_real.php
Executable file
70
upload/includes/classes/GTvendor/composer/autoload_real.php
Executable file
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit9aac88a7a049e0ea07c97a5e2f2dffea
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
public static function loadClassLoader($class)
|
||||
{
|
||||
if ('Composer\Autoload\ClassLoader' === $class) {
|
||||
require __DIR__ . '/ClassLoader.php';
|
||||
}
|
||||
}
|
||||
|
||||
public static function getLoader()
|
||||
{
|
||||
if (null !== self::$loader) {
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit9aac88a7a049e0ea07c97a5e2f2dffea', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit9aac88a7a049e0ea07c97a5e2f2dffea', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require_once __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit9aac88a7a049e0ea07c97a5e2f2dffea::getInitializer($loader));
|
||||
} else {
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->set($namespace, $path);
|
||||
}
|
||||
|
||||
$map = require __DIR__ . '/autoload_psr4.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->setPsr4($namespace, $path);
|
||||
}
|
||||
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
$loader->addClassMap($classMap);
|
||||
}
|
||||
}
|
||||
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit9aac88a7a049e0ea07c97a5e2f2dffea::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire9aac88a7a049e0ea07c97a5e2f2dffea($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequire9aac88a7a049e0ea07c97a5e2f2dffea($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
}
|
||||
}
|
74
upload/includes/classes/GTvendor/composer/autoload_static.php
Executable file
74
upload/includes/classes/GTvendor/composer/autoload_static.php
Executable file
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
|
||||
// autoload_static.php @generated by Composer
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit9aac88a7a049e0ea07c97a5e2f2dffea
|
||||
{
|
||||
public static $files = array (
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
);
|
||||
|
||||
public static $prefixLengthsPsr4 = array (
|
||||
'S' =>
|
||||
array (
|
||||
'Stichoza\\GoogleTranslate\\' => 25,
|
||||
),
|
||||
'P' =>
|
||||
array (
|
||||
'Psr\\Http\\Message\\' => 17,
|
||||
),
|
||||
'G' =>
|
||||
array (
|
||||
'GuzzleHttp\\Psr7\\' => 16,
|
||||
'GuzzleHttp\\Promise\\' => 19,
|
||||
'GuzzleHttp\\' => 11,
|
||||
),
|
||||
);
|
||||
|
||||
public static $prefixDirsPsr4 = array (
|
||||
'Stichoza\\GoogleTranslate\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/stichoza/google-translate-php/src/Stichoza/GoogleTranslate',
|
||||
),
|
||||
'Psr\\Http\\Message\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/psr/http-message/src',
|
||||
),
|
||||
'GuzzleHttp\\Psr7\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
|
||||
),
|
||||
'GuzzleHttp\\Promise\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
|
||||
),
|
||||
'GuzzleHttp\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
|
||||
),
|
||||
);
|
||||
|
||||
public static $prefixesPsr0 = array (
|
||||
'S' =>
|
||||
array (
|
||||
'Stichoza\\GoogleTranslate\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/stichoza/google-translate-php/src',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit9aac88a7a049e0ea07c97a5e2f2dffea::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit9aac88a7a049e0ea07c97a5e2f2dffea::$prefixDirsPsr4;
|
||||
$loader->prefixesPsr0 = ComposerStaticInit9aac88a7a049e0ea07c97a5e2f2dffea::$prefixesPsr0;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
}
|
292
upload/includes/classes/GTvendor/composer/installed.json
Executable file
292
upload/includes/classes/GTvendor/composer/installed.json
Executable file
|
@ -0,0 +1,292 @@
|
|||
[
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "v1.3.1",
|
||||
"version_normalized": "1.3.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
|
||||
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.0"
|
||||
},
|
||||
"time": "2016-12-20T10:07:11+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Promise\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Guzzle promises library",
|
||||
"keywords": [
|
||||
"promise"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
"version": "1.0.1",
|
||||
"version_normalized": "1.0.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-message.git",
|
||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
|
||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"time": "2016-08-06T14:39:51+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Http\\Message\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for HTTP messages",
|
||||
"homepage": "https://github.com/php-fig/http-message",
|
||||
"keywords": [
|
||||
"http",
|
||||
"http-message",
|
||||
"psr",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.4.2",
|
||||
"version_normalized": "1.4.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"psr/http-message": "~1.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/http-message-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"time": "2017-03-20T17:10:46+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Psr7\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
"description": "PSR-7 message implementation that also provides common utility methods",
|
||||
"keywords": [
|
||||
"http",
|
||||
"message",
|
||||
"request",
|
||||
"response",
|
||||
"stream",
|
||||
"uri",
|
||||
"url"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.3.0",
|
||||
"version_normalized": "6.3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699",
|
||||
"reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.4",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "^4.0 || ^5.0",
|
||||
"psr/log": "^1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log": "Required for using the Log middleware"
|
||||
},
|
||||
"time": "2017-06-22T18:50:49+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.2-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Guzzle is a PHP HTTP client library",
|
||||
"homepage": "http://guzzlephp.org/",
|
||||
"keywords": [
|
||||
"client",
|
||||
"curl",
|
||||
"framework",
|
||||
"http",
|
||||
"http client",
|
||||
"rest",
|
||||
"web service"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stichoza/google-translate-php",
|
||||
"version": "v3.2.13",
|
||||
"version_normalized": "3.2.13.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Stichoza/google-translate-php.git",
|
||||
"reference": "60adf747a337912d15cb85e492ac804e8e0c294f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Stichoza/google-translate-php/zipball/60adf747a337912d15cb85e492ac804e8e0c294f",
|
||||
"reference": "60adf747a337912d15cb85e492ac804e8e0c294f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/guzzle": "~6.0",
|
||||
"php": ">=5.5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"time": "2017-05-05T11:45:11+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Stichoza\\GoogleTranslate\\": "src/"
|
||||
},
|
||||
"psr-4": {
|
||||
"Stichoza\\GoogleTranslate\\": "src/Stichoza/GoogleTranslate/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Levan Velijanashvili",
|
||||
"email": "me@stichoza.com"
|
||||
}
|
||||
],
|
||||
"description": "Free Google Translate API PHP Package",
|
||||
"homepage": "http://github.com/Stichoza/google-translate-php",
|
||||
"keywords": [
|
||||
"google",
|
||||
"php",
|
||||
"translate"
|
||||
]
|
||||
}
|
||||
]
|
1264
upload/includes/classes/GTvendor/guzzlehttp/guzzle/CHANGELOG.md
Executable file
1264
upload/includes/classes/GTvendor/guzzlehttp/guzzle/CHANGELOG.md
Executable file
File diff suppressed because it is too large
Load diff
19
upload/includes/classes/GTvendor/guzzlehttp/guzzle/LICENSE
Executable file
19
upload/includes/classes/GTvendor/guzzlehttp/guzzle/LICENSE
Executable file
|
@ -0,0 +1,19 @@
|
|||
Copyright (c) 2011-2016 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
89
upload/includes/classes/GTvendor/guzzlehttp/guzzle/README.md
Executable file
89
upload/includes/classes/GTvendor/guzzlehttp/guzzle/README.md
Executable file
|
@ -0,0 +1,89 @@
|
|||
Guzzle, PHP HTTP client
|
||||
=======================
|
||||
|
||||
[](https://travis-ci.org/guzzle/guzzle)
|
||||
|
||||
Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
|
||||
trivial to integrate with web services.
|
||||
|
||||
- Simple interface for building query strings, POST requests, streaming large
|
||||
uploads, streaming large downloads, using HTTP cookies, uploading JSON data,
|
||||
etc...
|
||||
- Can send both synchronous and asynchronous requests using the same interface.
|
||||
- Uses PSR-7 interfaces for requests, responses, and streams. This allows you
|
||||
to utilize other PSR-7 compatible libraries with Guzzle.
|
||||
- Abstracts away the underlying HTTP transport, allowing you to write
|
||||
environment and transport agnostic code; i.e., no hard dependency on cURL,
|
||||
PHP streams, sockets, or non-blocking event loops.
|
||||
- Middleware system allows you to augment and compose client behavior.
|
||||
|
||||
```php
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
|
||||
echo $res->getStatusCode();
|
||||
// 200
|
||||
echo $res->getHeaderLine('content-type');
|
||||
// 'application/json; charset=utf8'
|
||||
echo $res->getBody();
|
||||
// '{"id": 1420053, "name": "guzzle", ...}'
|
||||
|
||||
// Send an asynchronous request.
|
||||
$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
|
||||
$promise = $client->sendAsync($request)->then(function ($response) {
|
||||
echo 'I completed! ' . $response->getBody();
|
||||
});
|
||||
$promise->wait();
|
||||
```
|
||||
|
||||
## Help and docs
|
||||
|
||||
- [Documentation](http://guzzlephp.org/)
|
||||
- [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle)
|
||||
- [Gitter](https://gitter.im/guzzle/guzzle)
|
||||
|
||||
|
||||
## Installing Guzzle
|
||||
|
||||
The recommended way to install Guzzle is through
|
||||
[Composer](http://getcomposer.org).
|
||||
|
||||
```bash
|
||||
# Install Composer
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
```
|
||||
|
||||
Next, run the Composer command to install the latest stable version of Guzzle:
|
||||
|
||||
```bash
|
||||
php composer.phar require guzzlehttp/guzzle
|
||||
```
|
||||
|
||||
After installing, you need to require Composer's autoloader:
|
||||
|
||||
```php
|
||||
require 'vendor/autoload.php';
|
||||
```
|
||||
|
||||
You can then later update Guzzle using composer:
|
||||
|
||||
```bash
|
||||
composer.phar update
|
||||
```
|
||||
|
||||
|
||||
## Version Guidance
|
||||
|
||||
| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version |
|
||||
|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------|
|
||||
| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 |
|
||||
| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 |
|
||||
| 5.x | Maintained | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 |
|
||||
| 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 |
|
||||
|
||||
[guzzle-3-repo]: https://github.com/guzzle/guzzle3
|
||||
[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x
|
||||
[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
|
||||
[guzzle-6-repo]: https://github.com/guzzle/guzzle
|
||||
[guzzle-3-docs]: http://guzzle3.readthedocs.org/en/latest/
|
||||
[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/
|
||||
[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/
|
1203
upload/includes/classes/GTvendor/guzzlehttp/guzzle/UPGRADING.md
Executable file
1203
upload/includes/classes/GTvendor/guzzlehttp/guzzle/UPGRADING.md
Executable file
File diff suppressed because it is too large
Load diff
44
upload/includes/classes/GTvendor/guzzlehttp/guzzle/composer.json
Executable file
44
upload/includes/classes/GTvendor/guzzlehttp/guzzle/composer.json
Executable file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"type": "library",
|
||||
"description": "Guzzle is a PHP HTTP client library",
|
||||
"keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"],
|
||||
"homepage": "http://guzzlephp.org/",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"guzzlehttp/psr7": "^1.4",
|
||||
"guzzlehttp/promises": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "^4.0 || ^5.0",
|
||||
"psr/log": "^1.0"
|
||||
},
|
||||
"autoload": {
|
||||
"files": ["src/functions_include.php"],
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log": "Required for using the Log middleware"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.2-dev"
|
||||
}
|
||||
}
|
||||
}
|
414
upload/includes/classes/GTvendor/guzzlehttp/guzzle/src/Client.php
Executable file
414
upload/includes/classes/GTvendor/guzzlehttp/guzzle/src/Client.php
Executable file
|
@ -0,0 +1,414 @@
|
|||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Cookie\CookieJar;
|
||||
use GuzzleHttp\Promise;
|
||||
use GuzzleHttp\Psr7;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* @method ResponseInterface get(string|UriInterface $uri, array $options = [])
|
||||
* @method ResponseInterface head(string|UriInterface $uri, array $options = [])
|
||||
* @method ResponseInterface put(string|UriInterface $uri, array $options = [])
|
||||
* @method ResponseInterface post(string|UriInterface $uri, array $options = [])
|
||||
* @method ResponseInterface patch(string|UriInterface $uri, array $options = [])
|
||||
* @method ResponseInterface delete(string|UriInterface $uri, array $options = [])
|
||||
* @method Promise\PromiseInterface getAsync(string|UriInterface $uri, array $options = [])
|
||||
* @method Promise\PromiseInterface headAsync(string|UriInterface $uri, array $options = [])
|
||||
* @method Promise\PromiseInterface putAsync(string|UriInterface $uri, array $options = [])
|
||||
* @method Promise\PromiseInterface postAsync(string|UriInterface $uri, array $options = [])
|
||||
* @method Promise\PromiseInterface patchAsync(string|UriInterface $uri, array $options = [])
|
||||
* @method Promise\PromiseInterface deleteAsync(string|UriInterface $uri, array $options = [])
|
||||
*/
|
||||
class Client implements ClientInterface
|
||||
{
|
||||
/** @var array Default request options */
|
||||
private $config;
|
||||
|
||||
/**
|
||||
* Clients accept an array of constructor parameters.
|
||||
*
|
||||
* Here's an example of creating a client using a base_uri and an array of
|
||||
* default request options to apply to each request:
|
||||
*
|
||||
* $client = new Client([
|
||||
* 'base_uri' => 'http://www.foo.com/1.0/',
|
||||
* 'timeout' => 0,
|
||||
* 'allow_redirects' => false,
|
||||
* 'proxy' => '192.168.16.1:10'
|
||||
* ]);
|
||||
*
|
||||
* Client configuration settings include the following options:
|
||||
*
|
||||
* - handler: (callable) Function that transfers HTTP requests over the
|
||||
* wire. The function is called with a Psr7\Http\Message\RequestInterface
|
||||
* and array of transfer options, and must return a
|
||||
* GuzzleHttp\Promise\PromiseInterface that is fulfilled with a
|
||||
* Psr7\Http\Message\ResponseInterface on success. "handler" is a
|
||||
* constructor only option that cannot be overridden in per/request
|
||||
* options. If no handler is provided, a default handler will be created
|
||||
* that enables all of the request options below by attaching all of the
|
||||
* default middleware to the handler.
|
||||
* - base_uri: (string|UriInterface) Base URI of the client that is merged
|
||||
* into relative URIs. Can be a string or instance of UriInterface.
|
||||
* - **: any request option
|
||||
*
|
||||
* @param array $config Client configuration settings.
|
||||
*
|
||||
* @see \GuzzleHttp\RequestOptions for a list of available request options.
|
||||
*/
|
||||
public function __construct(array $config = [])
|
||||
{
|
||||
if (!isset($config['handler'])) {
|
||||
$config['handler'] = HandlerStack::create();
|
||||
} elseif (!is_callable($config['handler'])) {
|
||||
throw new \InvalidArgumentException('handler must be a callable');
|
||||
}
|
||||
|
||||
// Convert the base_uri to a UriInterface
|
||||
if (isset($config['base_uri'])) {
|
||||
$config['base_uri'] = Psr7\uri_for($config['base_uri']);
|
||||
}
|
||||
|
||||
$this->configureDefaults($config);
|
||||
}
|
||||
|
||||
public function __call($method, $args)
|
||||
{
|
||||
if (count($args) < 1) {
|
||||
throw new \InvalidArgumentException('Magic request methods require a URI and optional options array');
|
||||
}
|
||||
|
||||
$uri = $args[0];
|
||||
$opts = isset($args[1]) ? $args[1] : [];
|
||||
|
||||
return substr($method, -5) === 'Async'
|
||||
? $this->requestAsync(substr($method, 0, -5), $uri, $opts)
|
||||
: $this->request($method, $uri, $opts);
|
||||
}
|
||||
|
||||
public function sendAsync(RequestInterface $request, array $options = [])
|
||||
{
|
||||
// Merge the base URI into the request URI if needed.
|
||||
$options = $this->prepareDefaults($options);
|
||||
|
||||
return $this->transfer(
|
||||
$request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')),
|
||||
$options
|
||||
);
|
||||
}
|
||||
|
||||
public function send(RequestInterface $request, array $options = [])
|
||||
{
|
||||
$options[RequestOptions::SYNCHRONOUS] = true;
|
||||
return $this->sendAsync($request, $options)->wait();
|
||||
}
|
||||
|
||||
public function requestAsync($method, $uri = '', array $options = [])
|
||||
{
|
||||
$options = $this->prepareDefaults($options);
|
||||
// Remove request modifying parameter because it can be done up-front.
|
||||
$headers = isset($options['headers']) ? $options['headers'] : [];
|
||||
$body = isset($options['body']) ? $options['body'] : null;
|
||||
$version = isset($options['version']) ? $options['version'] : '1.1';
|
||||
// Merge the URI into the base URI.
|
||||
$uri = $this->buildUri($uri, $options);
|
||||
if (is_array($body)) {
|
||||
$this->invalidBody();
|
||||
}
|
||||
$request = new Psr7\Request($method, $uri, $headers, $body, $version);
|
||||
// Remove the option so that they are not doubly-applied.
|
||||
unset($options['headers'], $options['body'], $options['version']);
|
||||
|
||||
return $this->transfer($request, $options);
|
||||
}
|
||||
|
||||
public function request($method, $uri = '', array $options = [])
|
||||
{
|
||||
$options[RequestOptions::SYNCHRONOUS] = true;
|
||||
return $this->requestAsync($method, $uri, $options)->wait();
|
||||
}
|
||||
|
||||
public function getConfig($option = null)
|
||||
{
|
||||
return $option === null
|
||||
? $this->config
|
||||
: (isset($this->config[$option]) ? $this->config[$option] : null);
|
||||
}
|
||||
|
||||
private function buildUri($uri, array $config)
|
||||
{
|
||||
// for BC we accept null which would otherwise fail in uri_for
|
||||
$uri = Psr7\uri_for($uri === null ? '' : $uri);
|
||||
|
||||
if (isset($config['base_uri'])) {
|
||||
$uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri);
|
||||
}
|
||||
|
||||
return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the default options for a client.
|
||||
*
|
||||
* @param array $config
|
||||
*/
|
||||
private function configureDefaults(array $config)
|
||||
{
|
||||
$defaults = [
|
||||
'allow_redirects' => RedirectMiddleware::$defaultSettings,
|
||||
'http_errors' => true,
|
||||
'decode_content' => true,
|
||||
'verify' => true,
|
||||
'cookies' => false
|
||||
];
|
||||
|
||||
// Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
|
||||
|
||||
// We can only trust the HTTP_PROXY environment variable in a CLI
|
||||
// process due to the fact that PHP has no reliable mechanism to
|
||||
// get environment variables that start with "HTTP_".
|
||||
if (php_sapi_name() == 'cli' && getenv('HTTP_PROXY')) {
|
||||
$defaults['proxy']['http'] = getenv('HTTP_PROXY');
|
||||
}
|
||||
|
||||
if ($proxy = getenv('HTTPS_PROXY')) {
|
||||
$defaults['proxy']['https'] = $proxy;
|
||||
}
|
||||
|
||||
if ($noProxy = getenv('NO_PROXY')) {
|
||||
$cleanedNoProxy = str_replace(' ', '', $noProxy);
|
||||
$defaults['proxy']['no'] = explode(',', $cleanedNoProxy);
|
||||
}
|
||||
|
||||
$this->config = $config + $defaults;
|
||||
|
||||
if (!empty($config['cookies']) && $config['cookies'] === true) {
|
||||
$this->config['cookies'] = new CookieJar();
|
||||
}
|
||||
|
||||
// Add the default user-agent header.
|
||||
if (!isset($this->config['headers'])) {
|
||||
$this->config['headers'] = ['User-Agent' => default_user_agent()];
|
||||
} else {
|
||||
// Add the User-Agent header if one was not already set.
|
||||
foreach (array_keys($this->config['headers']) as $name) {
|
||||
if (strtolower($name) === 'user-agent') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
$this->config['headers']['User-Agent'] = default_user_agent();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges default options into the array.
|
||||
*
|
||||
* @param array $options Options to modify by reference
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function prepareDefaults($options)
|
||||
{
|
||||
$defaults = $this->config;
|
||||
|
||||
if (!empty($defaults['headers'])) {
|
||||
// Default headers are only added if they are not present.
|
||||
$defaults['_conditional'] = $defaults['headers'];
|
||||
unset($defaults['headers']);
|
||||
}
|
||||
|
||||
// Special handling for headers is required as they are added as
|
||||
// conditional headers and as headers passed to a request ctor.
|
||||
if (array_key_exists('headers', $options)) {
|
||||
// Allows default headers to be unset.
|
||||
if ($options['headers'] === null) {
|
||||
$defaults['_conditional'] = null;
|
||||
unset($options['headers']);
|
||||
} elseif (!is_array($options['headers'])) {
|
||||
throw new \InvalidArgumentException('headers must be an array');
|
||||
}
|
||||
}
|
||||
|
||||
// Shallow merge defaults underneath options.
|
||||
$result = $options + $defaults;
|
||||
|
||||
// Remove null values.
|
||||
foreach ($result as $k => $v) {
|
||||
if ($v === null) {
|
||||
unset($result[$k]);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transfers the given request and applies request options.
|
||||
*
|
||||
* The URI of the request is not modified and the request options are used
|
||||
* as-is without merging in default options.
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @param array $options
|
||||
*
|
||||
* @return Promise\PromiseInterface
|
||||
*/
|
||||
private function transfer(RequestInterface $request, array $options)
|
||||
{
|
||||
// save_to -> sink
|
||||
if (isset($options['save_to'])) {
|
||||
$options['sink'] = $options['save_to'];
|
||||
unset($options['save_to']);
|
||||
}
|
||||
|
||||
// exceptions -> http_errors
|
||||
if (isset($options['exceptions'])) {
|
||||
$options['http_errors'] = $options['exceptions'];
|
||||
unset($options['exceptions']);
|
||||
}
|
||||
|
||||
$request = $this->applyOptions($request, $options);
|
||||
$handler = $options['handler'];
|
||||
|
||||
try {
|
||||
return Promise\promise_for($handler($request, $options));
|
||||
} catch (\Exception $e) {
|
||||
return Promise\rejection_for($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the array of request options to a request.
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @param array $options
|
||||
*
|
||||
* @return RequestInterface
|
||||
*/
|
||||
private function applyOptions(RequestInterface $request, array &$options)
|
||||
{
|
||||
$modify = [];
|
||||
|
||||
if (isset($options['form_params'])) {
|
||||
if (isset($options['multipart'])) {
|
||||
throw new \InvalidArgumentException('You cannot use '
|
||||
. 'form_params and multipart at the same time. Use the '
|
||||
. 'form_params option if you want to send application/'
|
||||
. 'x-www-form-urlencoded requests, and the multipart '
|
||||
. 'option to send multipart/form-data requests.');
|
||||
}
|
||||
$options['body'] = http_build_query($options['form_params'], '', '&');
|
||||
unset($options['form_params']);
|
||||
$options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||
}
|
||||
|
||||
if (isset($options['multipart'])) {
|
||||
$options['body'] = new Psr7\MultipartStream($options['multipart']);
|
||||
unset($options['multipart']);
|
||||
}
|
||||
|
||||
if (isset($options['json'])) {
|
||||
$options['body'] = \GuzzleHttp\json_encode($options['json']);
|
||||
unset($options['json']);
|
||||
$options['_conditional']['Content-Type'] = 'application/json';
|
||||
}
|
||||
|
||||
if (!empty($options['decode_content'])
|
||||
&& $options['decode_content'] !== true
|
||||
) {
|
||||
$modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
|
||||
}
|
||||
|
||||
if (isset($options['headers'])) {
|
||||
if (isset($modify['set_headers'])) {
|
||||
$modify['set_headers'] = $options['headers'] + $modify['set_headers'];
|
||||
} else {
|
||||
$modify['set_headers'] = $options['headers'];
|
||||
}
|
||||
unset($options['headers']);
|
||||
}
|
||||
|
||||
if (isset($options['body'])) {
|
||||
if (is_array($options['body'])) {
|
||||
$this->invalidBody();
|
||||
}
|
||||
$modify['body'] = Psr7\stream_for($options['body']);
|
||||
unset($options['body']);
|
||||
}
|
||||
|
||||
if (!empty($options['auth']) && is_array($options['auth'])) {
|
||||
$value = $options['auth'];
|
||||
$type = isset($value[2]) ? strtolower($value[2]) : 'basic';
|
||||
switch ($type) {
|
||||
case 'basic':
|
||||
$modify['set_headers']['Authorization'] = 'Basic '
|
||||
. base64_encode("$value[0]:$value[1]");
|
||||
break;
|
||||
case 'digest':
|
||||
// @todo: Do not rely on curl
|
||||
$options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;
|
||||
$options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
|
||||
break;
|
||||
case 'ntlm':
|
||||
$options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM;
|
||||
$options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($options['query'])) {
|
||||
$value = $options['query'];
|
||||
if (is_array($value)) {
|
||||
$value = http_build_query($value, null, '&', PHP_QUERY_RFC3986);
|
||||
}
|
||||
if (!is_string($value)) {
|
||||
throw new \InvalidArgumentException('query must be a string or array');
|
||||
}
|
||||
$modify['query'] = $value;
|
||||
unset($options['query']);
|
||||
}
|
||||
|
||||
// Ensure that sink is not an invalid value.
|
||||
if (isset($options['sink'])) {
|
||||
// TODO: Add more sink validation?
|
||||
if (is_bool($options['sink'])) {
|
||||
throw new \InvalidArgumentException('sink must not be a boolean');
|
||||
}
|
||||
}
|
||||
|
||||
$request = Psr7\modify_request($request, $modify);
|
||||
if ($request->getBody() instanceof Psr7\MultipartStream) {
|
||||
// Use a multipart/form-data POST if a Content-Type is not set.
|
||||
$options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
|
||||
. $request->getBody()->getBoundary();
|
||||
}
|
||||
|
||||
// Merge in conditional headers if they are not present.
|
||||
if (isset($options['_conditional'])) {
|
||||
// Build up the changes so it's in a single clone of the message.
|
||||
$modify = [];
|
||||
foreach ($options['_conditional'] as $k => $v) {
|
||||
if (!$request->hasHeader($k)) {
|
||||
$modify['set_headers'][$k] = $v;
|
||||
}
|
||||
}
|
||||
$request = Psr7\modify_request($request, $modify);
|
||||
// Don't pass this internal value along to middleware/handlers.
|
||||
unset($options['_conditional']);
|
||||
}
|
||||
|
||||
return $request;
|
||||
}
|
||||
|
||||
private function invalidBody()
|
||||
{
|
||||
throw new \InvalidArgumentException('Passing in the "body" request '
|
||||
. 'option as an array to send a POST request has been deprecated. '
|
||||
. 'Please use the "form_params" request option to send a '
|
||||
. 'application/x-www-form-urlencoded request, or the "multipart" '
|
||||
. 'request option to send a multipart/form-data request.');
|
||||
}
|
||||
}
|
84
upload/includes/classes/GTvendor/guzzlehttp/guzzle/src/ClientInterface.php
Executable file
84
upload/includes/classes/GTvendor/guzzlehttp/guzzle/src/ClientInterface.php
Executable file
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
|
||||
/**
|
||||
* Client interface for sending HTTP requests.
|
||||
*/
|
||||
interface ClientInterface
|
||||
{
|
||||
const VERSION = '6.2.1';
|
||||
|
||||
/**
|
||||
* Send an HTTP request.
|
||||
*
|
||||
* @param RequestInterface $request Request to send
|
||||
* @param array $options Request options to apply to the given
|
||||
* request and to the transfer.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function send(RequestInterface $request, array $options = []);
|
||||
|
||||
/**
|
||||
* Asynchronously send an HTTP request.
|
||||
*
|
||||
* @param RequestInterface $request Request to send
|
||||
* @param array $options Request options to apply to the given
|
||||
* request and to the transfer.
|
||||
*
|
||||
* @return PromiseInterface
|
||||
*/
|
||||
public function sendAsync(RequestInterface $request, array $options = []);
|
||||
|
||||
/**
|
||||
* Create and send an HTTP request.
|
||||
*
|
||||
* Use an absolute path to override the base path of the client, or a
|
||||
* relative path to append to the base path of the client. The URL can
|
||||
* contain the query string as well.
|
||||
*
|
||||
* @param string $method HTTP method.
|
||||
* @param string|UriInterface $uri URI object or string.
|
||||
* @param array $options Request options to apply.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function request($method, $uri, array $options = []);
|
||||
|
||||
/**
|
||||
* Create and send an asynchronous HTTP request.
|
||||
*
|
||||
* Use an absolute path to override the base path of the client, or a
|
||||
* relative path to append to the base path of the client. The URL can
|
||||
* contain the query string as well. Use an array to provide a URL
|
||||
* template and additional variables to use in the URL template expansion.
|
||||
*
|
||||
* @param string $method HTTP method
|
||||
* @param string|UriInterface $uri URI object or string.
|
||||
* @param array $options Request options to apply.
|
||||
*
|
||||
* @return PromiseInterface
|
||||
*/
|
||||
public function requestAsync($method, $uri, array $options = []);
|
||||
|
||||
/**
|
||||
* Get a client configuration option.
|
||||
*
|
||||
* These options include default request options of the client, a "handler"
|
||||
* (if utilized by the concrete client), and a "base_uri" if utilized by
|
||||
* the concrete client.
|
||||
*
|
||||
* @param string|null $option The config option to retrieve.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getConfig($option = null);
|
||||
}
|
314
upload/includes/classes/GTvendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
Executable file
314
upload/includes/classes/GTvendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
Executable file
|
@ -0,0 +1,314 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Cookie;
|
||||
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Cookie jar that stores cookies as an array
|
||||
*/
|
||||
class CookieJar implements CookieJarInterface
|
||||
{
|
||||
/** @var SetCookie[] Loaded cookie data */
|
||||
private $cookies = [];
|
||||
|
||||
/** @var bool */
|
||||
private $strictMode;
|
||||
|
||||
/**
|
||||
* @param bool $strictMode Set to true to throw exceptions when invalid
|
||||
* cookies are added to the cookie jar.
|
||||
* @param array $cookieArray Array of SetCookie objects or a hash of
|
||||
* arrays that can be used with the SetCookie
|
||||
* constructor
|
||||
*/
|
||||
public function __construct($strictMode = false, $cookieArray = [])
|
||||
{
|
||||
$this->strictMode = $strictMode;
|
||||
|
||||
foreach ($cookieArray as $cookie) {
|
||||
if (!($cookie instanceof SetCookie)) {
|
||||
$cookie = new SetCookie($cookie);
|
||||
}
|
||||
$this->setCookie($cookie);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Cookie jar from an associative array and domain.
|
||||
*
|
||||
* @param array $cookies Cookies to create the jar from
|
||||
* @param string $domain Domain to set the cookies to
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public static function fromArray(array $cookies, $domain)
|
||||
{
|
||||
$cookieJar = new self();
|
||||
foreach ($cookies as $name => $value) {
|
||||
$cookieJar->setCookie(new SetCookie([
|
||||
'Domain' => $domain,
|
||||
'Name' => $name,
|
||||
'Value' => $value,
|
||||
'Discard' => true
|
||||
]));
|
||||
}
|
||||
|
||||
return $cookieJar;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public static function getCookieValue($value)
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluate if this cookie should be persisted to storage
|
||||
* that survives between requests.
|
||||
*
|
||||
* @param SetCookie $cookie Being evaluated.
|
||||
* @param bool $allowSessionCookies If we should persist session cookies
|
||||
* @return bool
|
||||
*/
|
||||
public static function shouldPersist(
|
||||
SetCookie $cookie,
|
||||
$allowSessionCookies = false
|
||||
) {
|
||||
if ($cookie->getExpires() || $allowSessionCookies) {
|
||||
if (!$cookie->getDiscard()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds and returns the cookie based on the name
|
||||
*
|
||||
* @param string $name cookie name to search for
|
||||
* @return SetCookie|null cookie that was found or null if not found
|
||||
*/
|
||||
public function getCookieByName($name)
|
||||
{
|
||||
// don't allow a null name
|
||||
if($name === null) {
|
||||
return null;
|
||||
}
|
||||
foreach($this->cookies as $cookie) {
|
||||
if($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) {
|
||||
return $cookie;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function toArray()
|
||||
{
|
||||
return array_map(function (SetCookie $cookie) {
|
||||
return $cookie->toArray();
|
||||
}, $this->getIterator()->getArrayCopy());
|
||||
}
|
||||
|
||||
public function clear($domain = null, $path = null, $name = null)
|
||||
{
|
||||
if (!$domain) {
|
||||
$this->cookies = [];
|
||||
return;
|
||||
} elseif (!$path) {
|
||||
$this->cookies = array_filter(
|
||||
$this->cookies,
|
||||
function (SetCookie $cookie) use ($path, $domain) {
|
||||
return !$cookie->matchesDomain($domain);
|
||||
}
|
||||
);
|
||||
} elseif (!$name) {
|
||||
$this->cookies = array_filter(
|
||||
$this->cookies,
|
||||
function (SetCookie $cookie) use ($path, $domain) {
|
||||
return !($cookie->matchesPath($path) &&
|
||||
$cookie->matchesDomain($domain));
|
||||
}
|
||||
);
|
||||
} else {
|
||||
$this->cookies = array_filter(
|
||||
$this->cookies,
|
||||
function (SetCookie $cookie) use ($path, $domain, $name) {
|
||||
return !($cookie->getName() == $name &&
|
||||
$cookie->matchesPath($path) &&
|
||||
$cookie->matchesDomain($domain));
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function clearSessionCookies()
|
||||
{
|
||||
$this->cookies = array_filter(
|
||||
$this->cookies,
|
||||
function (SetCookie $cookie) {
|
||||
return !$cookie->getDiscard() && $cookie->getExpires();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public function setCookie(SetCookie $cookie)
|
||||
{
|
||||
// If the name string is empty (but not 0), ignore the set-cookie
|
||||
// string entirely.
|
||||
$name = $cookie->getName();
|
||||
if (!$name && $name !== '0') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only allow cookies with set and valid domain, name, value
|
||||
$result = $cookie->validate();
|
||||
if ($result !== true) {
|
||||
if ($this->strictMode) {
|
||||
throw new \RuntimeException('Invalid cookie: ' . $result);
|
||||
} else {
|
||||
$this->removeCookieIfEmpty($cookie);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Resolve conflicts with previously set cookies
|
||||
foreach ($this->cookies as $i => $c) {
|
||||
|
||||
// Two cookies are identical, when their path, and domain are
|
||||
// identical.
|
||||
if ($c->getPath() != $cookie->getPath() ||
|
||||
$c->getDomain() != $cookie->getDomain() ||
|
||||
$c->getName() != $cookie->getName()
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// The previously set cookie is a discard cookie and this one is
|
||||
// not so allow the new cookie to be set
|
||||
if (!$cookie->getDiscard() && $c->getDiscard()) {
|
||||
unset($this->cookies[$i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// If the new cookie's expiration is further into the future, then
|
||||
// replace the old cookie
|
||||
if ($cookie->getExpires() > $c->getExpires()) {
|
||||
unset($this->cookies[$i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// If the value has changed, we better change it
|
||||
if ($cookie->getValue() !== $c->getValue()) {
|
||||
unset($this->cookies[$i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// The cookie exists, so no need to continue
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->cookies[] = $cookie;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function count()
|
||||
{
|
||||
return count($this->cookies);
|
||||
}
|
||||
|
||||
public function getIterator()
|
||||
{
|
||||
return new \ArrayIterator(array_values($this->cookies));
|
||||
}
|
||||
|
||||
public function extractCookies(
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response
|
||||
) {
|
||||
if ($cookieHeader = $response->getHeader('Set-Cookie')) {
|
||||
foreach ($cookieHeader as $cookie) {
|
||||
$sc = SetCookie::fromString($cookie);
|
||||
if (!$sc->getDomain()) {
|
||||
$sc->setDomain($request->getUri()->getHost());
|
||||
}
|
||||
if (0 !== strpos($sc->getPath(), '/')) {
|
||||
$sc->setPath($this->getCookiePathFromRequest($request));
|
||||
}
|
||||
$this->setCookie($sc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes cookie path following RFC 6265 section 5.1.4
|
||||
*
|
||||
* @link https://tools.ietf.org/html/rfc6265#section-5.1.4
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @return string
|
||||
*/
|
||||
private function getCookiePathFromRequest(RequestInterface $request)
|
||||
{
|
||||
$uriPath = $request->getUri()->getPath();
|
||||
if ('' === $uriPath) {
|
||||
return '/';
|
||||
}
|
||||
if (0 !== strpos($uriPath, '/')) {
|
||||
return '/';
|
||||
}
|
||||
if ('/' === $uriPath) {
|
||||
return '/';
|
||||
}
|
||||
if (0 === $lastSlashPos = strrpos($uriPath, '/')) {
|
||||
return '/';
|
||||
}
|
||||
|
||||
return substr($uriPath, 0, $lastSlashPos);
|
||||
}
|
||||
|
||||
public function withCookieHeader(RequestInterface $request)
|
||||
{
|
||||
$values = [];
|
||||
$uri = $request->getUri();
|
||||
$scheme = $uri->getScheme();
|
||||
$host = $uri->getHost();
|
||||
$path = $uri->getPath() ?: '/';
|
||||
|
||||
foreach ($this->cookies as $cookie) {
|
||||
if ($cookie->matchesPath($path) &&
|
||||
$cookie->matchesDomain($host) &&
|
||||
!$cookie->isExpired() &&
|
||||
(!$cookie->getSecure() || $scheme === 'https')
|
||||
) {
|
||||
$values[] = $cookie->getName() . '='
|
||||
. $cookie->getValue();
|
||||
}
|
||||
}
|
||||
|
||||
return $values
|
||||
? $request->withHeader('Cookie', implode('; ', $values))
|
||||
: $request;
|
||||
}
|
||||
|
||||
/**
|
||||
* If a cookie already exists and the server asks to set it again with a
|
||||
* null value, the cookie must be deleted.
|
||||
*
|
||||
* @param SetCookie $cookie
|
||||
*/
|
||||
private function removeCookieIfEmpty(SetCookie $cookie)
|
||||
{
|
||||
$cookieValue = $cookie->getValue();
|
||||
if ($cookieValue === null || $cookieValue === '') {
|
||||
$this->clear(
|
||||
$cookie->getDomain(),
|
||||
$cookie->getPath(),
|
||||
$cookie->getName()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Cookie;
|
||||
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Stores HTTP cookies.
|
||||
*
|
||||
* It extracts cookies from HTTP requests, and returns them in HTTP responses.
|
||||
* CookieJarInterface instances automatically expire contained cookies when
|
||||
* necessary. Subclasses are also responsible for storing and retrieving
|
||||
* cookies from a file, database, etc.
|
||||
*
|
||||
* @link http://docs.python.org/2/library/cookielib.html Inspiration
|
||||
*/
|
||||
interface CookieJarInterface extends \Countable, \IteratorAggregate
|
||||
{
|
||||
/**
|
||||
* Create a request with added cookie headers.
|
||||
*
|
||||
* If no matching cookies are found in the cookie jar, then no Cookie
|
||||
* header is added to the request and the same request is returned.
|
||||
*
|
||||
* @param RequestInterface $request Request object to modify.
|
||||
*
|
||||
* @return RequestInterface returns the modified request.
|
||||
*/
|
||||
public function withCookieHeader(RequestInterface $request);
|
||||
|
||||
/**
|
||||
* Extract cookies from an HTTP response and store them in the CookieJar.
|
||||
*
|
||||
* @param RequestInterface $request Request that was sent
|
||||
* @param ResponseInterface $response Response that was received
|
||||
*/
|
||||
public function extractCookies(
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response
|
||||
);
|
||||
|
||||
/**
|
||||
* Sets a cookie in the cookie jar.
|
||||
*
|
||||
* @param SetCookie $cookie Cookie to set.
|
||||
*
|
||||
* @return bool Returns true on success or false on failure
|
||||
*/
|
||||
public function setCookie(SetCookie $cookie);
|
||||
|
||||
/**
|
||||
* Remove cookies currently held in the cookie jar.
|
||||
*
|
||||
* Invoking this method without arguments will empty the whole cookie jar.
|
||||
* If given a $domain argument only cookies belonging to that domain will
|
||||
* be removed. If given a $domain and $path argument, cookies belonging to
|
||||
* the specified path within that domain are removed. If given all three
|
||||
* arguments, then the cookie with the specified name, path and domain is
|
||||
* removed.
|
||||
*
|
||||
* @param string $domain Clears cookies matching a domain
|
||||
* @param string $path Clears cookies matching a domain and path
|
||||
* @param string $name Clears cookies matching a domain, path, and name
|
||||
*
|
||||
* @return CookieJarInterface
|
||||
*/
|
||||
public function clear($domain = null, $path = null, $name = null);
|
||||
|
||||
/**
|
||||
* Discard all sessions cookies.
|
||||
*
|
||||
* Removes cookies that don't have an expire field or a have a discard
|
||||
* field set to true. To be called when the user agent shuts down according
|
||||
* to RFC 2965.
|
||||
*/
|
||||
public function clearSessionCookies();
|
||||
|
||||
/**
|
||||
* Converts the cookie jar to an array.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray();
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Cookie;
|
||||
|
||||
/**
|
||||
* Persists non-session cookies using a JSON formatted file
|
||||
*/
|
||||
class FileCookieJar extends CookieJar
|
||||
{
|
||||
/** @var string filename */
|
||||
private $filename;
|
||||
|
||||
/** @var bool Control whether to persist session cookies or not. */
|
||||
private $storeSessionCookies;
|
||||
|
||||
/**
|
||||
* Create a new FileCookieJar object
|
||||
*
|
||||
* @param string $cookieFile File to store the cookie data
|
||||
* @param bool $storeSessionCookies Set to true to store session cookies
|
||||
* in the cookie jar.
|
||||
*
|
||||
* @throws \RuntimeException if the file cannot be found or created
|
||||
*/
|
||||
public function __construct($cookieFile, $storeSessionCookies = false)
|
||||
{
|
||||
$this->filename = $cookieFile;
|
||||
$this->storeSessionCookies = $storeSessionCookies;
|
||||
|
||||
if (file_exists($cookieFile)) {
|
||||
$this->load($cookieFile);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the file when shutting down
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
$this->save($this->filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the cookies to a file.
|
||||
*
|
||||
* @param string $filename File to save
|
||||
* @throws \RuntimeException if the file cannot be found or created
|
||||
*/
|
||||
public function save($filename)
|
||||
{
|
||||
$json = [];
|
||||
foreach ($this as $cookie) {
|
||||
/** @var SetCookie $cookie */
|
||||
if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
|
||||
$json[] = $cookie->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
$jsonStr = \GuzzleHttp\json_encode($json);
|
||||
if (false === file_put_contents($filename, $jsonStr)) {
|
||||
throw new \RuntimeException("Unable to save file {$filename}");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load cookies from a JSON formatted file.
|
||||
*
|
||||
* Old cookies are kept unless overwritten by newly loaded ones.
|
||||
*
|
||||
* @param string $filename Cookie file to load.
|
||||
* @throws \RuntimeException if the file cannot be loaded.
|
||||
*/
|
||||
public function load($filename)
|
||||
{
|
||||
$json = file_get_contents($filename);
|
||||
if (false === $json) {
|
||||
throw new \RuntimeException("Unable to load file {$filename}");
|
||||
} elseif ($json === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
$data = \GuzzleHttp\json_decode($json, true);
|
||||
if (is_array($data)) {
|
||||
foreach (json_decode($json, true) as $cookie) {
|
||||
$this->setCookie(new SetCookie($cookie));
|
||||
}
|
||||
} elseif (strlen($data)) {
|
||||
throw new \RuntimeException("Invalid cookie file: {$filename}");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Cookie;
|
||||
|
||||
/**
|
||||
* Persists cookies in the client session
|
||||
*/
|
||||
class SessionCookieJar extends CookieJar
|
||||
{
|
||||
/** @var string session key */
|
||||
private $sessionKey;
|
||||
|
||||
/** @var bool Control whether to persist session cookies or not. */
|
||||
private $storeSessionCookies;
|
||||
|
||||
/**
|
||||
* Create a new SessionCookieJar object
|
||||
*
|
||||
* @param string $sessionKey Session key name to store the cookie
|
||||
* data in session
|
||||
* @param bool $storeSessionCookies Set to true to store session cookies
|
||||
* in the cookie jar.
|
||||
*/
|
||||
public function __construct($sessionKey, $storeSessionCookies = false)
|
||||
{
|
||||
$this->sessionKey = $sessionKey;
|
||||
$this->storeSessionCookies = $storeSessionCookies;
|
||||
$this->load();
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves cookies to session when shutting down
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save cookies to the client session
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
$json = [];
|
||||
foreach ($this as $cookie) {
|
||||
/** @var SetCookie $cookie */
|
||||
if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
|
||||
$json[] = $cookie->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION[$this->sessionKey] = json_encode($json);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the contents of the client session into the data array
|
||||
*/
|
||||
protected function load()
|
||||
{
|
||||
if (!isset($_SESSION[$this->sessionKey])) {
|
||||
return;
|
||||
}
|
||||
$data = json_decode($_SESSION[$this->sessionKey], true);
|
||||
if (is_array($data)) {
|
||||
foreach ($data as $cookie) {
|
||||
$this->setCookie(new SetCookie($cookie));
|
||||
}
|
||||
} elseif (strlen($data)) {
|
||||
throw new \RuntimeException("Invalid cookie data");
|
||||
}
|
||||
}
|
||||
}
|
404
upload/includes/classes/GTvendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
Executable file
404
upload/includes/classes/GTvendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
Executable file
|
@ -0,0 +1,404 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Cookie;
|
||||
|
||||
/**
|
||||
* Set-Cookie object
|
||||
*/
|
||||
class SetCookie
|
||||
{
|
||||
/** @var array */
|
||||
private static $defaults = [
|
||||
'Name' => null,
|
||||
'Value' => null,
|
||||
'Domain' => null,
|
||||
'Path' => '/',
|
||||
'Max-Age' => null,
|
||||
'Expires' => null,
|
||||
'Secure' => false,
|
||||
'Discard' => false,
|
||||
'HttpOnly' => false
|
||||
];
|
||||
|
||||
/** @var array Cookie data */
|
||||
private $data;
|
||||
|
||||
/**
|
||||
* Create a new SetCookie object from a string
|
||||
*
|
||||
* @param string $cookie Set-Cookie header string
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public static function fromString($cookie)
|
||||
{
|
||||
// Create the default return array
|
||||
$data = self::$defaults;
|
||||
// Explode the cookie string using a series of semicolons
|
||||
$pieces = array_filter(array_map('trim', explode(';', $cookie)));
|
||||
// The name of the cookie (first kvp) must include an equal sign.
|
||||
if (empty($pieces) || !strpos($pieces[0], '=')) {
|
||||
return new self($data);
|
||||
}
|
||||
|
||||
// Add the cookie pieces into the parsed data array
|
||||
foreach ($pieces as $part) {
|
||||
|
||||
$cookieParts = explode('=', $part, 2);
|
||||
$key = trim($cookieParts[0]);
|
||||
$value = isset($cookieParts[1])
|
||||
? trim($cookieParts[1], " \n\r\t\0\x0B")
|
||||
: true;
|
||||
|
||||
// Only check for non-cookies when cookies have been found
|
||||
if (empty($data['Name'])) {
|
||||
$data['Name'] = $key;
|
||||
$data['Value'] = $value;
|
||||
} else {
|
||||
foreach (array_keys(self::$defaults) as $search) {
|
||||
if (!strcasecmp($search, $key)) {
|
||||
$data[$search] = $value;
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
$data[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return new self($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data Array of cookie data provided by a Cookie parser
|
||||
*/
|
||||
public function __construct(array $data = [])
|
||||
{
|
||||
$this->data = array_replace(self::$defaults, $data);
|
||||
// Extract the Expires value and turn it into a UNIX timestamp if needed
|
||||
if (!$this->getExpires() && $this->getMaxAge()) {
|
||||
// Calculate the Expires date
|
||||
$this->setExpires(time() + $this->getMaxAge());
|
||||
} elseif ($this->getExpires() && !is_numeric($this->getExpires())) {
|
||||
$this->setExpires($this->getExpires());
|
||||
}
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
$str = $this->data['Name'] . '=' . $this->data['Value'] . '; ';
|
||||
foreach ($this->data as $k => $v) {
|
||||
if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) {
|
||||
if ($k === 'Expires') {
|
||||
$str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; ';
|
||||
} else {
|
||||
$str .= ($v === true ? $k : "{$k}={$v}") . '; ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rtrim($str, '; ');
|
||||
}
|
||||
|
||||
public function toArray()
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cookie name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->data['Name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the cookie name
|
||||
*
|
||||
* @param string $name Cookie name
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->data['Name'] = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cookie value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->data['Value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the cookie value
|
||||
*
|
||||
* @param string $value Cookie value
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->data['Value'] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the domain
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDomain()
|
||||
{
|
||||
return $this->data['Domain'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the domain of the cookie
|
||||
*
|
||||
* @param string $domain
|
||||
*/
|
||||
public function setDomain($domain)
|
||||
{
|
||||
$this->data['Domain'] = $domain;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPath()
|
||||
{
|
||||
return $this->data['Path'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the path of the cookie
|
||||
*
|
||||
* @param string $path Path of the cookie
|
||||
*/
|
||||
public function setPath($path)
|
||||
{
|
||||
$this->data['Path'] = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Maximum lifetime of the cookie in seconds
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getMaxAge()
|
||||
{
|
||||
return $this->data['Max-Age'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the max-age of the cookie
|
||||
*
|
||||
* @param int $maxAge Max age of the cookie in seconds
|
||||
*/
|
||||
public function setMaxAge($maxAge)
|
||||
{
|
||||
$this->data['Max-Age'] = $maxAge;
|
||||
}
|
||||
|
||||
/**
|
||||
* The UNIX timestamp when the cookie Expires
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getExpires()
|
||||
{
|
||||
return $this->data['Expires'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the unix timestamp for which the cookie will expire
|
||||
*
|
||||
* @param int $timestamp Unix timestamp
|
||||
*/
|
||||
public function setExpires($timestamp)
|
||||
{
|
||||
$this->data['Expires'] = is_numeric($timestamp)
|
||||
? (int) $timestamp
|
||||
: strtotime($timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not this is a secure cookie
|
||||
*
|
||||
* @return null|bool
|
||||
*/
|
||||
public function getSecure()
|
||||
{
|
||||
return $this->data['Secure'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether or not the cookie is secure
|
||||
*
|
||||
* @param bool $secure Set to true or false if secure
|
||||
*/
|
||||
public function setSecure($secure)
|
||||
{
|
||||
$this->data['Secure'] = $secure;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not this is a session cookie
|
||||
*
|
||||
* @return null|bool
|
||||
*/
|
||||
public function getDiscard()
|
||||
{
|
||||
return $this->data['Discard'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether or not this is a session cookie
|
||||
*
|
||||
* @param bool $discard Set to true or false if this is a session cookie
|
||||
*/
|
||||
public function setDiscard($discard)
|
||||
{
|
||||
$this->data['Discard'] = $discard;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not this is an HTTP only cookie
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getHttpOnly()
|
||||
{
|
||||
return $this->data['HttpOnly'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether or not this is an HTTP only cookie
|
||||
*
|
||||
* @param bool $httpOnly Set to true or false if this is HTTP only
|
||||
*/
|
||||
public function setHttpOnly($httpOnly)
|
||||
{
|
||||
$this->data['HttpOnly'] = $httpOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the cookie matches a path value.
|
||||
*
|
||||
* A request-path path-matches a given cookie-path if at least one of
|
||||
* the following conditions holds:
|
||||
*
|
||||
* - The cookie-path and the request-path are identical.
|
||||
* - The cookie-path is a prefix of the request-path, and the last
|
||||
* character of the cookie-path is %x2F ("/").
|
||||
* - The cookie-path is a prefix of the request-path, and the first
|
||||
* character of the request-path that is not included in the cookie-
|
||||
* path is a %x2F ("/") character.
|
||||
*
|
||||
* @param string $requestPath Path to check against
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function matchesPath($requestPath)
|
||||
{
|
||||
$cookiePath = $this->getPath();
|
||||
|
||||
// Match on exact matches or when path is the default empty "/"
|
||||
if ($cookiePath === '/' || $cookiePath == $requestPath) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Ensure that the cookie-path is a prefix of the request path.
|
||||
if (0 !== strpos($requestPath, $cookiePath)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Match if the last character of the cookie-path is "/"
|
||||
if (substr($cookiePath, -1, 1) === '/') {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Match if the first character not included in cookie path is "/"
|
||||
return substr($requestPath, strlen($cookiePath), 1) === '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the cookie matches a domain value
|
||||
*
|
||||
* @param string $domain Domain to check against
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function matchesDomain($domain)
|
||||
{
|
||||
// Remove the leading '.' as per spec in RFC 6265.
|
||||
// http://tools.ietf.org/html/rfc6265#section-5.2.3
|
||||
$cookieDomain = ltrim($this->getDomain(), '.');
|
||||
|
||||
// Domain not set or exact match.
|
||||
if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Matching the subdomain according to RFC 6265.
|
||||
// http://tools.ietf.org/html/rfc6265#section-5.1.3
|
||||
if (filter_var($domain, FILTER_VALIDATE_IP)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (bool) preg_match('/\.' . preg_quote($cookieDomain) . '$/', $domain);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the cookie is expired
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isExpired()
|
||||
{
|
||||
return $this->getExpires() && time() > $this->getExpires();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the cookie is valid according to RFC 6265
|
||||
*
|
||||
* @return bool|string Returns true if valid or an error message if invalid
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
// Names must not be empty, but can be 0
|
||||
$name = $this->getName();
|
||||
if (empty($name) && !is_numeric($name)) {
|
||||
return 'The cookie name must not be empty';
|
||||
}
|
||||
|
||||
// Check if any of the invalid characters are present in the cookie name
|
||||
if (preg_match(
|
||||
'/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/',
|
||||
$name)
|
||||
) {
|
||||
return 'Cookie name must not contain invalid characters: ASCII '
|
||||
. 'Control characters (0-31;127), space, tab and the '
|
||||
. 'following characters: ()<>@,;:\"/?={}';
|
||||
}
|
||||
|
||||
// Value must not be empty, but can be 0
|
||||
$value = $this->getValue();
|
||||
if (empty($value) && !is_numeric($value)) {
|
||||
return 'The cookie value must not be empty';
|
||||
}
|
||||
|
||||
// Domains must not be empty, but can be 0
|
||||
// A "0" is not a valid internet domain, but may be used as server name
|
||||
// in a private network.
|
||||
$domain = $this->getDomain();
|
||||
if (empty($domain) && !is_numeric($domain)) {
|
||||
return 'The cookie domain must not be empty';
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Exception when an HTTP error occurs (4xx or 5xx error)
|
||||
*/
|
||||
class BadResponseException extends RequestException
|
||||
{
|
||||
public function __construct(
|
||||
$message,
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response = null,
|
||||
\Exception $previous = null,
|
||||
array $handlerContext = []
|
||||
) {
|
||||
if (null === $response) {
|
||||
@trigger_error(
|
||||
'Instantiating the ' . __CLASS__ . ' class without a Response is deprecated since version 6.3 and will be removed in 7.0.',
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
}
|
||||
parent::__construct($message, $request, $response, $previous, $handlerContext);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
/**
|
||||
* Exception when a client error is encountered (4xx codes)
|
||||
*/
|
||||
class ClientException extends BadResponseException {}
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
|
||||
/**
|
||||
* Exception thrown when a connection cannot be established.
|
||||
*
|
||||
* Note that no response is present for a ConnectException
|
||||
*/
|
||||
class ConnectException extends RequestException
|
||||
{
|
||||
public function __construct(
|
||||
$message,
|
||||
RequestInterface $request,
|
||||
\Exception $previous = null,
|
||||
array $handlerContext = []
|
||||
) {
|
||||
parent::__construct($message, $request, null, $previous, $handlerContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasResponse()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
interface GuzzleException {}
|
|
@ -0,0 +1,217 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
|
||||
/**
|
||||
* HTTP Request exception
|
||||
*/
|
||||
class RequestException extends TransferException
|
||||
{
|
||||
/** @var RequestInterface */
|
||||
private $request;
|
||||
|
||||
/** @var ResponseInterface */
|
||||
private $response;
|
||||
|
||||
/** @var array */
|
||||
private $handlerContext;
|
||||
|
||||
public function __construct(
|
||||
$message,
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response = null,
|
||||
\Exception $previous = null,
|
||||
array $handlerContext = []
|
||||
) {
|
||||
// Set the code of the exception if the response is set and not future.
|
||||
$code = $response && !($response instanceof PromiseInterface)
|
||||
? $response->getStatusCode()
|
||||
: 0;
|
||||
parent::__construct($message, $code, $previous);
|
||||
$this->request = $request;
|
||||
$this->response = $response;
|
||||
$this->handlerContext = $handlerContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap non-RequestExceptions with a RequestException
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @param \Exception $e
|
||||
*
|
||||
* @return RequestException
|
||||
*/
|
||||
public static function wrapException(RequestInterface $request, \Exception $e)
|
||||
{
|
||||
return $e instanceof RequestException
|
||||
? $e
|
||||
: new RequestException($e->getMessage(), $request, null, $e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory method to create a new exception with a normalized error message
|
||||
*
|
||||
* @param RequestInterface $request Request
|
||||
* @param ResponseInterface $response Response received
|
||||
* @param \Exception $previous Previous exception
|
||||
* @param array $ctx Optional handler context.
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public static function create(
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response = null,
|
||||
\Exception $previous = null,
|
||||
array $ctx = []
|
||||
) {
|
||||
if (!$response) {
|
||||
return new self(
|
||||
'Error completing request',
|
||||
$request,
|
||||
null,
|
||||
$previous,
|
||||
$ctx
|
||||
);
|
||||
}
|
||||
|
||||
$level = (int) floor($response->getStatusCode() / 100);
|
||||
if ($level === 4) {
|
||||
$label = 'Client error';
|
||||
$className = ClientException::class;
|
||||
} elseif ($level === 5) {
|
||||
$label = 'Server error';
|
||||
$className = ServerException::class;
|
||||
} else {
|
||||
$label = 'Unsuccessful request';
|
||||
$className = __CLASS__;
|
||||
}
|
||||
|
||||
$uri = $request->getUri();
|
||||
$uri = static::obfuscateUri($uri);
|
||||
|
||||
// Client Error: `GET /` resulted in a `404 Not Found` response:
|
||||
// <html> ... (truncated)
|
||||
$message = sprintf(
|
||||
'%s: `%s %s` resulted in a `%s %s` response',
|
||||
$label,
|
||||
$request->getMethod(),
|
||||
$uri,
|
||||
$response->getStatusCode(),
|
||||
$response->getReasonPhrase()
|
||||
);
|
||||
|
||||
$summary = static::getResponseBodySummary($response);
|
||||
|
||||
if ($summary !== null) {
|
||||
$message .= ":\n{$summary}\n";
|
||||
}
|
||||
|
||||
return new $className($message, $request, $response, $previous, $ctx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a short summary of the response
|
||||
*
|
||||
* Will return `null` if the response is not printable.
|
||||
*
|
||||
* @param ResponseInterface $response
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public static function getResponseBodySummary(ResponseInterface $response)
|
||||
{
|
||||
$body = $response->getBody();
|
||||
|
||||
if (!$body->isSeekable()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$size = $body->getSize();
|
||||
|
||||
if ($size === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$summary = $body->read(120);
|
||||
$body->rewind();
|
||||
|
||||
if ($size > 120) {
|
||||
$summary .= ' (truncated...)';
|
||||
}
|
||||
|
||||
// Matches any printable character, including unicode characters:
|
||||
// letters, marks, numbers, punctuation, spacing, and separators.
|
||||
if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $summary;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obfuscates URI if there is an username and a password present
|
||||
*
|
||||
* @param UriInterface $uri
|
||||
*
|
||||
* @return UriInterface
|
||||
*/
|
||||
private static function obfuscateUri($uri)
|
||||
{
|
||||
$userInfo = $uri->getUserInfo();
|
||||
|
||||
if (false !== ($pos = strpos($userInfo, ':'))) {
|
||||
return $uri->withUserInfo(substr($userInfo, 0, $pos), '***');
|
||||
}
|
||||
|
||||
return $uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the request that caused the exception
|
||||
*
|
||||
* @return RequestInterface
|
||||
*/
|
||||
public function getRequest()
|
||||
{
|
||||
return $this->request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the associated response
|
||||
*
|
||||
* @return ResponseInterface|null
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
return $this->response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a response was received
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasResponse()
|
||||
{
|
||||
return $this->response !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get contextual information about the error from the underlying handler.
|
||||
*
|
||||
* The contents of this array will vary depending on which handler you are
|
||||
* using. It may also be just an empty array. Relying on this data will
|
||||
* couple you to a specific handler, but can give more debug information
|
||||
* when needed.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getHandlerContext()
|
||||
{
|
||||
return $this->handlerContext;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
/**
|
||||
* Exception thrown when a seek fails on a stream.
|
||||
*/
|
||||
class SeekException extends \RuntimeException implements GuzzleException
|
||||
{
|
||||
private $stream;
|
||||
|
||||
public function __construct(StreamInterface $stream, $pos = 0, $msg = '')
|
||||
{
|
||||
$this->stream = $stream;
|
||||
$msg = $msg ?: 'Could not seek the stream to position ' . $pos;
|
||||
parent::__construct($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return StreamInterface
|
||||
*/
|
||||
public function getStream()
|
||||
{
|
||||
return $this->stream;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
/**
|
||||
* Exception when a server error is encountered (5xx codes)
|
||||
*/
|
||||
class ServerException extends BadResponseException {}
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
class TooManyRedirectsException extends RequestException {}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue