예제 #1
0
<?php

include_once "db.php";
$profile = load_profile($_GET["userid"]);
?>

<div id="profileform">

	<p>Profile for userid: <label id="userid"></label></p>
	<p><label>First Name: <input id="firstname" /></p>
	<p><label>Last Name: <input id="lastname" /></p>
	<p><label>email: <input id="email" /></p>
	
	
</div>

<script>
	var profile = <?php 
echo json_encode($profile);
?>
;
	
	function refresh_profile() {
		["firstname", "lastname", "email"].forEach(function(a) {
			document.getElementById(a).value = profile[a];
		});
	}
	
	if (profile) {
		$("#userid").html(profile["userid"]);
	
예제 #2
0
/**
 * function for doing a prompt install from shell mode
 * is a wrapper around other shell functions.
 */
function prompt_install()
{
    common::echoMessage('Pick a version to install:', 'y');
    $tags = git::getTagsInstallLatest() . PHP_EOL;
    $tags .= "master";
    common::echoMessage($tags);
    $tag = common::readSingleline("Enter tag (version) to use:");
    common::execCommand("git checkout {$tag}");
    // Which profile to install
    $profiles = file::getFileList('profiles', array('dir_only' => true));
    if (count($profiles) == 1) {
        $profile = array_pop($profiles);
    } else {
        common::echoMessage("List of profiles: ");
        foreach ($profiles as $val) {
            common::echoMessage("\t" . $val);
        }
        // select profile and load it
        $profile = common::readSingleline('Enter profile, and hit return: ');
    }
    common::echoMessage("Loading the profile '{$profile}'", 'y');
    load_profile(array('profile' => $profile, 'config_only' => true));
    common::echoMessage("Main configuration (placed in config/config.ini) for '{$profile}' is loaded", 'y');
    // Keep base path. Ortherwise we will lose it when loading profile
    $base_path = conf::pathBase();
    // Load the default config.ini settings as a skeleton
    conf::$vars['coscms_main'] = conf::getIniFileArray($base_path . '/config/config.ini', true);
    // Reset base path
    conf::setMainIni('base_path', $base_path);
    conf::defineCommon();
    common::echoMessage("Enter MySQL credentials", 'y');
    // Get configuration info
    $host = common::readSingleline('Enter your MySQL host: ');
    $database = common::readSingleline('Enter database name: ');
    $username = common::readSingleline('Enter database user: '******'Enter database users password: '******'Enter server host name: ');
    common::echoMessage("Writing database connection info to main configuration");
    // Assemble configuration info
    conf::$vars['coscms_main']['url'] = "mysql:dbname={$database};host={$host};charset=utf8";
    conf::$vars['coscms_main']['username'] = $username;
    conf::$vars['coscms_main']['password'] = $password;
    conf::$vars['coscms_main']['server_name'] = $server_name;
    // Write it to ini file
    $content = conf::arrayToIniFile(conf::$vars['coscms_main'], false);
    $path = conf::pathBase() . "/config/config.ini";
    file_put_contents($path, $content);
    common::echoMessage("Your can also always change the config/config.ini file manually");
    $options = array();
    $options['profile'] = $profile;
    if ($tag == 'master') {
        $options['master'] = true;
    }
    common::echoMessage("Will now clone and install all modules", 'y');
    cos_install($options);
    common::echoMessage("Create a super user", 'y');
    useradd_add();
    $login = "******";
    common::echoMessage("If there was no errors you will be able to login at {$login}");
    common::echoMessage("Remember to change file permissions. This will require super user");
    common::echoMessage("E.g. like this:");
    common::echoMessage("sudo ./coscli.sh file --chmod-files");
}
<?php

require "Pages/Common/showInformation.php";
$fname = $_POST['inputFName'];
$mname = $_POST['inputMName'];
$lname = $_POST['inputLName'];
$dob = $_POST['inputDOB'];
$father = $_POST['inputFatherName'];
$mother = $_POST['inputMotherName'];
$preadd = $_POST['presentaddress'];
$peradd = $_POST['permanentaddress'];
$gender = $_POST['inputGender'];
$status = load_profile($user_id, $fname, $mname, $lname, $dob, $gender, $father, $mother, $preadd, $peradd);
if ($status) {
    $msg = "Updation Successful";
    header("Location: student_homepage.php?pid=7pr8yhf0&msg={$msg}");
} else {
    $msg = "Updation Failure";
    header("Location: student_homepage.php?pid=7pr8yhf0&msg={$msg}");
}
?>



<div>
     <!-- Start : Top BreadCrumb -->
     <section class="content-header">
      <h1>
       Student's Redirection
      </h1>
      <ol class="breadcrumb">
예제 #4
0
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Edit Profile</title>

	<link rel="stylesheet" href="stylesheets/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" href="stylesheets/bootstrap/css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="stylesheets/bootstrap/css/docs.min.css">
	

</head>
<body>
<div class="container-fluid">
    <?php 
echo $navbar;
?>
	<h2 class="pageHeader">Profile</h2>
	<legend>Name</legend>
		<?php 
$html_str = load_profile($mysqli, $usr);
echo $html_str;
?>
</div>

<script src="stylesheets/bootstrap/js/jquery-1.11.0.min.js"></script>
<script src="stylesheets/bootstrap/js/bootstrap.min.js"></script>	
</body>
</html>
예제 #5
0
파일: profile.php 프로젝트: taqfu/peeps2
<?php

//   echo "ASDFAS";
$connection = new PDO("mysql:host=localhost;dbname=peeps", "root", "");
$function = $_POST['function_called'];
switch ($function) {
    case "load_profile":
        load_profile($_POST['id'], $_POST['hide_empty_headers'] === "true");
        break;
}
function load_profile($id, $hide_empty_headers)
{
    echo "<div id='profile_id_header'>\n              Profile ID #\n              <span id='profile_id'>{$id}</span> \n              <div>\n                  <a href='HTTP://" . $_SERVER['SERVER_NAME'] . "/peeps/'>Back</a>\n\n              </div>\n          </div>";
    if (display_names($id, fetch_aliases($id))) {
        display_vehicle_section($id, $hide_empty_headers);
        display_traits($id, $hide_empty_headers);
        display_note_section($id, $hide_empty_headers);
    }
}
function display_names($profile_id, $names)
{
    $new_alias_form = "<span>\n                     <input id='show_new_alias' type='button' value='+' \n                       onclick=\"\$('#show_new_alias').hide();\$('#new_alias_form').show(); \" />\n                    <span id='new_alias_form' style='display:none' >\n                        <input type='button' value='-' onclick=\"\$('#show_new_alias').show();\$('#new_alias_form').hide();\" />\n                        <input id='new_alias' type='text' onkeypress=\"if (event.keyCode==13){CreateNewAlias(" . $profile_id . ", \$('#new_alias').val());}\"/> \n                        <input type='button' value='Create new alias' \n                          onclick=\"CreateNewAlias(" . $profile_id . ", \$('#new_alias').val()); \$('#new_alias').val('')\" />\n                    </span></span>";
    if (count($names) == 0) {
        echo "<div>There are no names registered for this person.{$new_alias_form}</div>";
        $return_value = 0;
    } else {
        echo "<div class='profile_header' style='clear:right;'>Name{$new_alias_form}</div>";
        for ($element = 0; $element < count($names); $element++) {
            echo "<div style='clear:left;'><div class='left ' style='width:500px;'> ";
            if ($element != 0) {
                echo "AKA ";