Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.28 KB | None | 0 0
  1. <?php
  2. // Language slug
  3. //
  4. // Will be used theme routes
  5. $langs = [];
  6. foreach (Config::get("applangs") as $l) {
  7. if (!in_array($l["code"], $langs)) {
  8. $langs[] = $l["code"];
  9. }
  10.  
  11. if (!in_array($l["shortcode"], $langs)) {
  12. $langs[] = $l["shortcode"];
  13. }
  14. }
  15. $langslug = $langs ? "[".implode("|", $langs).":lang]" : "";
  16.  
  17.  
  18. /**
  19. * Theme Routes
  20. */
  21.  
  22. // Index (Landing Page)
  23. //
  24. // Replace "Index" with "Login" to completely disable Landing page
  25. // After this change, Login page will be your default landing page
  26. //
  27. // This is useful in case of self use, or having different
  28. // landing page in different address. For ex: you can install the script
  29. // to subdirectory or subdomain of your wordpress website.
  30. App::addRoute("GET|POST", "/", "Index");
  31. App::addRoute("GET|POST", "/".$langslug."?/?", "Index");
  32.  
  33. // Login
  34. App::addRoute("GET|POST", "/".$langslug."?/login/?", "Login");
  35.  
  36. // Signup
  37. //
  38. // Remove or comment following line to completely
  39. // disable signup page. This might be useful in case
  40. // of self use of the script
  41. App::addRoute("GET|POST", "/".$langslug."?/signup/?", "Signup");
  42.  
  43. // Logout
  44. App::addRoute("GET", "/".$langslug."?/logout/?", "Logout");
  45.  
  46. // Recovery
  47. App::addRoute("GET|POST", "/".$langslug."?/recovery/?", "Recovery");
  48. App::addRoute("GET|POST", "/".$langslug."?/recovery/[i:id].[a:hash]/?", "PasswordReset");
  49.  
  50.  
  51.  
  52. // Terms
  53. App::addRoute("GET|POST", "/".$langslug."?/terms/?", "Terms");
  54.  
  55.  
  56. // Privacy
  57. App::addRoute("GET|POST", "/".$langslug."?/privacy/?", "Privacy");
  58.  
  59.  
  60. // Contact
  61. App::addRoute("GET|POST", "/".$langslug."?/contact/?", "Contact");
  62.  
  63.  
  64.  
  65.  
  66.  
  67. /**
  68. * App Routes
  69. */
  70.  
  71. // New|Edit Post
  72. App::addRoute("GET|POST", "/post/[i:id]?/?", "Post");
  73.  
  74. // Instagram Accounts
  75. App::addRoute("GET|POST", "/accounts/?", "Accounts");
  76. // New Instagram Account
  77. App::addRoute("GET|POST", "/accounts/new/?", "Account");
  78. // Edit Instagram Account
  79. App::addRoute("GET|POST", "/accounts/[i:id]/?", "Account");
  80.  
  81. // Caption Templates
  82. App::addRoute("GET|POST", "/captions/?", "Captions");
  83. // New Caption Template
  84. App::addRoute("GET|POST", "/captions/new/?", "Caption");
  85. // Edit Caption Template
  86. App::addRoute("GET|POST", "/captions/[i:id]/?", "Caption");
  87.  
  88. // Settings
  89. $settings_pages = [
  90. "site", "logotype", "other", "experimental",
  91. "google-analytics", "google-drive", "dropbox", "onedrive", "paypal", "stripe", "facebook", "recaptcha",
  92. "proxy",
  93.  
  94. "notifications", "smtp"
  95. ];
  96. App::addRoute("GET|POST", "/settings/[".implode("|", $settings_pages).":page]?/?", "Settings");
  97.  
  98. // Packages
  99. App::addRoute("GET|POST", "/packages/?", "Packages");
  100. // New Package
  101. App::addRoute("GET|POST", "/packages/new/?", "Package");
  102. // Edit Package
  103. App::addRoute("GET|POST", "/packages/[i:id]/?", "Package");
  104. // Free Trial Package
  105. App::addRoute("GET|POST", "/packages/trial/?", "TrialPackage");
  106.  
  107. // Users
  108. App::addRoute("GET|POST", "/users/?", "Users");
  109. // New User
  110. App::addRoute("GET|POST", "/users/new/?", "User");
  111. // Edit User
  112. App::addRoute("GET|POST", "/users/[i:id]/?", "User");
  113. App::addRoute("GET|POST", "/profile/?", "Profile");
  114.  
  115. // Calendar
  116. App::addRoute("GET|POST", "/calendar/?", "Calendar");
  117. App::addRoute("GET|POST", "/calendar/[i:year]/[i:month]/?", "Calendar");
  118. // Calendar Day
  119. App::addRoute("GET|POST", "/calendar/[i:year]/[i:month]/[i:day]?", "Calendar");
  120.  
  121. // Proxies
  122. App::addRoute("GET|POST", "/proxies/?", "Proxies");
  123. // New Proxy
  124. App::addRoute("GET|POST", "/proxies/new/?", "Proxy");
  125. // Edit Proxy
  126. App::addRoute("GET|POST", "/proxies/[i:id]/?", "Proxy");
  127.  
  128. // Statistics
  129. App::addRoute("GET|POST", "/statistics/?", "Statistics");
  130.  
  131. // Expired
  132. App::addRoute("GET", "/expired/?", "Expired");
  133. // Renew
  134. App::addRoute("GET|POST", "/renew/?", "Renew");
  135.  
  136. // Checkout Results
  137. App::addRoute("GET|POST", "/checkout/[i:id].[a:hash]/?", "CheckoutResult");
  138. App::addRoute("GET|POST", "/checkout/error/?", "CheckoutResult");
  139.  
  140. // Cron
  141. App::addRoute("GET", "/cron/?", "Cron");
  142.  
  143. // Plugins (Modules)
  144. App::addRoute("GET|POST", "/plugins/?", "Plugins");
  145. // Upload plugin
  146. App::addRoute("GET|POST", "/plugins/install/?", "Plugin");
  147. // Install plugin
  148. App::addRoute("GET|POST", "/plugins/install/[a:hash]/?", "Plugin");
  149.  
  150. // Email verification
  151. App::addRoute("GET|POST", "/verification/email/[i:id].[a:hash]?/?", "EmailVerification");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement