/** * * This file is a core Ultimatum file and should not be edited. * * @package Ultimatum * @author Wonder Foundry http://www.wonderfoundry.com * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) * @link http://ultimatumtheme.com * @version 2.50 */ function ultimatum_toolset_setup(){ if(isset($_REQUEST['api_key'])){ $apireturn = ultimatum_api_returned_check($_REQUEST['api_key']); } elseif (isset($_REQUEST['e'])){ ?> <div class="error fade"><p><?php echo $_REQUEST['e'] ?></p></div> <?php } ?> <div class="wrap about-wrap"> <h1 style="width:100%;text-align:center"><?php _e('Login to your Ultimatum Account','ultimatum');?></h1> <div class="login" style="width:50%;margin:0 auto;"> <form name="loginform" id="loginform" action="<?php echo ULTIMATUM_API;?>" method="post" style="background:transparent;box-shadow:none"> <p> <label for="user_login"><?php _e('Username','ultimatum');?><br /> <input type="text" name="user" id="user_login" class="input" value="" size="20" /></label> </p> <p> <label for="user_pass"><?php _e('Password','ultimatum');?><br /> <input type="password" name="pass" id="user_pass" class="input" value="" size="20" /></label> </p> <p style="text-align:center"> <input type="hidden" name="site" value="<?php echo network_home_url();?>" /> <input type="hidden" name="admin" value="<?php echo network_admin_url();?>" /> <input type="hidden" name="task" value="getapi" /> <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-hero" value="<?php _e('Log In','ultimatum');?>" /> </p> </form> </div> <h3><?php _e('What is Tool Set and Why you need to register?','ultimatum');?></h3> <ol> <li><?php _e('Registering your site with ToolSet will grant you automatic Updates on Ultimatum and plugins included with it.','ultimatum');?></li> <li><?php _e('ToolSet is the control center and extension center of Ultimatum. You can access to the plugins we have included with Ultimatum via ToolSet.','ultimatum');?></li> </ol> <table> <?php access_check();?> </table> </div> <?php }
<?php session_start(); // Display page of athletes who have allowed this athlete to view their // logs and let this athlete choose one to action. require_once "access_check.php"; $filename = basename(__FILE__); access_check($filename); $athlete_id = $_SESSION['athlete_id']; include_once "sql_functions.php"; // Start Form and Table echo <<<HTMLEND <HTML> <HEAD> <LINK REL="stylesheet" HREF="styles/login.css" type="text/css"> <LINK REL="stylesheet" HREF="styles/menubar.css" type="text/css"> </HEAD> HTMLEND; include_once "menubar.php"; display_menubar(); echo <<<ENDHTML <HR> <H3>Select User Training Log to View</H3> ENDHTML; // Get users who have granted this athlete access $query = " SELECT athlete_id, name, surname, login from athlete\n\twhere athlete_id IN \n\t(select athlete_id from share_permissions \n\tWHERE permission LIKE 'view % {$athlete_id}'\n \tOR \n\tpermission LIKE 'view % local' OR\n\tpermission LIKE 'view % global'\n\t)"; $result = do_sql($query) or die('Query failed: ' . pg_last_error()); $users = array(); while ($row = pg_fetch_array($result, null, PGSQL_ASSOC)) { $name = $row['name']; $surname = $row['surname'];
} $show_thumbs = ''; if (isset($_GET["show_thumbs"])) { $show_thumbs = $_GET["show_thumbs"]; } $page = new C_www(); //default colors if (!is_dir("{$gallery_dir}/{$galerie}/thumbs")) { $galerie = ""; } //read interesting stuff from info.txt if ($galerie) { readInfo("{$root}/{$gallery_dir}/{$galerie}/info.txt", $galerie); //check for restricted access if ($galerielogin[$galerie]) { access_check($galerielogin[$galerie], $galeriepw[$galerie], $galerie); } } $page->process_comment_form(); //START RENDERING $page->header("Photos"); require "inc/header.inc.php"; // folder > tree //print "<div class=\"navigation\"><a href=\"$ThisScript\">" . $scnamegallery . "</a>"; print "<div class=\"navigation\"><a href=\"./\">" . $scnamegallery . "</a>"; ############################# # Overall Gallery Index # ############################# if (!$galerie) { # finish off navigation bar print "</div>\n\n<!-- listing galleries-->\n\n";
/** * This will display edit permission * @param CreatePermissionRequest $request * @return Redirect */ public function updatePermission(CreatePermissionRequest $request) { access_check('manage_permissions'); $permissions = Permissions::find($request->input('pid')); $permissions->update($request->all()); Session::flash('success', 'Permission changes saved successfully.'); return redirect('admin/permissionsListing'); }
/** * Saving the user profile data on save. * * @param Illuminate\Http\Request * @return redirect back */ public function saveUserProfile(Request $request) { access_check('manage_profile'); if (!empty($request->input('name'))) { $user = User::find(Auth::user()->id); $user->name = $request->input('name'); $user->save(); Session::flash('success', 'Profile data changed.'); return redirect()->back(); } else { Session::flash('error', 'No data to change.'); return redirect()->back(); } }
/** * * Function list specific templates * This function is used to display templates with access restrictions * @version 1.0 * @author Patrick Lockley */ function list_specific_templates() { global $xerte_toolkits_site; $query_for_blank_templates = "select * from " . $xerte_toolkits_site->database_table_prefix . "originaltemplatesdetails where access_rights!=\"*\" order by date_uploaded DESC"; $query_for_blank_templates_response = mysql_query($query_for_blank_templates); while ($row = mysql_fetch_array($query_for_blank_templates_response)) { if (access_check($row['access_rights'])) { echo "<div class=\"template\" onmouseover=\"this.style.backgroundColor='#ebedf3'\" onmouseout=\"this.style.backgroundColor='#fff'\"><div class=\"template_icon\"></div><div class=\"template_desc\"><p class=\"template_name\">"; echo $row['display_name']; echo "</p><p class=\"template_desc_p\">"; echo $row['description']; /* * If no example don't display the link */ if ($row['display_id'] != 0) { echo "</p><a href=\"javascript:example_window('" . $row['display_id'] . "' )\">" . DISPLAY_EXAMPLE . "</a> | "; } else { echo "<br>"; } echo "<button type=\"button\" class=\"xerte_button\" onclick=\"javascript:template_toggle('" . $row['template_name'] . "')\">" . DISPLAY_CREATE . "</button></div><div id=\"" . $row['template_name'] . "\" class=\"rename\">"; echo "<span>" . DISPLAY_NAME . "</span><form action=\"javascript:create_tutorial('" . $row['template_name'] . "')\" method=\"post\" enctype=\"text/plain\"><input type=\"text\" width=\"200\" id=\"filename\" name=\"filename\" /><br /><button type=\"submit\" class=\"xerte_button\" >" . DISPLAY_BUTTON_PROJECT_CREATE . "</button></form></div></div>"; } } }