diff --git a/application/cache/index.html b/application/cache/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/cache/index.html +++ b/application/cache/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/config/autoload.php b/application/config/autoload.php index 7cdc9013c11..4b95fc5b41c 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -58,7 +58,7 @@ | | $autoload['libraries'] = array('user_agent' => 'ua'); */ -$autoload['libraries'] = array(); +$autoload['libraries'] = array('database', 'session', 'form_validation'); /* | ------------------------------------------------------------------- @@ -89,7 +89,7 @@ | | $autoload['helper'] = array('url', 'file'); */ -$autoload['helper'] = array(); +$autoload['helper'] = array('url', 'file', 'form', 'security'); /* | ------------------------------------------------------------------- diff --git a/application/config/config.php b/application/config/config.php index 782b19c74b6..37d79b5cf7e 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -23,7 +23,7 @@ | a PHP script and you can easily do that on your own. | */ -$config['base_url'] = ''; +$config['base_url'] = 'http://localhost/instagram/'; /* |-------------------------------------------------------------------------- @@ -35,7 +35,7 @@ | variable so that it is blank. | */ -$config['index_page'] = 'index.php'; +$config['index_page'] = ''; /* |-------------------------------------------------------------------------- @@ -63,8 +63,6 @@ | For more information please see the user guide: | | https://codeigniter.com/user_guide/general/urls.html -| -| Note: This option is ignored for CLI requests. */ $config['url_suffix'] = ''; @@ -88,7 +86,7 @@ | This determines which character set is used by default in various methods | that require a character set to be provided. | -| See https://secure.php.net/htmlspecialchars for a list of supported charsets. +| See http://php.net/htmlspecialchars for a list of supported charsets. | */ $config['charset'] = 'UTF-8'; @@ -133,7 +131,7 @@ | | $config['composer_autoload'] = '/path/to/vendor/autoload.php'; | -| For more information about Composer, please visit https://getcomposer.org/ +| For more information about Composer, please visit http://getcomposer.org/ | | Note: This will NOT disable or override the CodeIgniter-specific | autoloading (application/config/autoload.php) @@ -159,8 +157,6 @@ | | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! | -| Note: This option is ignored for CLI requests. -| */ $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; @@ -191,6 +187,20 @@ $config['function_trigger'] = 'm'; $config['directory_trigger'] = 'd'; +/* +|-------------------------------------------------------------------------- +| Allow $_GET array +|-------------------------------------------------------------------------- +| +| By default CodeIgniter enables access to the $_GET array. If for some +| reason you would like to disable it, set 'allow_get_array' to FALSE. +| +| WARNING: This feature is DEPRECATED and currently available only +| for backwards compatibility purposes! +| +*/ +$config['allow_get_array'] = TRUE; + /* |-------------------------------------------------------------------------- | Error Logging Threshold @@ -221,7 +231,7 @@ |-------------------------------------------------------------------------- | | Leave this BLANK unless you would like to set something other than the default -| application/logs/ directory. Use a full server path. +| application/logs/ directory. Use a full server path with trailing slash. | */ $config['log_path'] = ''; @@ -269,7 +279,7 @@ |-------------------------------------------------------------------------- | | Leave this BLANK unless you would like to set something other than the default -| application/views/errors/ directory. Use a full server path. +| application/views/errors/ directory. Use a full server path with trailing slash. | */ $config['error_views_path'] = ''; @@ -280,7 +290,7 @@ |-------------------------------------------------------------------------- | | Leave this BLANK unless you would like to set something other than the default -| application/cache/ directory. Use a full server path. +| application/cache/ directory. Use a full server path with trailing slash. | */ $config['cache_path'] = ''; @@ -396,6 +406,34 @@ $config['cookie_secure'] = FALSE; $config['cookie_httponly'] = FALSE; +/* +|-------------------------------------------------------------------------- +| Standardize newlines +|-------------------------------------------------------------------------- +| +| Determines whether to standardize newline characters in input data, +| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value. +| +| WARNING: This feature is DEPRECATED and currently available only +| for backwards compatibility purposes! +| +*/ +$config['standardize_newlines'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Global XSS Filtering +|-------------------------------------------------------------------------- +| +| Determines whether the XSS filter is always active when GET, POST or +| COOKIE data is encountered +| +| WARNING: This feature is DEPRECATED and currently available only +| for backwards compatibility purposes! +| +*/ +$config['global_xss_filtering'] = FALSE; + /* |-------------------------------------------------------------------------- | Cross Site Request Forgery @@ -452,6 +490,20 @@ */ $config['time_reference'] = 'local'; +/* +|-------------------------------------------------------------------------- +| Rewrite PHP Short Tags +|-------------------------------------------------------------------------- +| +| If your PHP installation does not have short tag support enabled CI +| can rewrite the tags on-the-fly, enabling you to utilize that syntax +| in your view files. Options are TRUE or FALSE (boolean) +| +| Note: You need to have eval() enabled for this to work. +| +*/ +$config['rewrite_short_tags'] = FALSE; + /* |-------------------------------------------------------------------------- | Reverse Proxy IPs diff --git a/application/config/constants.php b/application/config/constants.php index fb58784477c..b5b241cd1ae 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -1,6 +1,10 @@ '', 'hostname' => 'localhost', - 'username' => '', + 'username' => 'root', 'password' => '', - 'database' => '', + 'database' => 'ig', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, diff --git a/application/config/index.html b/application/config/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/config/index.html +++ b/application/config/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/config/routes.php b/application/config/routes.php index 8ebf62bfa43..5ed0cf870dc 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -43,12 +43,12 @@ | This is not exactly a route, but allows you to automatically route | controller and method names that contain dashes. '-' isn't a valid | class or method name character, so it requires translation. -| When you set this option to TRUE, it will replace ALL dashes with -| underscores in the controller and method URI segments. +| When you set this option to TRUE, it will replace ALL dashes in the +| controller and method URI segments. | | Examples: my-controller/index -> my_controller/index | my-controller/my-method -> my_controller/my_method */ -$route['default_controller'] = 'welcome'; +$route['default_controller'] = 'Auth'; $route['404_override'] = ''; $route['translate_uri_dashes'] = FALSE; diff --git a/application/config/smileys.php b/application/config/smileys.php new file mode 100644 index 00000000000..abf9a898dde --- /dev/null +++ b/application/config/smileys.php @@ -0,0 +1,64 @@ + array('grin.gif', '19', '19', 'grin'), + ':lol:' => array('lol.gif', '19', '19', 'LOL'), + ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), + ':)' => array('smile.gif', '19', '19', 'smile'), + ';-)' => array('wink.gif', '19', '19', 'wink'), + ';)' => array('wink.gif', '19', '19', 'wink'), + ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), + ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), + ':-S' => array('confused.gif', '19', '19', 'confused'), + ':wow:' => array('surprise.gif', '19', '19', 'surprised'), + ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), + ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), + '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), + ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), + ':P' => array('raspberry.gif', '19', '19', 'raspberry'), + ':blank:' => array('blank.gif', '19', '19', 'blank stare'), + ':long:' => array('longface.gif', '19', '19', 'long face'), + ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), + ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), + ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), + '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), + ':down:' => array('downer.gif', '19', '19', 'downer'), + ':red:' => array('embarrassed.gif', '19', '19', 'red face'), + ':sick:' => array('sick.gif', '19', '19', 'sick'), + ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), + ':-/' => array('hmm.gif', '19', '19', 'hmmm'), + '>:(' => array('mad.gif', '19', '19', 'mad'), + ':mad:' => array('mad.gif', '19', '19', 'mad'), + '>:-(' => array('angry.gif', '19', '19', 'angry'), + ':angry:' => array('angry.gif', '19', '19', 'angry'), + ':zip:' => array('zip.gif', '19', '19', 'zipper'), + ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), + ':ahhh:' => array('shock.gif', '19', '19', 'shock'), + ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), + ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), + ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), + ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), + ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), + ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), + ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), + ':snake:' => array('snake.gif', '19', '19', 'snake'), + ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), + ':question:' => array('question.gif', '19', '19', 'question') + +); diff --git a/application/config/user_agents.php b/application/config/user_agents.php index c866903f6da..c4429aac55f 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -87,8 +87,7 @@ 'amaya' => 'Amaya', 'IBrowse' => 'IBrowse', 'Maxthon' => 'Maxthon', - 'Ubuntu' => 'Ubuntu Web Browser', - 'Vivaldi' => 'Vivaldi' + 'Ubuntu' => 'Ubuntu Web Browser' ); $mobiles = array( diff --git a/application/controllers/Auth.php b/application/controllers/Auth.php new file mode 100644 index 00000000000..12f100723f0 --- /dev/null +++ b/application/controllers/Auth.php @@ -0,0 +1,50 @@ +load->model('M_User'); + } + + public function index() { + $this->form_validation->set_rules('username', 'Username', 'required|trim'); + $this->form_validation->set_rules('password', 'Password', 'required|trim'); + + if ($this->form_validation->run() == FALSE) { + $this->load->view('V_login'); + } else { + $this->_do_login(); + } + } + + private function _do_login() { + $username = $this->input->post('username'); + $password = $this->input->post('password'); + + $user = $this->M_User->checkUser($username, $password); + + // if user avail + if ($user) { + $profile = $this->M_User->getProfile($user['username']); + + $this->session->set_userdata($profile); + redirect('User'); + } else { + redirect('Auth'); + } + } + + public function do_logout() { + $this->session->unset_userdata('username'); + redirect('Auth'); + } + +} + +?> diff --git a/application/controllers/User.php b/application/controllers/User.php new file mode 100644 index 00000000000..ba6c5bee1bc --- /dev/null +++ b/application/controllers/User.php @@ -0,0 +1,88 @@ +session->userdata('username')) { + redirect('Auth'); + } + + $this->load->model('M_User'); + } + + public function index() { + $this->load->view('V_profile'); + } + + public function load_explore() { + $this->load->view('V_explore'); + } + + public function load_feed() { + $this->load->view('V_feed'); + } + + public function load_editProfile() { + $this->load->view('V_edit-profile'); + } + + public function load_uploadPhoto() { + $this->load->view('V_upload-photo'); + } + + public function do_editProfile() { + $this->form_validation->set_rules('name', 'Name', 'required'); + $this->form_validation->set_rules('username', 'Username', 'required|trim'); + $this->form_validation->set_rules('website', 'Website', 'required|trim'); + $this->form_validation->set_rules('bio', 'Bio', 'required'); + $this->form_validation->set_rules('email', 'Email', 'required|trim'); + $this->form_validation->set_rules('phonenumber', 'Phonenumber', 'required|trim'); + $this->form_validation->set_rules('gender', 'Username', 'required'); + + $username = $this->session->userdata('username'); + + $dataProfile = [ + 'name' => $this->input->post('name'), + 'username' => $this->input->post('username'), + 'website' => $this->input->post('website'), + 'bio' => $this->input->post('bio'), + 'email' => $this->input->post('email'), + 'phonenumber' => $this->input->post('phonenumber'), + 'gender' => $this->input->post('gender') + ]; + + $dataUser = [ + 'username' => $this->input->post('username'), + 'email' => $this->input->post('email') + ]; + + $this->M_User->editProfile($dataProfile, $username); + $this->M_User->editUser($dataUser, $username); + $this->session->set_userdata($dataProfile); + redirect('User'); + } + + public function do_uploadPhoto() { + $data = []; + + $upload = $this->M_User->uploadPhoto(); + + if ($upload['result'] == 'success') { + $this->M_User->saveIntoDatabase($upload); + redirect('User'); + } else { + $data['message'] = $upload['error']; + redirect('User/load_uploadPhoto'); + } + } + +} + +?> \ No newline at end of file diff --git a/application/core/index.html b/application/core/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/core/index.html +++ b/application/core/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/helpers/index.html b/application/helpers/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/helpers/index.html +++ b/application/helpers/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/hooks/index.html b/application/hooks/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/hooks/index.html +++ b/application/hooks/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/index.html b/application/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/index.html +++ b/application/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/language/english/index.html b/application/language/english/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/language/english/index.html +++ b/application/language/english/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/language/index.html b/application/language/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/language/index.html +++ b/application/language/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/libraries/index.html b/application/libraries/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/libraries/index.html +++ b/application/libraries/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/logs/index.html b/application/logs/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/logs/index.html +++ b/application/logs/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/models/M_User.php b/application/models/M_User.php new file mode 100644 index 00000000000..7d7f2c57c40 --- /dev/null +++ b/application/models/M_User.php @@ -0,0 +1,68 @@ +db->get_where('user', [ + 'username' => $username, + 'password' => $password + ])->row_array(); + } + + public function getProfile($username) { + return $this->db->get_where('profile', [ + 'username' => $username + ])->row_array(); + } + + public function editProfile($data, $username) { + $this->db->where('username', $username); + $this->db->update('profile', $data); + } + + public function editUser($data, $username) { + $this->db->where('username', $username); + $this->db->update('user', $data); + } + + // Upload Image ----------------------------- + public function uploadPhoto() { + $config['upload_path'] = './assets/images/'; + $config['allowed_types'] = 'jpg|png|jpeg'; + $config['max_size'] = 2048; + $config['remove_spcae'] = TRUE; + + $this->load->library('upload', $config); + if ($this->upload->do_upload('image')) { + $result = [ + 'result' => 'success', + 'file' => $this->upload->data(), + 'error' => '', + ]; + return $result; + } else { + $result = [ + 'result' => 'error', + 'file' => '', + 'error' => $this->upload->display_errors(), + ]; + return $result; + } + } + + public function saveIntoDatabase($upload) { + $data = [ + 'url' => $upload['file']['file_name'], + 'caption' => $this->input->post('caption'), + 'like' => 225, + ]; + $this->db->insert('photo', $data); + } + +} + +?> \ No newline at end of file diff --git a/application/third_party/index.html b/application/third_party/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/third_party/index.html +++ b/application/third_party/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/views/V_edit-profile.php b/application/views/V_edit-profile.php new file mode 100644 index 00000000000..0eb08e97518 --- /dev/null +++ b/application/views/V_edit-profile.php @@ -0,0 +1,120 @@ + + + + + + + + + + + Edit Profile | Vietgram + + + + + + +
+
+
+
+ +
+

Edit your profile, session->userdata('username') ?>.

+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/application/views/V_explore.php b/application/views/V_explore.php new file mode 100644 index 00000000000..c344a332d35 --- /dev/null +++ b/application/views/V_explore.php @@ -0,0 +1,117 @@ + + + + + + + + + + + Explore | Vietgram + + + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/application/views/V_feed.php b/application/views/V_feed.php new file mode 100644 index 00000000000..ce7d34bea3e --- /dev/null +++ b/application/views/V_feed.php @@ -0,0 +1,218 @@ + + + + + + + + + + + Feed | Vietgram + + + + + + +
+ + db->select('*'); + $this->db->from('photo'); + $this->db->like('caption', $_GET['caption']); + $query_image = $this->db->get()->result_array(); + } else { + $query_image = $this->db->get('photo')->result_array(); + } + + // Show image + foreach ($query_image as $row) { + ?> +
+
+ + +
+ +
+
+ + + + + + +
+ +
    +
  • + harissubekti +
  • +
+ 2 hours ago +
+ + +
+
+
+ + +
+
+ + +
+ +
+
+ + + + + + +
+ +
    +
  • + haris love this! +
  • +
  • + haris love this! +
  • +
  • + haris love this! +
  • +
  • + haris love this! +
  • +
+ 2 hours ago +
+ + +
+
+
+
+
+ + +
+ +
+
+ + + + + + +
+ +
    +
  • + haris love this! +
  • +
  • + haris love this! +
  • +
  • + haris love this! +
  • +
  • + haris love this! +
  • +
+ 2 hours ago +
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/application/views/V_login.php b/application/views/V_login.php new file mode 100644 index 00000000000..dd0031cc6fc --- /dev/null +++ b/application/views/V_login.php @@ -0,0 +1,73 @@ + + + + + + + Vietgram | Login + + + + + + + + +
+
+ +
+
+ + + +
+
+ + + \ No newline at end of file diff --git a/application/views/V_profile.php b/application/views/V_profile.php new file mode 100644 index 00000000000..b501c4e117b --- /dev/null +++ b/application/views/V_profile.php @@ -0,0 +1,184 @@ + + + + + + + + + + + Profile | Vietgram + + + + + + +
+
+
+ +
+
+
+

session->userdata('username'); ?>

+ Edit profile + Upload photo + Logout + +
+
    +
  • + 6 posts +
  • +
  • + 435 followers +
  • +
  • + 479 following +
  • +
+ +

+ + session->userdata('name'); ?> +
+
+ session->userdata('bio'); ?> + session->userdata('website'); ?> +

+
+
+
+ + db->get('photo')->result_array(); + foreach ($query_image as $row) { ?> +
+ " /> +
+ + + + + + + 344 + +
+
+ +
+ +
+ + + 486 + + + + 344 + +
+
+
+ +
+ + + 486 + + + + 344 + +
+
+
+ +
+ + + 486 + + + + 344 + +
+
+
+ +
+ + + 486 + + + + 344 + +
+
+
+
+ + + + \ No newline at end of file diff --git a/application/views/V_upload-photo.php b/application/views/V_upload-photo.php new file mode 100644 index 00000000000..f4190ad5df1 --- /dev/null +++ b/application/views/V_upload-photo.php @@ -0,0 +1,58 @@ + + + + + + + + + + Document + + + + + + + + + + + + + +
+
+
+

Upload your photo.

+
+
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+ + + \ No newline at end of file diff --git a/application/views/box-model.html b/application/views/box-model.html new file mode 100644 index 00000000000..a52be8be767 --- /dev/null +++ b/application/views/box-model.html @@ -0,0 +1,42 @@ + + + + + + + Box Model + + + +
+
+
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/application/views/errors/cli/index.html b/application/views/errors/cli/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/views/errors/cli/index.html +++ b/application/views/errors/cli/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/views/errors/html/error_404.php b/application/views/errors/html/error_404.php index d2f888c3f81..756ea9d6209 100644 --- a/application/views/errors/html/error_404.php +++ b/application/views/errors/html/error_404.php @@ -3,85 +3,62 @@ ?> - - 404 Page Not Found - +p { + margin: 12px 15px 12px 15px; +} +

-
- -
+
- + \ No newline at end of file diff --git a/application/views/errors/html/error_db.php b/application/views/errors/html/error_db.php index 23b0655fedc..f5a43f6382d 100644 --- a/application/views/errors/html/error_db.php +++ b/application/views/errors/html/error_db.php @@ -3,85 +3,62 @@ ?> - - Database Error - +p { + margin: 12px 15px 12px 15px; +} +

-
- -
+
- + \ No newline at end of file diff --git a/application/views/errors/html/error_exception.php b/application/views/errors/html/error_exception.php index befa12955e9..87848866af3 100644 --- a/application/views/errors/html/error_exception.php +++ b/application/views/errors/html/error_exception.php @@ -2,31 +2,31 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ?> -
+
-

An uncaught Exception was encountered

+

An uncaught Exception was encountered

-

Type:

-

Message:

-

Filename: getFile(); ?>

-

Line Number: getLine(); ?>

+

Type:

+

Message:

+

Filename: getFile(); ?>

+

Line Number: getLine(); ?>

- + -

Backtrace:

- getTrace() as $error): ?> +

Backtrace:

+ getTrace() as $error): ?> - + -

- File:
- Line:
- Function: -

- +

+ File:
+ Line:
+ Function: +

+ - + - + -
+
\ No newline at end of file diff --git a/application/views/errors/html/error_general.php b/application/views/errors/html/error_general.php index ad106640970..fc3b2ebadba 100644 --- a/application/views/errors/html/error_general.php +++ b/application/views/errors/html/error_general.php @@ -3,85 +3,62 @@ ?> - - Error - +p { + margin: 12px 15px 12px 15px; +} +

-
- -
+
- + \ No newline at end of file diff --git a/application/views/errors/html/error_php.php b/application/views/errors/html/error_php.php index 8b445ef3960..b146f9c5bd3 100644 --- a/application/views/errors/html/error_php.php +++ b/application/views/errors/html/error_php.php @@ -2,32 +2,32 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ?> -
+
-

A PHP Error was encountered

+

A PHP Error was encountered

-

Severity:

-

Message:

-

Filename:

-

Line Number:

+

Severity:

+

Message:

+

Filename:

+

Line Number:

- + -

Backtrace:

- +

Backtrace:

+ - + -

- File:
- Line:
- Function: -

+

+ File:
+ Line:
+ Function: +

- + - + - + -
+
\ No newline at end of file diff --git a/application/views/errors/html/index.html b/application/views/errors/html/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/views/errors/html/index.html +++ b/application/views/errors/html/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/views/errors/index.html b/application/views/errors/index.html index bcb7cae3433..b702fbc3967 100644 --- a/application/views/errors/index.html +++ b/application/views/errors/index.html @@ -1,5 +1,5 @@ - + 403 Forbidden diff --git a/application/views/links.html b/application/views/links.html new file mode 100644 index 00000000000..ab039d8f678 --- /dev/null +++ b/application/views/links.html @@ -0,0 +1,25 @@ + + + + + + + + Links 4 u + + + + + \ No newline at end of file diff --git a/assets/css/edit-profile.css b/assets/css/edit-profile.css new file mode 100644 index 00000000000..75465431998 --- /dev/null +++ b/assets/css/edit-profile.css @@ -0,0 +1,100 @@ +#edit-profile { + display: flex; + justify-content: center; +} + +#edit-profile .edit-profile__container { + background-color: white; + border: 1px solid #e6e6e6; + width: 100%; + max-width: 800px; +} + +#edit-profile .edit-profile__container { + padding: 40px 0; +} + +#edit-profile .edit-profile__header { + display: flex; + align-items: center; + margin-bottom: 50px; +} + +.edit-profile__header .edit-profile__avatar-container { + width: 200px; +} + +.edit-profile__avatar-container { + display: flex; + justify-content: flex-end; + margin-right: 35px; +} + +.edit-profile__avatar-container img { + width: 38px; + height: 38px; + border-radius: 50%; +} +.edit-profile__header h4 { + font-size: 18px; + font-weight: 600; +} + +.edit-profile__form .form__row { + display: flex; +} + +.form__row { + margin-bottom: 20px; + display: flex; + align-items: center; +} + +.form__row .form__label { + width: 200px; + display: block; + text-align: right; + margin-right: 35px; + font-weight: 600; + font-size: 16px; +} + +.form__row label { + font-size: 15px; + width: 80%; +} + +.form__row .form__input, +.form__row textarea { + padding: 8px; + width: 255px; + resize: vertical; + border: 0; + border: 1px solid #e6e6e6; + border-radius: 3px; +} + +.form__row input[type="checkbox"] { + margin-right: 15px; +} + +#edit-profile select { + background: 0 0; + border: 1px solid #efefef; + border-radius: 3px; + color: #262626; + font-size: 16px; + height: 32px; + padding: 0 30px 0 10px; +} + +#edit-profile input[type="submit"] { + margin-left: 235px; + border: 0; + color: white; + font-weight: 600; + border-radius: 3px; + background-color: var(--fd-blue); + font-size: 14px; + padding: 7px 25px; +} diff --git a/assets/css/explore.css b/assets/css/explore.css new file mode 100644 index 00000000000..d4a8f6ba2af --- /dev/null +++ b/assets/css/explore.css @@ -0,0 +1,70 @@ +#explore { + display: flex; + justify-content: center; + align-items: flex-start; + min-height: 500px; +} + +#explore .explore__users { + background-color: white; + border: 1px solid #e6e6e6; + border-radius: 3px; + width: 100%; + max-width: 600px; +} + +.explore__users .explore__user { + padding: 10px 15px; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid #e6e6e6; +} + +.explore__users .explore__user:last-child { + border: 0; +} + +.explore__user .explore__avatar { + width: 55px; + border-radius: 50%; +} + +.explore__user .explore__user-column { + display: flex; + align-items: center; +} + +.explore__user .explore__info { + margin-left: 15px; +} + +.explore__info .explore__username { + display: block; + font-weight: 600; + margin-bottom: 5px; +} + +.explore__info .explore__full-name { + color: #999; +} + +.explore__user-column button { + background-color: var(--fd-blue); + color: white; + border: 0; + font-weight: 600; + padding: 5px 10px; + font-size: 14px; + border-radius: 3px; + cursor: pointer; +} + +.explore__user-column button:active, +.explore__user-column button:focus { + outline: none; +} + +.explore__user-column:active { + opacity: 0.9; +} diff --git a/assets/css/feed.css b/assets/css/feed.css new file mode 100644 index 00000000000..cc88c16ef17 --- /dev/null +++ b/assets/css/feed.css @@ -0,0 +1,101 @@ +#feed { + display: flex; + align-items: center; + flex-direction: column; +} + +#feed .photo { + background-color: white; + border: 1px solid #e6e6e6; + border-radius: 3px; + width: 100%; + max-width: 600px; + margin-bottom: 65px; +} + +.photo .photo__header { + padding: 15px; + display: flex; + align-items: center; +} + +.photo__header .photo__avatar { + width: 32px; + border-radius: 50%; + margin-right: 10px; +} + +.photo .photo__user-info .photo__author { + display: block; + font-weight: 600; + margin-bottom: 5px; +} + +.photo > img { + max-width: 100%; +} + +.photo .photo__info { + padding: 15px 20px; +} + +.photo__actions { + margin-bottom: 15px; + font-size: 115%; +} + +.photo__actions .photo__action:first-child { + margin-right: 15px; +} + +.photo__actions .photo__action { + cursor: pointer; +} + +.photo .photo__likes { + font-weight: 600; + margin-bottom: 10px; + display: block; +} + +.photo .photo__add-comment-container { + margin-top: 15px; + border-top: 1px solid #e6e6e6; + padding-top: 10px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.photo__add-comment-container textarea { + width: 90%; + border: 0; + font-size: 14px; + resize: none; + height: 20px; +} + +.photo__add-comment-container textarea:focus, +.photo__add-comment-container textarea:active { + outline: none; +} + +.photo__add-comment-container i { + cursor: pointer; +} + +.photo .photo__time-ago { + font-size: 10px; + text-transform: uppercase; + color: #999; + margin-top: 10px; + display: block; +} + +.photo__comment { + margin-bottom: 10px; +} + +.photo__comments .photo__comment-author { + font-weight: 600; +} diff --git a/assets/css/footer.css b/assets/css/footer.css new file mode 100644 index 00000000000..0d5b8cbae0e --- /dev/null +++ b/assets/css/footer.css @@ -0,0 +1,30 @@ +.footer { + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + max-width: 900px; + margin: 30px auto; + text-transform: uppercase; + font-size: 12px; + font-weight: 600; +} + +.footer .footer__list { + padding: 0; + list-style-type: none; + display: flex; +} + +.footer .footer__copyright { + color: hsl(0, 0%, 60%); +} + +.footer__list .footer__list-item { + margin-right: 10px; +} + +.footer .footer__link { + text-decoration: none; + color: var(--link-color); +} diff --git a/assets/css/globals.css b/assets/css/globals.css new file mode 100644 index 00000000000..cea96117b23 --- /dev/null +++ b/assets/css/globals.css @@ -0,0 +1,21 @@ +body { + background-color: white; + background-color: var(--background-color); + font-size: 14px; + font-family: "Open Sans", sans-serif; +} + +main { + animation: fadeInMain 0.5s linear; +} + +@keyframes fadeInMain { + from { + opacity: 0; + transform: translateY(10px); + } + to { + opacity: 1; + transform: translateY(0px); + } +} diff --git a/assets/css/login.css b/assets/css/login.css new file mode 100644 index 00000000000..f5657f0c13a --- /dev/null +++ b/assets/css/login.css @@ -0,0 +1,128 @@ +#login { + width: 100%; + max-width: 800px; + margin: 45px auto; + display: flex; + justify-content: space-around; +} + +#login .login__column { + width: 45%; +} + +.login__column .login__phone { + max-width: 100%; +} + +.login__column .login__box { + background-color: white; + border: 1px solid #e6e6e6; +} + +.login__column .login__box--transparent { + background: none; + border: 0; + display: flex; + flex-direction: column; + align-items: center; + margin-top: 35px; +} + +.login__column .login__appstores { + margin-top: 20px; +} + +.login__appstores .login__appstore { + height: 40px; +} + +#login .login__box { + padding: 30px 0; + text-align: center; +} + +#login .login__box:first-child { + margin-bottom: 10px; + padding-left: 40px; + padding-right: 40px; +} + +.login__column .login__logo { + height: 50px; +} + +.login__form input { + display: block; + width: 100%; + box-sizing: border-box; + padding: 7px; + font-size: 14px; + border: 0; + border: 1px solid #e6e6e6; + border-radius: 5px; + background: #fafafa; +} + +.login__form input:focus { + outline: none; + border: 1px solid #a9a9a9; +} + +.login__form input:first-child { + margin-bottom: 5px; +} + +.login__form input[type="submit"] { + background-color: #3f99ed; + border: 0; + padding: 5px; + margin-top: 15px; + margin-bottom: 20px; + color: white; + font-weight: 600; +} + +#login .login__divider { + display: block; + text-transform: uppercase; + font-weight: 600; + color: #999; + margin-bottom: 20px; + position: relative; + width: 100%; +} + +#login .login__link { + display: block; + text-decoration: none; + color: #003569; +} + +#login .login__link--small { + margin-top: 30px; +} + +.login__box a { + text-decoration: none; + color: var(--fd-blue); +} + +#login .login__divider:before { + content: ""; + height: 1px; + background-color: rgba(153, 153, 153, 0.5); + width: 40%; + position: absolute; + left: 0; + top: 10px; +} + +#login .login__divider:after { + content: ""; + height: 1px; + background-color: rgba(153, 153, 153, 0.5); + width: 40%; + position: absolute; + right: 0; + top: 10px; +} diff --git a/assets/css/mobile.css b/assets/css/mobile.css new file mode 100644 index 00000000000..fc236e0553c --- /dev/null +++ b/assets/css/mobile.css @@ -0,0 +1,110 @@ +@media screen and (min-width: 375px) and (max-width: 667px) { + .navigation { + padding: 0 20px; + margin-bottom: 0; + } + .navigation input, + .navigation .fa-search { + display: none; + } + #feed .photo { + background-color: transparent; + border: 0; + margin-bottom: 20px; + } + #feed .photo .photo__add-comment-container { + display: none; + } + .footer { + width: 80%; + } + .footer, + .footer .footer__list { + flex-wrap: wrap; + justify-content: center; + } + .footer__list .footer__list-item { + margin-bottom: 10px; + } + #login .login__column { + width: 100%; + } + #login .login__column:first-child { + display: none; + } + #login .login__box { + background-color: transparent; + border: 0; + } + #profile { + margin-top: 50px; + } + #profile .profile__header { + flex-direction: column; + align-items: center; + } + #profile .profile__title { + flex-wrap: wrap; + justify-content: center; + width: 100%; + } + .profile__title h3 { + margin: 20px 0; + } + .profile__title a { + margin-right: auto; + } + .profile__stats { + justify-content: space-between; + } + .profile__stats .profile__stat { + text-align: center; + margin-right: 0; + } + .profile__stat span { + display: block; + } + .profile__photos .profile__photo { + width: 33%; + margin-bottom: 0; + } + .profile__photos { + margin-bottom: 50px; + } + #explore .explore__users { + background-color: transparent; + border: 0; + } + .explore__users .explore__user { + border: 0; + } + #edit-profile > .edit-profile__container { + border: 0; + } + #edit-profile .form__row { + flex-direction: column; + } + .form__row .form__label { + margin: 0; + text-align: center; + margin-bottom: 10px; + } + #edit-profile input[type="submit"] { + width: 120px; + margin: 0; + margin-top: 20px; + } + #edit-profile .edit-profile__container { + display: flex; + flex-direction: column; + align-items: center; + } + #edit-profile .edit-profile__form { + display: flex; + flex-direction: column; + align-items: center; + } + .edit-profile__header .edit-profile__avatar-container { + width: 0; + } +} diff --git a/assets/css/navigation.css b/assets/css/navigation.css new file mode 100644 index 00000000000..cb729669732 --- /dev/null +++ b/assets/css/navigation.css @@ -0,0 +1,77 @@ +.navigation { + height: 75px; + background-color: white; + border-bottom: 1px solid #e6e6e6; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 100px; + margin-bottom: 60px; +} + +.navigation .navigation__column:first-child img { + height: 45px; +} + +.navigation .navigations__links { + display: flex; + padding: 0; + list-style-type: none; +} + +.navigation .navigation__list-item { + margin-left: 30px; + padding: 0 2px; + opacity: 0; + animation: slideNavLink 0.5s ease-out forwards; +} + +@keyframes slideNavLink { + from { + transform: translateY(-10px); + } + to { + opacity: 1; + transform: none; + } +} + +.navigation .navigation__list-item:nth-child(2) { + animation-delay: 0.2s; +} + +.navigation .navigation__list-item:last-child { + animation-delay: 0.3s; +} + +.navigation__link { + color: rgba(0, 0, 0, 0.8); + font-size: 18px; +} + +.navigation__column input { + padding: 5px 0; + padding-left: 60px; + border: 0; + border: 1px solid #e6e6e6; + border-radius: 3px; + background: #fafafa; + font-size: 16px; +} + +.navigation__column input:focus { + outline: none; + border: 1px solid #a9a9a9; +} + +.navigation__column { + position: relative; +} + +.navigation__column .fa-search { + position: absolute; + top: 10px; + left: 10px; + color: rgba(0, 0, 0, 0.5); + font-size: 12px; +} diff --git a/assets/css/profile.css b/assets/css/profile.css new file mode 100644 index 00000000000..5d115215978 --- /dev/null +++ b/assets/css/profile.css @@ -0,0 +1,161 @@ +#profile { + display: flex; + flex-direction: column; + align-items: center; +} + +#profile .profile__header { + max-width: 935px; + width: 100%; + display: flex; + margin-bottom: 50px; + font-size: 110%; +} + +.profile__header .profile__column { + width: 70%; +} + +.profile__header .profile__column:first-child { + width: 30%; + display: flex; + align-items: center; + justify-content: center; +} + +.profile__column:first-child img { + border-radius: 50%; + transform-style: preserve-3d; + transition: transform 0.5s linear; + animation: rotateLynn 1s linear infinite; +} + +@keyframes rotateLynn { + from { + transform: rotateY(0turn); + } + to { + transform: rotateY(1turn); + } +} + +.profile__column .profile__title, +.profile__column .profile__stats { + display: flex; + align-items: center; +} + +.profile__column .profile__title { + margin-bottom: 30px; +} + +.profile__title .profile__username { + margin-right: 25px; + font-size: 32px; + font-weight: 300; +} + +.profile__title a { + margin-right: 10px; + text-decoration: none; + color: inherit; + font-weight: 600; + padding: 5px 25px; + border: 1px solid #e6e6e6; + border-radius: 3px; + transition: all 0.3s ease-in-out; +} + +.profile__title a:hover { + background-color: #3f99ed; + color: white; + border-color: #3f99ed; +} + +.profile__title i { + cursor: pointer; + transition: transform 1s ease-in; +} + +.profile__title i:hover { + transform: rotate(2turn); +} + +.profile__column .profile__stats { + margin-bottom: 30px; +} + +.profile__stats .profile__stat { + margin-right: 40px; +} + +.profile__stat .stat__number { + font-weight: 600; +} + +.profile__bio .profile__full-name { + font-weight: 600; +} + +.profile__bio a { + color: var(--link-color); + font-weight: 600; + text-decoration: none; + display: block; +} + +.profile__column .profile__bio { + line-height: 125%; +} + +#profile .profile__photos { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + max-width: 936px; + width: 100%; +} + +.profile__photos .profile__photo { + width: 31%; + margin-bottom: 35px; + position: relative; +} + +.profile__photo img { + max-width: 100%; +} + +.profile__photo .profile__photo-overlay { + position: absolute; + top: 0; + background-color: rgba(0, 0, 0, 0.5); + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + color: white; + font-weight: 600; + opacity: 0; + transition: opacity 0.2s linear; +} + +.profile__photo:hover .profile__photo-overlay { + opacity: 1; +} + +.profile__photo-overlay .overlay__item { + font-size: 130%; + display: flex; + align-items: center; +} +.profile__photo-overlay .overlay__item:last-child { + margin-left: 10px; + /**/ +} + +.profile__photo-overlay .overlay__item i { + font-size: 130%; + margin-right: 5px; +} diff --git a/assets/css/reset.css b/assets/css/reset.css new file mode 100644 index 00000000000..82935aeceff --- /dev/null +++ b/assets/css/reset.css @@ -0,0 +1,124 @@ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ""; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/assets/css/styles.css b/assets/css/styles.css new file mode 100644 index 00000000000..09dd98497fc --- /dev/null +++ b/assets/css/styles.css @@ -0,0 +1,12 @@ +@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,600"); +@import "reset.css"; +@import "variables.css"; +@import "globals.css"; +@import "login.css"; +@import "footer.css"; +@import "navigation.css"; +@import "explore.css"; +@import "feed.css"; +@import "profile.css"; +@import "edit-profile.css"; +@import "mobile.css"; diff --git a/assets/css/variables.css b/assets/css/variables.css new file mode 100644 index 00000000000..0620c7ea3f3 --- /dev/null +++ b/assets/css/variables.css @@ -0,0 +1,5 @@ +:root { + --background-color: #fafafa; + --fd-blue: #3897f0; + --link-color: #003569; +} diff --git a/assets/images/android.png b/assets/images/android.png new file mode 100644 index 00000000000..306aa45f29e Binary files /dev/null and b/assets/images/android.png differ diff --git a/assets/images/avatar.jpg b/assets/images/avatar.jpg new file mode 100644 index 00000000000..5ef783b9abf Binary files /dev/null and b/assets/images/avatar.jpg differ diff --git a/assets/images/feedPhoto.jpg b/assets/images/feedPhoto.jpg new file mode 100644 index 00000000000..f1da1a8cf0d Binary files /dev/null and b/assets/images/feedPhoto.jpg differ diff --git a/assets/images/haris.jpg b/assets/images/haris.jpg new file mode 100644 index 00000000000..30e64a8b99d Binary files /dev/null and b/assets/images/haris.jpg differ diff --git a/assets/images/ios.png b/assets/images/ios.png new file mode 100644 index 00000000000..460f81ab32d Binary files /dev/null and b/assets/images/ios.png differ diff --git a/assets/images/loginLogo.png b/assets/images/loginLogo.png new file mode 100644 index 00000000000..332881b2ad3 Binary files /dev/null and b/assets/images/loginLogo.png differ diff --git a/assets/images/logo.png b/assets/images/logo.png new file mode 100644 index 00000000000..e2ab02a7522 Binary files /dev/null and b/assets/images/logo.png differ diff --git a/assets/images/phoneImage.png b/assets/images/phoneImage.png new file mode 100644 index 00000000000..949173e7366 Binary files /dev/null and b/assets/images/phoneImage.png differ