Advertisement
Guest User

another potentential

a guest
Jul 17th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.32 KB | None | 0 0
  1. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  2. <?php
  3. // All is inside the body tag
  4. require_once("rbuxlogin.php");
  5. require_once("modelcategory.php");
  6. if (!isset($modelCategory))
  7. $modelCategory = new ModelCategory();
  8. $filterCat = array("top_only" => '1');
  9. $mainCategories = $modelCategory->getCategories($filterCat);
  10. // get user's current interests
  11. $featureCenteredNavbarLogo = false; // overridden from fbuxconfig
  12. ?>
  13. <?php
  14.  
  15. $homeURL = $dashboardUrl;
  16. //if (isset($paramArray['caller'])){
  17. // if ($paramArray['caller'] == 'landing')
  18. // $homeURL = $rBUXIntroURL;
  19. //}
  20. if ($rBUXAPI->isLoggedIn()) {
  21. ?>
  22. <script>
  23. var userInterestsList = [];
  24. <?php
  25. $userInterestsList = $rBUXAPI->getUserCategories($rBUXID);
  26. foreach ($userInterestsList as $userInterest){ ?>
  27. userInterestsList.push("<?=$userInterest;?>");
  28. <?php }
  29. $showUserParam = "eparam=".encodeParams("rBUXID=".urlencode($rBUXID));
  30. $userProfileURL = "rPostForm('$rBUXShowUserPage','$showUserParam', 'POST', '_self');";
  31. ?>
  32. </script>
  33. <form class="controlbox" name="log-out" id="logout" method="POST">
  34. <input type="hidden" name="op" value="logout"/>
  35. <input type="hidden" name="loginType" value=""/>
  36. <?php //getFormHiddenInput(); ?>
  37. </form>
  38. <?php }
  39. function shouldShowCategory($catID)
  40. {
  41. global $userInterestsList;
  42. global $marketShowInterestsOnly;
  43. //error_log("shouldShowCategory marketShowInterestsOnly: ".($marketShowInterestsOnly ? "YES": "NO"));
  44. if (!$marketShowInterestsOnly)
  45. return true;
  46. foreach ($userInterestsList as $userInterest){
  47. error_log("shouldShowCategory show userInterest: $userInterest");
  48. if ($userInterest == $catID) {
  49. error_log(" shouldShowCategory show catID: $catID");
  50. return true;
  51. }
  52. }
  53. return false;
  54. }
  55.  
  56. ?>
  57. <!-- Main navbar -->
  58. <style>
  59. .nav-mid-fill{
  60. width: 100%;
  61. /*overflow: hidden;*/
  62. }
  63.  
  64. .rbux-mid-fill {
  65. display: block;
  66. overflow: hidden;
  67. padding-right:10px;
  68. padding-left:10px;
  69. }
  70.  
  71. @media only screen and (max-width: 320px){
  72. .rbux-mid-fill {
  73. padding: 0px;
  74. }
  75.  
  76. .small-screen-padding {
  77. padding-left: 10px;
  78. }
  79. }
  80.  
  81. @media only screen and (max-height: 510px) {
  82. .dropdown-menu > li {
  83. margin-bottom: -4px;
  84. margin-top: -4px;
  85. }
  86. }
  87.  
  88. .rbux-nav-right{
  89. float: right;
  90. }
  91. .rbux-nav-left{
  92. float: left;
  93. }
  94.  
  95. #search-div {
  96. height: 50px;
  97. }
  98.  
  99. .search-div {
  100. float: right;
  101. /* 7 works everywhere but ios*/
  102. <?php if(isIosPlatform()) { ?>
  103. margin-top: 9.5px;
  104. <? } else { ?>
  105. margin-top: 7px;
  106. <?php } ?>
  107. margin-top: 9.5px;
  108. margin-right: 60px;
  109. border: 1px solid #ccc;
  110. /*border-radius: 4px 25px 25px 4px;*/
  111. padding-right: 15px;
  112. padding-top: 1px;
  113. position: relative;
  114. z-index: 1000;
  115. width: 32px;
  116. height: 32px;
  117. border-radius: 50%;
  118. transition: 1s width;
  119. }
  120.  
  121. #search-icon {
  122. float: right;
  123. /* margin-left: 10px;
  124. margin-top: 11px;*/
  125. height: 32px;
  126. width: 32px;
  127. /* border: 1px solid #ccc;
  128. border-radius: 50%;*/
  129. text-align: center;
  130. padding-top: 8px;
  131.  
  132. margin-top: 0.5px;
  133. <?php if(!isMobilePlatform()) {?>
  134. margin-right: -15px;
  135. padding-left: 2px;
  136. <?php } else { ?>
  137. /*margin-right: -4px;*/
  138. padding-right: 2px;
  139. padding-left: 24px;
  140. /*margin-bottom: 1px;*/
  141. <?php } ?>
  142. }
  143.  
  144. .searchbar-text {
  145. float: left;
  146. width: 0%;
  147. opacity: 0;
  148. border: none;
  149. padding-top: 9px;
  150. padding-bottom: 5px;
  151. padding-left: 10px;
  152. padding-right: 10px;
  153. transition: 1s width;
  154. height: 35px;
  155. }
  156.  
  157. #x {
  158. margin-top: 10px;
  159. margin-right: 10px;
  160. display: none;
  161. transition: 1s display;
  162. }
  163.  
  164. @media only screen and (max-width: 900px){
  165. #search-div {
  166. margin-right: 0px;
  167. }
  168. }
  169.  
  170. @media only screen and (max-width: 600px){
  171. #search-div {
  172. margin-right: -40px;
  173. }
  174. }
  175.  
  176. @media only screen and (max-width: 500px){
  177. #search-div {
  178. margin-right: -60px;
  179. }
  180.  
  181. <?php if(!isMobilePlatform()) {?>
  182. .search-div {
  183. width: 80% !important;
  184. }
  185. <?php } ?>
  186. }
  187.  
  188.  
  189. </style>
  190. <div class="row" style="overflow-x:hidden; width:100%; margin:0;">
  191. <!-- <div class="navbar navbar-default header-highlight"> -->
  192. <div id="navbar-top" class="navbar navbar-fixed-top header-highlight navbar-rbux nav-mid-fill elevation1" style="align-items: center;padding-left:0px;">
  193. <ul class="nav navbar-nav rbux-nav-left" style="margin-left: 10px;">
  194. <?php if (isset($hasSidebarMenu) && $rBUXAPI->isLoggedIn()) { /*Scott took out tooltip - it was in the way data-popup="tooltip" title="Show main" */ ?>
  195. <li class='hidden-xs' >
  196. <a class="sidebar-control sidebar-main-hide" data-placement="bottom" data-container="body" >
  197. <i class="icon-paragraph-justify3"></i>
  198. </a>
  199. </li>
  200. <li class="hidden-sm hidden-md hidden-lg hidden-xl"> <?php /* visible-xs-block" > */ ?>
  201. <a class="sidebar-mobile-main-toggle" style="padding-left: 10px;padding-top:12px;padding-right:0px; display: inline-block !important;">
  202. <i class="icon-paragraph-justify3"></i>
  203. </a>
  204. <a href="<?php $homeURL; ?>"
  205. style="padding-left: 10px;padding-top:12px;padding-right:0px; display: inline-block !important;" id="nav-items">
  206. <img id="navbarLogoImage" src="images/<?=$logofile?>.png" alt="" style="padding-left:10px; padding-right:0px;height:24px;margin-top:-4px;">
  207. </a>
  208. </li>
  209.  
  210. <?php }else{ ?>
  211. <li class="visible-xs-block">
  212. <a class="navbar-brand" href="<?php echo $homeURL; ?>" style="padding-left: 10px;padding-right:0px;">
  213. <img id="navbarLogoImage" src="images/<?=$logofile?>.png" alt="">
  214. </a>
  215. </li>
  216. <?php /*if (!$featureBreadcrumbs){ ?>
  217. <li>
  218. <a href="<?=$rBUXMainUrl?>" class="" data-placement="bottom" data-container="body">
  219. <i class="fa fa-home fa-lg" style="font-size:28px;"></i>
  220. </a>
  221. </li>
  222. <?php }*/ ?>
  223. <?php } ?>
  224. <li class="hidden-xs">
  225. <?php if (!$featureCenteredNavbarLogo) { ?>
  226. <a class="navbar-brand" href="<?php echo $homeURL; ?>" style="padding-left: 4px;padding-right: 4px;">
  227. <img id="navbarLogoImage" src="images/<?=$logofile?>.png" alt="">
  228. </a>
  229. <?php } ?>
  230.  
  231. </li>
  232. </ul>
  233. <?php /************
  234. <ul class="nav navbar-nav navbar-center">
  235. <?php if ($featureCenteredNavbarLogo) { ?>
  236. <li>
  237. <a class="navbar-brand" href="<?php echo $homeURL; ?>">
  238. <img id="navbarLogoImage" src="images/<?=$logofile?>.png" alt="">
  239. </a>
  240. <?php if ($betatest && $rBUXURL != "https://rbux.com"){ ?>
  241. <small><i class='fa fa-bug' ></i> <?=$betaTestName?></small>
  242. <?php } ?>
  243. </li>
  244.  
  245. <?php }?>
  246. </ul>
  247. ***************/ ?>
  248. <style>
  249. .signInLink {
  250. }
  251. .btn-nav-signUp {
  252. color: #222 !important;
  253. }
  254. .btn-nav-signUp:focus,
  255. .btn-nav-signUp.focus,
  256. .btn-nav-signUp:hover {
  257. background-color: #ccc !important;
  258. border-color: #aaa !important;
  259. }
  260.  
  261. </style>
  262. <?php if (!isset($vendorNavBar)) { ?>
  263.  
  264. <ul class="nav navbar-nav rbux-nav-right" id="navbar-mobile">
  265. <?php if (!$rBUXAPI->isLoggedIn()) { ?>
  266. <li class="hidden-xs" style="padding-top:11px; " >
  267. <a href='javascript:callLogin(false, false);' class='btn btn-xs btn-link btn-nav-link signInLink'
  268. style='padding-top:2px;padding-bottom:2px;' >Sign in</a>
  269. </li>
  270. <li class="hidden-xs" style="padding-top:11px;padding-right:10px; ">
  271. <a class="btn btn-xs btn-default btn-nav-signUp" href='javascript:callSignup(false, false);'
  272. style='padding-top:2px;padding-bottom:2px;'><?php echo "Join rBux" ?></a>
  273. </li>
  274. <?php } ?>
  275. <?php if ($rBUXAPI->isLoggedIn()) { ?>
  276. <li class="hidden-md hidden-sm hidden-xs">
  277. <div class="avatar-less-margin" style="display:inline-block;padding-top:7px;">
  278. <a class=" " href="javascript:<?=$userProfileURL; ?>"><?php $rBUXAPI->displayAvatar(32, 0); ?></a>
  279. </div>
  280. </li>
  281. <?php } ?>
  282. <li class="dropdown dropdown-user">
  283. <a class="dropdown-toggle" data-toggle="dropdown" style="padding-top:0px;padding-bottom:0px;padding-left:0px;">
  284. <?php if ($rBUXAPI->isLoggedIn()) { ?>
  285. <span class="avatar-less-margin hidden-lg hidden-xl" style=""><?php $rBUXAPI->displayAvatar(32, 0); ?>
  286. </span>
  287. <span class="avatar-less-margin hidden-md hidden-sm hidden-xs" style="padding-top:13px; padding-bottom: 13px;" >
  288. <?php
  289. $mlfullName = $rBUXAPI->getMemberDisplayName($rBUXAPI->getFirstName(), $rBUXAPI->getLastName(), $rBUXAPI->getUserName(), $rBUXAPI->getPrivacy());
  290. $mlusername = $rBUXAPI->getMemberDisplayUserName($mlfullName, $rBUXAPI->getUserName());
  291. $userTitle = $rBUXAPI->getMemberDisplayTitle($mlfullName, $mlusername);
  292. echo $userTitle;
  293. ?>
  294. </span>
  295. <span class="" style="padding-top:13px; padding-bottom: 13px;" >
  296. <i class="fa fa-angle-down btn-nav-link" ></i>
  297. </span>
  298. <?php }else{ ?>
  299. <div class="avatar-less-margin" style="padding-top:13px; padding-bottom: 13px;font-weight: 900;" >
  300. <i class="icon-paragraph-justify3 btn-nav-link"></i>
  301. </div>
  302. <?php } ?>
  303. </a>
  304. <ul class="dropdown-menu dropdown-menu-right"
  305. style="position:absolute; z-index:65001; margin:2px 0 0; background-color:white; border:1px solid #ddd; border-radius:3px">
  306. <!-- <ul class="dropdown-menu dropdown-menu-right"> -->
  307. <?php if ($rBUXAPI->isLoggedIn()) { ?>
  308. <?php /**
  309. <li><a href="auser.php"><i class="icon-user-plus"></i> My profile</a></li>
  310. <li><a href="auser.php"><i class="icon-coins"></i> My balance</a></li>
  311. <!-- <li><a href="#"><span class="badge bg-teal-400 pull-right">58</span> <i class="icon-comment-discussion"></i> Messages</a></li> -->
  312. <li class="divider"></li>
  313. ****************************/ ?>
  314. <?php /******************
  315. <li><a href="<?php echo $memberReportsUrl; ?>" target='_self'><i class="icon-coins"></i> Reports</a></li>
  316. *************/ ?>
  317. <li><a href="javascript:<?=$userProfileURL; ?>" target='_self'><i class="icon-user"></i> My Profile</a></li>
  318. <li><a href='<?=$rBUXUserNotifySettingsPage; ?>' target='_self'><i class="icon-exclamation"></i> Notification Settings</a></li>
  319. <li><a href="<?=$memberAccountUrl; ?>?op=interests" target='_self'><i class="icon-heart6"></i> My Interests</a></li>
  320. <li><a href="<?=$memberAccountUrl; ?>" target='_self'><i class="icon-cog5"></i> Account Settings</a></li>
  321.  
  322. <li role="separator" class="divider"></li>
  323. <?php }else{ ?>
  324. <li><a href='javascript:callLogin(false, false);' ><i class="icon-key"></i> Sign in</a></li>
  325. <li><a href='javascript:callSignup(false, false);' ><i class="icon-pencil"></i> Join rBux</a></li>
  326.  
  327. <?php } ?>
  328. <?php if (isset($noBreadcrumbMenu)) { ?>
  329. <li><a href="<?php echo $rBUXIntroSite; ?>support""><i class="icon-comment-discussion position-left"></i> Support</a></li>
  330. <?php } ?>
  331. <li><a href="<?php echo $rBUXIntroURL; ?>?op=showlanding">What is rBux?</a></li>
  332. <li><a href="<?php echo $rBUXIntroSite; ?>privacy">Privacy Policy</a></li>
  333. <li><a href="<?php echo $rBUXIntroSite; ?>copyrights">Copyright Notices</a></li>
  334. <li class="divider"></li>
  335. <li><a href="<?=$rBUXIntroURL;?>partner">Become a Partner</a></li>
  336. <li><a href="<?=$rBUXMainUrl.$rBUXVendorAdminPage?>" >Partner Dashboard</a></li>
  337. <?php
  338. /*** <li class="divider"></li>
  339. <li><a href="<?php echo $rBUXMarketSite; ?>index.php?route=affiliate/login"><i class="icon-basket"></i>Partner</a></li>
  340. *******/ ?>
  341. <?php if ($rBUXAPI->isLoggedIn()) { ?>
  342. <li class="divider"></li>
  343. <li><a href="javascript:logout();"><i class="icon-switch2"></i> Sign Out</a></li>
  344. <?php }
  345. if ($isMobileApp) { ?>
  346. <li class="divider"></li>
  347. <li><a href="javascript:location.reload(true);" >Refresh</a></li>
  348. <?php } ?>
  349. </ul>
  350. </li>
  351. </ul>
  352.  
  353. <?php } ?>
  354. <?php if ($showSearchNavBar) { ?>
  355. <ul class="nav rbux-mid-fill id="navSearchbarID">
  356. <li>
  357. <div class="col-sm-12" id="search-div">
  358. <!-- <form action="" class="search-form" onSubmit="return false;">
  359. <div class="form-group has-feedback">
  360. <input type="text" class="form-control" style="width:100%" name="searchvendor3" oninput="searchVendorProducts()" id="searchvendor3" placeholder="Search...">
  361. <span class="glyphicon glyphicon-search form-control-feedback small-screen-padding"></span>
  362. </div>
  363. </form> -->
  364. <!-- aids -->
  365. <form>
  366. <div class="form-group search-div">
  367. <!-- <span><i class="fa fa-lg fa-times" id="x"></i></span>
  368. --> <span class="glyphicon glyphicon-search" id="search-icon" data-state="0"></span>
  369. <input type="text" disabled="" class="searchbar-text" name="searchvendor3" oninput="searchVendorProducts()" id="searchvendor3" placeholder="Search">
  370. </div>
  371. </form>
  372. </div>
  373. </li>
  374. </ul>
  375. <?php } ?>
  376.  
  377. </div>
  378. <!-- Categories Navbar -->
  379. <div class="nav-categories header-highlight elevation1" id="category-navbar" hidden data-state='0'>
  380. <div class="nav-categories-content slider-content container">
  381. <div class="nav-categories-container">
  382. <div class="nav-topic-item-content hidden-xs">
  383. <a onclick="setMarketViewPanel('new'); openTopic('new');"
  384. title="Newest Products Added." class="nav-categories-item topic-nav-link-text nav-categories-item-imposter">
  385. New
  386. <span class="nav-topic-item-underline" id="nav-topic-text-new"></span>
  387. </a>
  388. </div>
  389. <div class="nav-topic-item-content hidden-xs">
  390. <a onclick="setMarketViewPanel('featured'); openTopic('featured');" title="Products you may like."
  391. class="nav-categories-item topic-nav-link-text nav-categories-item-imposter">
  392. Featured
  393. <span class="nav-topic-item-underline" id="nav-topic-text-featured"></span>
  394. </a>
  395. </div>
  396. <div class="nav-topic-item-content hidden-xs">
  397. <a onclick="setMarketViewPanel('refer'); openTopic('refer');" title="Most Referred Products."
  398. class="nav-categories-item topic-nav-link-text nav-categories-item-imposter">
  399. Popular
  400. <span class="nav-topic-item-underline" id="nav-topic-text-refer"></span>
  401. </a>
  402. </div>
  403. <div class="nav-topic-item-content hidden-xs">
  404. <a onclick="setMarketViewPanel('trending'); openTopic('trending');" title="Most Recent Referrals."
  405. class="nav-categories-item topic-nav-link-text nav-categories-item-imposter">
  406. Trending
  407. <span class="nav-topic-item-underline" id="nav-topic-text-trending"></span>
  408. </a>
  409. </div>
  410. &nbsp;&nbsp;&nbsp;&nbsp;
  411.  
  412. <div class="nav-categories-item-content hidden-xs hidden-sm">
  413. <a href="#" class="nav-categories-item text-gray-shadow nav-categories-item-imposter"
  414. onclick="setMarketViewCategory('');openCategory('')">
  415. &nbsp;All&nbsp;
  416. <span class="nav-categories-item-underline" id="nav-categories-text-"></span>
  417. </a>
  418. </div>
  419.  
  420. <?php foreach ($mainCategories as $category_id) { ?>
  421. <?php //Get's the image for the current category_id by creating a querry
  422. $catID = $category_id['category_id'];
  423. $categoryName = $category_id['name'];
  424.  
  425. $image = $modelCategory->getCategoryImage($catID);
  426. $imageDirectory = $rBUXMarketSite.$rBUXMarketImageFolder.$image['image'];
  427. //If no image has been selected for the category, default image
  428. if (!@getimagesize($imageDirectory)) {
  429. $imageDirectory = $rBUXMarketSite.$rBUXMarketImageFolder."catalog/sportsrec140.jpg";
  430. }
  431. //Get's the name for the current category_id by creating a querry
  432. //This is done because category data is held in different tables, and categoryList is not organised
  433. //$categoryDetails = $modelCategory->getCategoryDescriptions($catID);
  434. //$categoryName = $categoryDetails[1]['name'];
  435.  
  436. $addit = true;
  437. if ($catID == Default_SuggestionVendorID || $catID == Default_Category_Suggestion){ //|| $catID == Default_Category_Other
  438. $addit = false;
  439. }
  440. if ($addit) {
  441. $hiddenstate = !shouldShowCategory($catID) ? 'hide' : '';
  442. ?>
  443. <div class="nav-categories-item-content category-item-class hidden-xs hidden-sm <?=$hiddenstate?>" id="nav-categories-div-<?=$catID?>" data-category="<?=$catID?>">
  444. <a href="#" class="nav-categories-item text-gray-shadow nav-categories-item-imposter"
  445. onclick="setMarketViewCategory('<?=$catID?>');openCategory('<?=$catID?>')">
  446. <?=$categoryName;?>
  447. <span class="nav-categories-item-underline" id="nav-categories-text-<?=$catID?>"></span>
  448. </a>
  449. </div>
  450. <?php }
  451. } ?>
  452.  
  453. <!-- dropdown stuff for mobile -->
  454. <div class="nav-categories-item-content dropdown sorting-drop" id="sorting1" style="height: 22px !important; margin-right: 10px;">
  455. <a href="#" class="nav-categories-item topic-nav-link-text nav-categories-item-imposter" data-toggle="dropdown" style="font-weight: 500 !important; margin: 0px 0px 0px 0px !important;">
  456. <span id="currentArrangeTitleID">Arrange</span>
  457. <span class="caret"></span>
  458. </a>
  459. <ul class="dropdown-menu elevation1 grad-white checkable-dropdown" id="topic-dropdown-menu">
  460. <li><a href="javascript:setMarketViewPanel('new'); openTopic('new');" class="topic-nav-link-text hidden-sm" id="nav-topic-menu-new">
  461. <i class="fa fa-check"></i> <span>New</span></a></li>
  462. <li><a href="javascript:setMarketViewPanel('featured'); openTopic('featured');" class="topic-nav-link-text hidden-sm" id="nav-topic-menu-featured">
  463. <i class="fa fa-check"></i> <span>Featured</span></a></li>
  464. <li><a href="javascript:setMarketViewPanel('refer'); openTopic('refer');" class="topic-nav-link-text hidden-sm" id="nav-topic-menu-refer">
  465. <i class="fa fa-check"></i> <span>Popular</span></a></li>
  466. <li><a href="javascript:setMarketViewPanel('trending'); openTopic('trending');" class="topic-nav-link-text hidden-sm" id="nav-topic-menu-trending">
  467. <i class="fa fa-check"></i> <span>Trending</span></a></li>
  468. </ul>
  469. </div>
  470. <div class="nav-categories-item-content dropdown hidden-md hidden-lg hidden-xl sorting-drop" id="sorting2" style="height: 22px !important;">
  471. <a href="#" class="nav-categories-item text-gray-shadow nav-categories-item-imposter" data-toggle="dropdown" style="font-weight: 500 !important; margin: 0px 0px 0px 0px !important;">
  472. <span id="currentCategoryTitleID">Filters</span>
  473. <span class="caret"></span>
  474. </a>
  475. <ul id="categories-menu" class="dropdown-menu elevation1 grad-white checkable-dropdown " id="categories-dropdown-menu">
  476. <li><a id="nav-categories-menu-" href="javascript:setMarketViewCategory('');openCategory('');" class="text-gray-shadow ">
  477. <i class="fa fa-check"></i> <span>All Categories</span></a>
  478. </li>
  479. <?php foreach ($mainCategories as $category_id) { ?>
  480. <?php //Get's the image for the current category_id by creating a querry
  481. $catID = $category_id['category_id'];
  482. $categoryName = $category_id['name'];
  483. //$categoryDetails = $modelCategory->getCategoryDescriptions($catID);
  484. //$categoryName = $categoryDetails[1]['name'];
  485. if ($catID == Default_SuggestionVendorID || $catID == Default_Category_Suggestion){ // && $catID == Default_Category_Other
  486. $addit = false;
  487. }
  488. if ($addit) {
  489. $hiddenstate = !shouldShowCategory($catID) ? 'hide' : '';
  490. ?>
  491. <li class="category-item-class" id="nav-categories-li-<?=$catID?>" data-category="<?=$catID?>">
  492. <a id="nav-categories-menu-<?=$catID?>" href="javascript:setMarketViewCategory('<?=$catID?>');openCategory('<?=$catID?>')" class="text-gray-shadow ">
  493. <i class="fa fa-check"></i> <span><?=$categoryName;?></span>
  494. </a>
  495. </li>
  496. <?php }
  497. } ?>
  498. </ul>
  499. <span class="nav-categories-item-underline"></span>
  500. </div>
  501.  
  502. <div class="nav-categories-item-content">
  503. &nbsp;&nbsp;
  504. <a id="marketViewFiltersButtonID" data-toggle="modal" class="text-gray-shadow" href="#marketOptionsModal" title="Narrow the listings results to your preferences." style="">
  505. <b><i class="icon-cog3"></i></b></a>
  506. </div>
  507. </div>
  508. </div>
  509. <?php if ($betatest && $rBUXURL != "https://rbux.com")
  510. echo "<div style='position:absolute;left:0px;top:0px;z-index:50000'><small><i class='fa fa-bug' ></i><span class=''> ".$betaTestName."</span></small></div>";
  511. ?>
  512. </div>
  513.  
  514. </div>
  515. <?php /*** <!-- /main navbar --> ****/ ?>
  516.  
  517. <script type="text/javascript">
  518. $("#sorting1").click(function() {
  519. if ($(".nav-categories").data('state') === '0') {
  520. $(".nav-categories").css({
  521. height: '41px'
  522. });
  523. $(".nav-categories").data('state', '1');
  524. } else {
  525. $(".nav-categories").css({
  526. height: '250px'
  527. });
  528. $(".nav-categories").data('state', '0');
  529. }
  530. });
  531.  
  532. $("#sorting2").click(function() {
  533. if ($(".nav-categories").data('state') === '0') {
  534. $(".nav-categories").css({
  535. height: '41px'
  536. });
  537. $(".nav-categories").data('state', '1');
  538. } else {
  539. $(".nav-categories").css({
  540. height: '400px'
  541. });
  542. $(".nav-categories").data('state', '0');
  543. }
  544. });
  545.  
  546. // note if state === 0, dont show search, if state === 1 show
  547. <?php if(!isMobilePlatform()) {?>
  548. $("#search-icon").click(function() {
  549. if ($("#search-icon").data('state') == '0') {
  550. $(".searchbar-text").css({
  551. width: '83%',
  552. opacity: '1'
  553. });
  554. $(".search-div").css({
  555. width: '85%',
  556. height: '40px',
  557. border: '1px solid #ccc',
  558. borderRadius: '4px 25px 25px 4px',
  559. marginRight: '50px',
  560. transition: '1s width'
  561. });
  562. $("#search-icon").removeClass("glyphicon glyphicon-search");
  563. $("#search-icon").addClass("fa fa-lg fa-times");
  564. $("#search-icon").css({
  565. border: 'none'
  566. });
  567. $(".searchbar-text").removeAttr('disabled');
  568. $('.searchbar-text').focus();
  569. $("#fake-input").css({
  570. display: 'none'
  571. });
  572. $("#search-icon").data('state', '1');
  573. } else {
  574. $(".search-div").css({
  575. borderRadius: '50%',
  576. width: '32px',
  577. height: '32px',
  578. transition: 'none'
  579. });
  580. $("#search-icon").removeClass("fa fa-lg fa-times");
  581. $("#search-icon").addClass("glyphicon glyphicon-search");
  582. // $("#search-icon").css({
  583. // border: '1px solid #ccc',
  584. // borderRadius: '50%'
  585. // });
  586. $(".searchbar-text").css({
  587. width: '0%',
  588. opacity: '0'
  589. });
  590. $(".searchbar-text").attr('disabled', 'disabled');
  591. $("#search-icon").data('state', '0');
  592. }
  593. })
  594.  
  595. <?php } else if(!$rBUXAPI->isLoggedIn()) { ?>
  596.  
  597. $("#search-icon").click(function() {
  598. if ($("#search-icon").data('state') == '0') {
  599. $(".searchbar-text").css({
  600. width: '80%',
  601. height: "35px",
  602. opacity: '1'
  603. });
  604. $(".search-div").css({
  605. width: '80%',
  606. border: '1px solid #ccc',
  607. borderRadius: '4px 25px 25px 4px',
  608. marginRight: '50px',
  609. height: '40px',
  610. transition: '1s width'
  611. });
  612. $("#search-icon").removeClass("glyphicon glyphicon-search");
  613. $("#search-icon").addClass("fa fa-lg fa-times");
  614. $("#search-icon").css({
  615. border: 'none',
  616. marginTop: '2px',
  617. marginLeft: '5px'
  618. });
  619. $(".navbar-brand").css({
  620. display: 'none'
  621. });
  622. $(".searchbar-text").removeAttr('disabled');
  623. $(".searchbar-text").focus();
  624. $("#search-icon").data('state', '1');
  625. } else {
  626. $(".search-div").css({
  627. border: '1px solid #ccc',
  628. borderRadius: '50%',
  629. width: "32px",
  630. height: "32px",
  631. marginRight: '50px',
  632. transition: 'none'
  633. })
  634. $("#search-icon").removeClass("fa fa-lg fa-times");
  635. $("#search-icon").addClass("glyphicon glyphicon-search");
  636. $("#search-icon").css({
  637. marginLeft: '0px'
  638. });
  639. $(".navbar-brand").css({
  640. display: 'block'
  641. });
  642. $(".searchbar-text").css({
  643. width: '0%',
  644. opacity: '0'
  645. });
  646. $(".searchbar-text").attr('disabled', 'disabled');
  647. $("#search-icon").data('state', '0');
  648. }
  649. })
  650.  
  651. <?php } else { ?>
  652.  
  653. $("#search-icon").click(function() {
  654. if ($("#search-icon").data('state') == '0') {
  655. $(".searchbar-text").css({
  656. width: '80%',
  657. height: '35px',
  658. opacity: '1'
  659. });
  660. $(".search-div").css({
  661. width: '80%',
  662. height: '40px',
  663. border: '1px solid #ccc',
  664. borderRadius: '4px 25px 25px 4px',
  665. transition: '1s width'
  666. });
  667. $("#search-icon").removeClass("glyphicon glyphicon-search");
  668. $("#search-icon").addClass("fa fa-lg fa-times");
  669. $("#search-icon").css({
  670. border: 'none',
  671. marginTop: '0px',
  672. marginLeft: '5px'
  673. });
  674. $("#nav-items").css({
  675. display: 'none'
  676. });
  677. $(".searchbar-text").removeAttr('disabled');
  678. $(".searchbar-text").focus();
  679. $("#search-icon").data('state', '1');
  680. } else {
  681. $(".search-div").css({
  682. border: '1px solid #ccc',
  683. borderRadius: '50%',
  684. width: "32px",
  685. height: "32px",
  686. marginRight: '50px',
  687. transition: 'none',
  688. marginTop: '9.5px'
  689. })
  690. $("#search-icon").removeClass("fa fa-lg fa-times");
  691. $("#search-icon").addClass("glyphicon glyphicon-search");
  692. $("#search-icon").css({
  693. paddingLeft: '24px',
  694. paddingTop: '3px'
  695. });
  696. $("#nav-items").css({
  697. display: 'inline-block'
  698. });
  699. $(".searchbar-text").css({
  700. width: '0%',
  701. opacity: '0'
  702. });
  703. $(".searchbar-text").attr('disabled', 'disabled');
  704. $("#search-icon").data('state', '0');
  705. }
  706. })
  707.  
  708. <?php } ?>
  709. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement