Exemple #1
0
<?php

session_start();
include 'functions.php';
my_header('Начало');
slide();
footerFunction();
Exemple #2
0
    if (user_is_super_user() && !license_already_displayed()) {
        session_redirect("/admin/approve_license.php");
    }
    // Make sure this page is not cached because
    // it uses the exact same URL for all user's
    // personal page
    header("Cache-Control: no-cache, no-store, must-revalidate");
    // for HTTP 1.1
    header("Pragma: no-cache");
    // for HTTP 1.0
    if (browser_is_netscape4()) {
        $feedback .= $Language->getText('my_index', 'err_badbrowser');
    }
    $title = $Language->getText('my_index', 'title', array($hp->purify(user_getrealname(user_getid()), CODENDI_PURIFIER_CONVERT_HTML) . ' (' . user_getname() . ')'));
    $GLOBALS['HTML']->includeJavascriptFile('/scripts/scriptaculous/scriptaculous.js');
    my_header(array('title' => $title, 'body_class' => array('widgetable')));
    echo '<p>' . $Language->getText('my_index', 'message') . '</p>';
    $lm = new WidgetLayoutManager();
    $lm->displayLayout(user_getid(), WidgetLayoutManager::OWNER_TYPE_USER);
    if (!$current_user->getPreference(Tuleap_Tour_WelcomeTour::TOUR_NAME)) {
        $GLOBALS['Response']->addTour(new Tuleap_Tour_WelcomeTour($current_user));
    }
    ?>
    </span>
<?php 
    $request =& HTTPRequest::instance();
    if ($request->get('pv') == 2) {
        $GLOBALS['Response']->pv_footer(array());
    } else {
        site_footer(array());
    }
function my_show_message($msg)
{
    my_header();
    printf('<p class="msg">%s</p>', $msg);
    my_footer();
    exit;
}
Exemple #4
0
 $lm = new WidgetLayoutManager();
 $vLayoutId = new Valid_UInt('layout_id');
 $vLayoutId->required();
 if ($request->valid($vLayoutId)) {
     $layout_id = $request->get('layout_id');
     $vOwner = new Valid_Widget_Owner('owner');
     $vOwner->required();
     if ($request->valid($vOwner)) {
         $owner = $request->get('owner');
         $owner_id = (int) substr($owner, 1);
         $owner_type = substr($owner, 0, 1);
         switch ($owner_type) {
             case WidgetLayoutManager::OWNER_TYPE_USER:
                 $owner_id = user_getid();
                 $title = $Language->getText('my_index', 'title', array($hp->purify(user_getrealname(user_getid()), CODENDI_PURIFIER_CONVERT_HTML) . ' (' . user_getname() . ')'));
                 my_header(array('title' => $title, 'selected_top_tab' => '/my/'));
                 $lm->displayAvailableWidgets(user_getid(), WidgetLayoutManager::OWNER_TYPE_USER, $layout_id);
                 site_footer(array());
                 break;
             case WidgetLayoutManager::OWNER_TYPE_GROUP:
                 $pm = ProjectManager::instance();
                 if ($project = $pm->getProject($owner_id)) {
                     $group_id = $owner_id;
                     $_REQUEST['group_id'] = $_GET['group_id'] = $group_id;
                     $request->params['group_id'] = $group_id;
                     //bad!
                     if (user_ismember($group_id, 'A') || user_is_super_user()) {
                         $title = $Language->getText('include_project_home', 'proj_info') . ' - ' . $project->getPublicName();
                         site_project_header(array('title' => $title, 'group' => $group_id, 'toptab' => 'summary'));
                         $lm->displayAvailableWidgets($group_id, WidgetLayoutManager::OWNER_TYPE_GROUP, $layout_id);
                         site_footer(array());
Exemple #5
0
function form($head, $message, $help = "")
{
    global $gm, $gd, $gy, $hm, $hd, $hy, $hmstr_to_hebcal;
    if ($message && isset($_GET["cfg"])) {
        header("HTTP/1.1 400 Bad Request");
        if ($_GET["cfg"] == "json") {
            header("Content-Type: application/json; charset=UTF-8");
            $arr = array("error" => $message);
            echo json_encode($arr, 0);
            exit;
        } elseif ($_GET["cfg"] == "xml") {
            header("Content-Type: text/xml; charset=UTF-8");
            echo "<?xml version=\"1.0\" ?>\n<error message=\"{$message}\" />\n";
            exit;
        }
    }
    if ($head) {
        my_header($message);
    }
    if ($message) {
        ?>
<div class="alert alert-danger alert-dismissible" role="alert">
  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  <?php 
        echo $message;
        echo $help;
        ?>
</div><!-- .alert -->
<?php 
    }
    $action = $_SERVER["PHP_SELF"];
    $pos = strpos($action, "index.php");
    if ($pos !== false) {
        $action = substr($action, 0, $pos);
    }
    ?>
<div id="converter-form" class="hidden-print">
<div class="row">
<div class="col-sm-6">
<h5>Convert from Gregorian to Hebrew date</h5>
<form class="form-inline" action="<?php 
    echo $action;
    ?>
">
<div class="form-group">
<input type="text" class="form-control" style="width:48px" name="gd" placeholder="day" value="<?php 
    echo $gd;
    ?>
" size="2" maxlength="2" id="gd" pattern="\d*">
<?php 
    global $MoY_long;
    echo html_form_select("gm", $MoY_long, $gm, 0, "", false, 'class="form-control" style="width:120px"');
    ?>
<input type="text" class="form-control" style="width:66px" name="gy" placeholder="year" value="<?php 
    echo $gy;
    ?>
" size="4" maxlength="4" id="gy" pattern="\d*">
</div><!-- .form-group -->
<div class="clearfix">
<div class="checkbox">
<label class="checkbox" for="gs"><input type="checkbox" name="gs" value="on" id="gs">
After sunset</label>
</div><!-- .checkbox -->
</div><!-- .clearfix -->
<div class="form-group">
<button name="g2h" type="submit" value="1" class="btn btn-primary"><i class="glyphicon glyphicon-refresh"></i> Convert to Hebrew</button>
</div><!-- .form-group -->
</form>
</div><!-- .col-sm-6 -->

<div class="col-sm-6">
<h5>Convert from Hebrew to Gregorian date</h5>
<form class="form-inline" action="<?php 
    echo $action;
    ?>
">
<div class="form-group">
<input type="text" class="form-control" style="width:48px" name="hd" placeholder="day" value="<?php 
    echo $hd;
    ?>
" size="2" maxlength="2" id="hd" pattern="\d*">
<?php 
    echo html_form_select("hm", $hmstr_to_hebcal, $hm, 0, "", false, 'class="form-control" style="width:120px"');
    ?>
<input type="text" class="form-control" style="width:66px" name="hy" placeholder="year" value="<?php 
    echo $hy;
    ?>
" size="4" maxlength="4" id="hy" pattern="\d*">
</div><!-- .form-group -->
<div class="clearfix">
<div class="form-group">
<button name="h2g" type="submit" value="1" class="btn btn-primary"><i class="glyphicon glyphicon-refresh"></i> Convert to Gregorian</button>
</div><!-- .form-group -->
</div><!-- .clearfix -->
</form>
</div><!-- .col-sm-6 -->
</div><!-- .row -->
</div><!-- #converter-form -->
<?php 
    my_footer();
    exit;
}
Exemple #6
0
<?php

session_start();
include 'functions.php';
my_header('Регистрация');
if (!$_SESSION['is_logged'] == true) {
    if ($_POST['form_submit'] == 1) {
        $login = trim($_POST['login']);
        $pas = trim($_POST['pass']);
        $pas2 = trim($_POST['pass2']);
        $email = trim($_POST['mail']);
        $name = trim($_POST['name']);
        if (strlen($login) < 4) {
            $error_array['login'] = '******';
        }
        if (strlen($pas) < 4) {
            $error_array['pass'] = '******';
        }
        if ($pas != $pas2) {
            $error_array['pass2'] = 'Паролите не въпадат!';
        }
        if (!preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+\$/", $email)) {
            $error_array['mail'] = 'Невалиден Email адрес!';
        }
        if (!preg_match("/^[a-zA-Z0-9_]{3,16}\$/", $name)) {
            $error_array['name'] = 'Невалидно име!';
        }
        if (!count($error_array) > 0) {
            db_init();
            $sql = 'SELECT COUNT(*) as cnt FROM users WHERE login="******" OR email="' . addslashes($email) . '"';
            $res = run_q($sql);
Exemple #7
0
<?php

session_start();
include 'functions.php';
my_header('Форум');
echo '<h1>Здравейте!</h1>';
echo '<p>Som TEXT</p>';
footerFunction();
Exemple #8
0
<?php

require_once 'pre.php';
require_once 'common/event/EventManager.class.php';
require_once 'www/my/my_utils.php';
require_once 'common/include/CSRFSynchronizerToken.class.php';
require_once 'common/mail/MailManager.class.php';
session_require(array('isloggedin' => '1'));
$em = EventManager::instance();
my_header(array('title' => $Language->getText('account_options', 'preferences')));
$user = UserManager::instance()->getCurrentUser();
// ############################# Preferences
echo '<h3>' . $Language->getText('account_options', 'preferences') . '</h3>';
?>
<FORM action="updateprefs.php" method="post">
<?php 
$csrf = new CSRFSynchronizerToken('/account/preferences.php');
echo $csrf->fetchHTMLInput();
?>
<table>
    <tr><td width="50%"></td><td></td></tr>
    <tr valign="top">
        <td>
            <fieldset>
                <legend><?php 
echo $Language->getText('account_preferences', 'email_settings');
?>
</legend>
<p>
  <INPUT type="checkbox" name="form_mail_site" value="1" <?php 
echo $user->getMailSiteUpdates() ? 'checked="checked"' : '';
Exemple #9
0
<?php

session_start();
include 'functions.php';
my_header('вход');
if ($_POST['form_login'] == 1) {
    $login = trim($_POST['login_name']);
    $pass = trim($_POST['login_pass']);
    if (strlen($login) > 3 && strlen($pass) > 3) {
        db_init();
        $rs = run_q('SELECT * FROM users WHERE login = "******" AND password = "******"');
        if (mysql_num_rows($rs) == 1) {
            $row = mysql_fetch_assoc($rs);
            if ($row['active'] == 1) {
                $_SESSION['is_logged'] = true;
                $_SESSION['user_info'] = $row;
                header('Location:index.php');
                exit;
            } else {
                echo 'Достъпът ви е спрян!!!';
            }
        } elseif (mysql_num_rows($rs) == 0) {
            $errorname = 'Грешно име или парола!';
        } else {
            echo '<h1 style="text-align:center" color="red">FATAL ERROR!!!</h1>';
            //ЗАПИСВАНЕ НА ДАННИТЕ НА ПОТРЕБИТЕЛЯ.
        }
    }
}
?>
Exemple #10
0
    if (user_is_super_user() && !license_already_displayed()) {
        session_redirect("/admin/approve_license.php");
    }
    // Make sure this page is not cached because
    // it uses the exact same URL for all user's
    // personal page
    header("Cache-Control: no-cache, must-revalidate");
    // for HTTP 1.1
    header("Pragma: no-cache");
    // for HTTP 1.0
    if (browser_is_netscape4()) {
        $feedback .= $Language->getText('my_index', 'err_badbrowser');
    }
    $title = $Language->getText('my_index', 'title', array($hp->purify(user_getrealname(user_getid()), CODENDI_PURIFIER_CONVERT_HTML) . ' (' . user_getname() . ')'));
    $GLOBALS['HTML']->includeJavascriptFile('/scripts/scriptaculous/scriptaculous.js');
    my_header(array('title' => $title));
    echo '<p>' . $Language->getText('my_index', 'message') . '</p>';
    $lm = new WidgetLayoutManager();
    $lm->displayLayout(user_getid(), WidgetLayoutManager::OWNER_TYPE_USER);
    echo show_priority_colors_key();
    ?>
    </span>
<?php 
    $request =& HTTPRequest::instance();
    if ($request->get('pv') == 2) {
        $GLOBALS['Response']->pv_footer(array());
    } else {
        site_footer(array());
    }
} else {
    exit_not_logged_in();
Exemple #11
0
<?php

session_start();
include 'functions.php';
my_header('За мен');
selectionMenu();
$photo = '<br><img src="fotos/photo.JPG" alt="Снимка" class="right"/>';
echo $photo;
echo '<h1 style="text-align:center">Здравейте!</h1>';
footerFunction();