Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php defined('SYSPATH') or die('No direct script access.');
- class Controller_Util extends Controller {
- public function action_ui($can_cookie, $width)
- {
- if(!Request::$is_ajax)
- return $this->request->response = 'Error: This is not a valid interface.';
- if (((int)$can_cookie != 1)&&((int)$can_cookie != 2))
- if((int)$width <= 0) {
- $this->request->response = 'Error';
- return;
- }
- //!($has_seen = Cookie::get('rvj_ui'))
- Cookie::set('rvj_ui', 'script|' . $width);
- $width = (int) $width;
- if ($width >= 1300) {
- $this->request->response = '';
- }
- elseif (($width > 1065)&&($width < 1300)) {
- $this->request->response = 'var x = 0;;';
- } elseif (($width >= 980) && ($width <= 1064)) {
- $this->request->response = '
- $("#HdLogoText")
- .add("#HdPacJunt")
- .each(
- function() {
- $(this).animate({left : "20px"}, 600);
- }
- );
- $("div.navisection")
- .each(
- function(i,el) {
- var _newWidth = ($("body").width() - ((3 - i) * 128)) + "px";
- $(this).animate({left : _newWidth}, 600);
- }
- );';
- } elseif ($width <= 979) {
- $this->request->response = '
- $(".ico").each(function(){
- var _height = Math.ceil(parseInt($(this).attr("height")) / 2);
- var _width = Math.ceil(parseInt($(this).attr("width")) / 2);
- $(this).animate({ width: _width + "px", height: _height + "px"}, 600, function() {
- $(this).attr("width", _width).attr("height", _height);
- });
- });
- $("div.navisection")
- .each(
- function(i,el) {
- var _newWidth = ($("#CenterContainer").outerWidth() - ((2 - i) * 64)) + "px";
- $(this)
- .css({width: "64px",height:"64px"})
- .animate({left : _newWidth}, 600).animate({top : "3px"}, 600);
- }
- );
- $("#HdLogoText")
- .add("#HdPacJunt")
- .each(
- function() {
- $(this)
- .css({
- width: Math.ceil($(this).width() / 2) + "px",
- height: Math.ceil($(this).height() / 2) + "px"})
- .animate({
- left : $("#CenterContainer").offset().left + "px",
- top : "3px",
- marginLeft : Math.ceil(parseInt($(this).css("margin-left")) / 2) + "px"
- }, 600);
- }
- );
- $("#HdLogo").animate({height : Math.ceil($("#HdLogo").height() / 2) + "px"}, 600);
- Ui.Ratio = 0.5;
- alert("I\'m currently working on making this site accessible to people using 800x600 resolution. Until then, sorry. :/");
- Ui.BindEvents();
- ';
- } else {
- $this->request->response = 'var x = 0;';
- }
- }
- } // End Welcome
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement