Example #1
0
/** Luo otsikot
 */
function create_headings()
{
    // to make mainheader without a link
    echo "<div class='top_header'>";
    subheader("Recent Questions", false);
    create_tab_box_question();
    echo "</div>";
}
Example #2
0
/** Luo HTML alaotsikko vastauksille
 * @param $question_id integer
 */
function create_subheader_for_answers($question_id)
{
    /* $result_answers array
     * $number_of_answers integer
     */
    $result_answers = fetch_answers($question_id);
    // to print subheader for Answers
    $number_of_answers = pg_num_rows($result_answers);
    if ($number_of_answers == 1) {
        subheader($number_of_answers . " Answer");
    } else {
        if ($number_of_answers == 0) {
            subheader("Be the first answerer");
        } else {
            echo "<div id='subheader'>" . "<h2>" . $number_of_answers . " Answers" . "</h2>";
            create_tab_box_thread($question_id);
            echo "</div>";
        }
    }
}
Example #3
0
/** 
 * Luo otsikot
 */
function create_headings()
{
    /* 
     * $end_array array
     */
    $end_array = get_tags();
    // to check if 0 messages
    if (count($end_array) == 0) {
        mainheader("Questions tagged by " . $_GET['tag'], false);
        subheader(count($end_array) . " Questions", false);
    } else {
        if (count($end_array) == 1) {
            mainheader("Questions tagged by " . $_GET['tag'], false);
            subheader(count($end_array) . " Question", false);
        } else {
            mainheader("Questions tagged by " . $_GET['tag'], false);
            create_tab_box_question_tags($_GET['tag']);
            subheader(count($end_array) . " Questions", false);
        }
    }
}
Example #4
0
/*
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "functions.php";
include "../" . USER_DIRECTORY . "/header.php";
$js = "<script type=\"text/javascript\" src=\"{$website}/" . JS_DIRECTORY . "/jquery.timeago.js\"></script>\n<script type=\"text/javascript\">\n\$(function() {\n\t\$(\".micro\").timeago();\n});\n</script>";
subheader(_("SQL Logs"), null, $js);
if ($sesslife == true) {
    if ($is_admin == 1) {
        echo "<div class=\"page-header\"><h1>" . _("SQL Logs") . "</h1></div>";
        echo "<h6>" . _("Options") . " : <a href=\"{$website}/" . ADMIN_DIRECTORY . "/clear-logs\">" . _("Clear SQL Logs") . "</a></h6><br/>";
        echo "<ul class=\"breadcrumb\">\n\t\t<li><a href=\"{$website}/" . ADMIN_DIRECTORY . "/settings\">" . _("Home") . "</a> <span class=\"divider\">/</span></li>\n\t\t<li class=\"active\">" . _("SQL Logs") . "</li>\n\t\t</ul>";
        echo "<table class=\"table table-condensed\">";
        echo "<thead><tr>\n\t\t<th>" . _("ID") . "</th>\n\t\t<th>" . _("Filename") . "</th>\n\t\t<th>" . _("Size") . "</th>\n\t\t<th>" . _("Date") . "</th>\n\t\t</tr></thead>";
        echo "<tbody>";
        /*
        setting $id to 1 to displaying numbering in the table.
        */
        $id = 1;
        foreach (new DirectoryIterator("../" . MODS_DIRECTORY . "/logs") as $file) {
            if ($file->isFile() === true) {
                $filename = htmlentities($file->getBasename());
Example #5
0
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
/*
	Include required files as per the admin option of inbuilt captcha enabled or not.
	*/
if ($inbuilt_captcha == 1) {
    include "../" . MODS_DIRECTORY . "/captcha/php-captcha.inc.php";
} else {
    include "../" . MODS_DIRECTORY . "/recaptchalib.php";
}
include "../" . USER_DIRECTORY . "/header.php";
subheader(_("Contact Us"));
if (isset($_POST["contact"])) {
    /*
	making the error variable null before executing the form submission.
	*/
    $err = null;
    $email = cleanInput($_POST["email"]);
    $usermessage = cleanInput($_POST["message"]);
    if ($inbuilt_captcha == 1) {
        if (PhpCaptcha::Validate($_POST["user_code"])) {
            $is_captcha_true = true;
        } else {
            $is_captcha_true = false;
        }
Example #6
0
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
/*
include required files as per the admin option of inbuilt captcha enabled or not.
*/
if ($inbuilt_captcha == 1) {
    include "../" . MODS_DIRECTORY . "/captcha/php-captcha.inc.php";
} else {
    include "../" . MODS_DIRECTORY . "/recaptchalib.php";
}
include "header.php";
/* extra js file to be included for the show password option (jquery). */
$js = "<script type=\"text/javascript\" src=\"{$website}/" . JS_DIRECTORY . "/jquery.showpassword.js\"></script>\n<script type=\"text/javascript\">\n\$(function() {\n\$('#pass').showPassword('#showpass');\n});\n</script>";
subheader(_("Register"), null, $js);
if ($sesslife == false) {
    /*
    this is to ensure that the user session is false. If it is true, throw an error.
    */
    if (isset($_POST["join"])) {
        /*
        input sanitization class to filter the user input and show errors if they contain malicious entry.
        */
        $first_name = cleanInput($_POST["first_name"]);
        $last_name = cleanInput($_POST["last_name"]);
        $email = cleanInput($_POST["email"]);
        $password = cleanInput($_POST["pass"]);
        /*
        if email and password are not empty. If they are show an error and display the form.
        */
Example #7
0
<?php

/*
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "header.php";
subheader(_("Close Account"));
if ($sesslife == true) {
    echo "<div class=\"page-header\"><h1>" . _("Close Account") . "</h1></div>";
    if (isset($_POST["closeaccount"])) {
        /*
        deleting the user access information from the application.
        */
        try {
            $q = "DELETE FROM `access` WHERE `userid` = :userid";
            $q_do = $db->prepare($q);
            $q_do->bindParam(':userid', $userid, PDO::PARAM_INT);
            $q_do->execute();
        } catch (PDOException $e) {
            $log->logError($e . " - " . basename(__FILE__));
        }
        /*
Example #8
0
<?php

/**
 * @brief   Tee sisaankirjautuminen
 * @file    login.php
 */
// change the layout by adding question form by getting data
echo "<div id='login_box'>";
subheader("Login or Register", false);
echo "<div id='registration_login'>";
include './forms/lomake_login.php';
echo " <p> or </p>";
include './forms/lomake_registration.php';
echo "</div>";
echo "</div>";
Example #9
0
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "functions.php";
include "../" . MODS_DIRECTORY . "/class.ip2country.php";
include "../" . USER_DIRECTORY . "/header.php";
$js = "<script type=\"text/javascript\" src=\"{$website}/" . JS_DIRECTORY . "/jquery.timeago.js\"></script>\n<script type=\"text/javascript\">\njQuery(document).ready(function(\$) {\n\t\$(\".micro\").timeago();\n});\n</script>";
subheader(_("Access Logs"), null, $js);
if ($sesslife == true) {
    if ($is_admin == 1) {
        /*
        $err holds the most recent error for the photos page and displays it on the page.
        */
        $err = null;
        if (isset($_GET["p"])) {
            $page = intval($_GET["p"]);
        } else {
            $page = 1;
        }
        $max_show = 15;
        try {
            $q = "SELECT * FROM `access` ORDER BY `id` DESC";
            $q_do = $db->prepare($q);
Example #10
0
/*
include required files as per the admin option of inbuilt captcha enabled or not.
*/
if ($inbuilt_captcha == 1) {
    include "../" . MODS_DIRECTORY . "/captcha/php-captcha.inc.php";
} else {
    include "../" . MODS_DIRECTORY . "/recaptchalib.php";
}
include "header.php";
/*
show this page only if the user verification is enabled by the admin. Otherwise, show the page not found error.
*/
if ($user_verification == 1) {
    subheader(_("Resend confirmation email"));
} else {
    subheader(_("Error"));
}
if ($user_verification == 1) {
    if ($sesslife == false) {
        if (isset($_POST["resend"])) {
            $email = cleanInput($_POST["email"]);
            if (!empty($email)) {
                if ($inbuilt_captcha == 1) {
                    if (PhpCaptcha::Validate($_POST["user_code"])) {
                        $is_captcha_true = true;
                    } else {
                        $is_captcha_true = false;
                    }
                } else {
                    $resp = recaptcha_check_answer($_setting['recaptcha_private'], $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
                    if ($resp->is_valid) {
Example #11
0
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
/*
include required files as per the admin option of inbuilt captcha enabled or not.
*/
if ($inbuilt_captcha == 1) {
    include "../" . MODS_DIRECTORY . "/captcha/php-captcha.inc.php";
} else {
    include "../" . MODS_DIRECTORY . "/recaptchalib.php";
}
include "header.php";
subheader(_("Forgot Password"));
if ($sesslife == false) {
    if (isset($_POST["forgot"])) {
        $email = cleanInput($_POST["email"]);
        if (!empty($email)) {
            if ($inbuilt_captcha == 1) {
                if (PhpCaptcha::Validate($_POST["user_code"])) {
                    $is_captcha_true = true;
                } else {
                    $is_captcha_true = false;
                }
            } else {
                $resp = recaptcha_check_answer($_setting['recaptcha_private'], $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
                if ($resp->is_valid) {
                    $is_captcha_true = true;
                } else {
Example #12
0
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
/* include required files as per the admin option of inbuilt captcha enabled or not. */
if ($inbuilt_captcha == 1) {
    include "../" . MODS_DIRECTORY . "/captcha/php-captcha.inc.php";
} else {
    include "../" . MODS_DIRECTORY . "/recaptchalib.php";
}
include "header.php";
subheader(_("Login"));
if (isset($_GET["r"])) {
    $r = cleanInput($_GET["r"]);
}
if ($r == "verify") {
    if ($sesslife == false) {
        showcaptcha();
    } else {
        echo "<div class=\"alert alert-error\"><strong>" . _("Active Session.") . "</strong><br/>" . _("You are already logged in to the website. This page cannot be accessed by a logged in user") . "</div>";
    }
} elseif ($r == "reg") {
    if ($sesslife == false) {
        am_showLogin();
    } else {
        echo "<div class=\"alert alert-error\"><strong>" . _("Active Session.") . "</strong><br/>" . _("You are already logged in to the website. This page cannot be accessed by a logged in user") . "</div>";
    }
Example #13
0
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "functions.php";
/*
including filewriter class to write the changes made to CSS files from the settings panel.
*/
include "../" . MODS_DIRECTORY . "/class.filewriter.php";
include "../" . USER_DIRECTORY . "/header.php";
$js = "<script src=\"{$website}/" . JS_DIRECTORY . "/jquery.hashchange.js\"></script>\n<script src=\"{$website}/" . JS_DIRECTORY . "/admin.base.js\"></script>";
subheader(_("Site Settings"), null, $js);
if ($sesslife == true) {
    if ($is_admin == 1) {
        /*
        processing the updated values if the form is submitted, else show the respective settings page to the admin.
        */
        if (isset($_POST["updatesettings"])) {
            if (isset($_POST["section"])) {
                $_section = cleaninput($_POST["section"]);
                if (!empty($_section)) {
                    if ($_section == "general") {
                        $web = cleanInput($_POST["website"]);
                        $webtitle = cleanInput($_POST["title"]);
                        $description = cleanInput($_POST["description"]);
                        $keywords = cleanInput($_POST["keywords"]);
                        $sending_email = cleanInput($_POST["sending_email"]);
Example #14
0
/*
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "../" . USER_DIRECTORY . "/header.php";
$js = "<script src=\"{$website}/" . JS_DIRECTORY . "/jquery.hashchange.js\"></script>\n<script src=\"{$website}/" . JS_DIRECTORY . "/admin.base.js\"></script>\n<script type=\"text/javascript\" src=\"{$website}/" . JS_DIRECTORY . "/jquery.timeago.js\"></script>\n<script type=\"text/javascript\">\n\$(function() {\n\t\$(\".micro\").timeago();\n});\n</script>";
subheader(_("Edit Profile"), null, $js);
if ($sesslife == true) {
    if (isset($_POST["editprofile"])) {
        $first_name = cleanInput($_POST["first_name"]);
        $last_name = cleanInput($_POST["last_name"]);
        $bio = cleanInput($_POST["bio"]);
        try {
            $update_user = "******";
            $update_user_do = $db->prepare($update_user);
            $update_user_do->bindParam(':first_name', $first_name, PDO::PARAM_STR);
            $update_user_do->bindParam(':last_name', $last_name, PDO::PARAM_STR);
            $update_user_do->bindParam(':bio', $bio, PDO::PARAM_STR);
            $update_user_do->bindParam(':userid', $userid, PDO::PARAM_INT);
            $update_user_do->execute();
        } catch (PDOException $e) {
            $log->logError($e . " - " . basename(__FILE__));
Example #15
0
<?php

/*
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "../" . USER_DIRECTORY . "/header.php";
subheader(_("Terms of Service"));
?>
<div class="page-header">
	<h1><?php 
echo _("Terms of Service");
?>
</h1>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin lacus purus, dictum vel tempus eu, sodales non ante. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla blandit turpis vel erat laoreet id molestie purus pulvinar. Mauris elementum magna at nisi laoreet malesuada. Suspendisse malesuada, risus eget dapibus volutpat, nulla dui tincidunt sem, sed tempus metus velit a orci. Etiam in dui mi, sed imperdiet enim. Proin et neque sit amet odio pellentesque ullamcorper ac quis lacus. Quisque in libero quis libero pulvinar semper id eu risus. In eu scelerisque elit. Aliquam vel libero enim. Sed vel risus at diam fermentum sodales a non ligula.<br/><br/>
In malesuada purus eu tortor rhoncus in rutrum turpis fermentum. Nunc eget posuere ipsum. Vivamus neque tortor, tempus vitae pharetra sit amet, pulvinar vitae lorem. Nulla sapien diam, facilisis placerat pellentesque ac, viverra ac justo. Fusce sollicitudin sapien eu mi auctor molestie. Nulla id elit quis justo varius auctor. Sed at risus lorem, tempor tristique arcu. Aliquam at orci sed massa aliquam venenatis. Donec ullamcorper convallis diam, ut tincidunt purus tristique ac. Sed non eros rhoncus purus sollicitudin consequat. Fusce bibendum metus neque.<br/><br/>
Nulla eu eros sit amet metus eleifend facilisis quis vitae tortor. Proin iaculis tincidunt sapien nec pretium. Ut malesuada augue eget tellus tristique scelerisque. Suspendisse ligula nisl, mattis eget aliquet sit amet, tristique in est. Proin aliquet, velit eget consequat faucibus, urna lacus malesuada lacus, nec pretium justo enim eget felis. Integer lobortis varius odio vel aliquam. Suspendisse in mi ut dolor rhoncus rutrum. Nullam at tempor dolor. Ut vel arcu eros. Sed eget justo id magna ullamcorper accumsan at ut felis. Aliquam erat volutpat. Nulla facilisi. Integer adipiscing sagittis lorem, ut convallis elit blandit ut.<br/><br/>
Quisque pellentesque, mi at facilisis rhoncus, orci magna aliquet eros, vel feugiat elit justo sed augue. In aliquet sagittis iaculis. Etiam blandit diam libero. Mauris imperdiet nunc vel dolor vehicula volutpat. Quisque non sapien et lectus dignissim varius vitae vitae sem. Suspendisse potenti. Mauris sit amet nibh in sem vehicula laoreet. Nulla laoreet, nisl eget malesuada laoreet, augue nunc pellentesque nunc, eu placerat mi quam id mi. Fusce consectetur metus sed dui facilisis posuere. Sed quis quam nulla, sodales bibendum dui. Donec vitae nulla non quam dapibus elementum. Pellentesque mi neque, euismod quis porttitor vel, convallis ac urna. Phasellus et lacus eget justo sodales pulvinar at tempus velit.</p><br/>
<?php 
include "../" . USER_DIRECTORY . "/footer.php";
Example #16
0
/*
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "header.php";
/* extra js file to be included for the show password option (jquery). */
$js = "<script type=\"text/javascript\" src=\"{$website}/" . JS_DIRECTORY . "/jquery.showpassword.js\"></script>\n<script type=\"text/javascript\">\n\$(function() {\n\t\$('#new_password').showPassword('#showpass');\n});\n</script>";
subheader(_("Change Password"), null, $js);
if ($sesslife == true) {
    echo "<div class=\"page-header\"><h1>" . _("Change Password") . "</h1></div>";
    if (isset($_POST["changepassword"])) {
        $current_password = cleanInput($_POST["current_password"]);
        $new_password = cleanInput($_POST["new_password"]);
        if (!empty($current_password) && !empty($new_password)) {
            /* changing the current password to the encrypted format. */
            $current_password = generate_encrypted_password($current_password);
            if ($current_password == $userpass) {
                $new_password = generate_encrypted_password($new_password);
                try {
                    $q = "UPDATE `members` SET `password` = :new_password WHERE `id` = :userid";
                    $q_do = $db->prepare($q);
                    $q_do->bindParam(':new_password', $new_password, PDO::PARAM_STR);
                    $q_do->bindParam(':userid', $userid, PDO::PARAM_INT);
Example #17
0
/*
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "init.php";
include USER_DIRECTORY . "/header.php";
$css = "<style>\nbody { background: url(images/grid-mask.png) 0 40px repeat-x; }\n</style>";
subheader(_("Home"), $css);
?>
<div class="row">
<div class="span6">
<div class="hero-unit">
	<h1>User authentication & management.</h1>
	<h2>Easy user management and a comprehensive admin panel. All, for you <3</h2>
	<p>
		<a href="http://www.stitchapps.com/products/auth-manager" class="btn btn-danger btn-large">Details on <strong>StitchApps</strong></a>
	</p>
</div>
</div>

<div class="span6">
	<h6 class="home-margin">Protect content in just few lines.</h6><br/>
	<pre>if($sesslife == true) {
Example #18
0
/*
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "functions.php";
include "../" . USER_DIRECTORY . "/header.php";
$js = "<script type=\"text/javascript\" src=\"{$website}/" . JS_DIRECTORY . "/jquery.timeago.js\"></script>\n<script type=\"text/javascript\">\n\$(function() {\n\t\$(\".micro\").timeago();\n});\n</script>\n<script type=\"text/javascript\" src=\"{$website}/" . JS_DIRECTORY . "/admin.base.js\"></script>";
subheader(_("Manage Users"), null, $js);
if ($sesslife == true) {
    if ($is_admin == 1) {
        /*
        $err holds the most recent error for the photos page and displays it on the page.
        */
        $err = null;
        /*
        for user actions i.e move to trash, delete forever and generate code etc.
        */
        if (isset($_POST["content_selector_2"])) {
            $sel = cleanInput($_POST["content_selector_2"]);
            if ($sel == "xx") {
                /* this is for deleting the photos forever from the server. */
                if (isset($_POST["users"])) {
                    $users = $_POST["users"];
Example #19
0
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "../" . MODS_DIRECTORY . "/analytics/class.analytics.php";
/*
including the charts class for displaying user activity for the past week.
*/
include "../" . MODS_DIRECTORY . "/charts/FusionCharts_Gen.php";
include "../" . USER_DIRECTORY . "/header.php";
$js = "<script language=\"javascript\" src=\"{$website}/" . JS_DIRECTORY . "/FusionCharts.js\"></script>";
subheader(_("Statistics"), null, $js);
if ($sesslife == true) {
    if ($is_admin == 1) {
        echo "<div class=\"page-header\"><h1>" . _("Statistics") . "</h1></div>";
        echo "<h6>" . _("Options") . " : <a href=\"{$website}/" . ADMIN_DIRECTORY . "/settings#/analytics\">" . _("Analytics Settings") . "</a></h6><br/>";
        echo "<ul class=\"breadcrumb\">\n\t\t<li><a href=\"{$website}/" . ADMIN_DIRECTORY . "/settings\">" . _("Home") . "</a> <span class=\"divider\">/</span></li>\n\t\t<li class=\"active\">" . _("Statistics") . "</li>\n\t\t</ul>";
        if (!empty($_setting['google_id']) && !empty($_setting['google_password']) && !empty($_setting['site_id'])) {
            echo "<div class=\"alert\">" . _("Google ID") . " : <strong>{$_setting['google_id']}</strong>&nbsp;&nbsp;&nbsp;" . _("Site ID") . " : <strong>{$_setting['site_id']}</strong></div>";
            $analytics = new analytics($_setting['google_id'], $_setting['google_password']);
            $analytics->setProfileById("ga:" . $_setting['site_id']);
            $analytics->setMonth(date("n"), date("Y"));
            $month = date("M");
            $visitors = $analytics->getVisitors();
            $total = count($visitors);
            $basic = 0;
            $count = "01";
Example #20
0
/*
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "functions.php";
include "../" . USER_DIRECTORY . "/header.php";
$js = "<script src=\"{$website}/" . JS_DIRECTORY . "/jquery.hashchange.js\"></script>\n<script src=\"{$website}/" . JS_DIRECTORY . "/admin.base.js\"></script>";
subheader(_("Add User"), null, $js);
if ($sesslife == true) {
    if ($is_admin == 1) {
        if (isset($_POST["adduser"])) {
            /*
            input sanitization class to filter the user input and show errors if they contain malicious entry.
            */
            $first_name = cleanInput($_POST["first_name"]);
            $last_name = cleanInput($_POST["last_name"]);
            $password = cleanInput($_POST["pass"]);
            $email = cleanInput($_POST["email"]);
            $bio = cleanInput($_POST["bio"]);
            $verified = intval($_POST["verified"]);
            $join = date("Y-m-d H:i:s");
            /*
            getGuid() function generates a random unique 32 character unique key.
Example #21
0
        $log_file = "../" . MODS_DIRECTORY . "/logs/{$id}";
        if (file_exists($log_file)) {
            $page_title = _("Log - ") . "{$id}";
            $_loader = true;
        } else {
            $page_title = _("Error");
        }
    } else {
        $page_title = _("Error");
    }
} else {
    $page_title = _("Error");
}
include "functions.php";
include "../" . USER_DIRECTORY . "/header.php";
subheader($page_title);
if ($sesslife == true) {
    if ($is_admin == 1) {
        if ($_loader == true) {
            echo "<div class=\"page-header\"><h1>{$id}</h1></div>";
            echo "<ul class=\"breadcrumb\">\n\t\t\t<li><a href=\"{$website}/" . ADMIN_DIRECTORY . "/settings\">" . _("Home") . "</a> <span class=\"divider\">/</span></li>\n\t\t\t<li><a href=\"{$website}/" . ADMIN_DIRECTORY . "/sql-logs\">" . _("SQL Logs") . "</a> <span class=\"divider\">/</span></li>\n\t\t\t<li class=\"active\">{$id}</li>\n\t\t\t</ul>";
            $file_handle = fopen($log_file, "rb");
            if ($file_handle) {
                echo "<fieldset>";
                echo "<div class=\"control-group\">";
                echo "<div class=\"controls\">";
                if (filesize($log_file) > 0) {
                    echo "<textarea class=\"span12\" rows=\"18\" disabled>";
                    echo fread($file_handle, filesize($log_file));
                    echo "</textarea>";
                } else {
Example #22
0
this is to stop the session before any headers are sent by the script.
*/
if ($sesslife == true) {
    $session->stop();
    /*
    unset the cookie for the particular user whether it is set or not.
    */
    if (isset($_COOKIE["pauser"]) && isset($_COOKIE["papass"])) {
        $time = time();
        setcookie("pauser", "", $time - 3600 * 24 * 10, "/");
        setcookie("papass", "", $time - 3600 * 24 * 10, "/");
    }
    /*
    remove the session variables for the facebook authentication.
    */
    if (isset($_SESSION["code"])) {
        $_SESSION["code"] = null;
        $_SESSION["access_token"] = null;
    }
} else {
    echo "<meta http-equiv=\"Refresh\" content=\"0;url={$website}/\" />";
}
/*
ends the session over here and then send the headers from below.
*/
include "header.php";
subheader(_("Logout"));
echo "<center><div class=\"row\"><img src=\"{$website}/images/working.gif\" /><br/><br/>";
echo "</div></center>";
echo "<meta http-equiv=\"refresh\" content=\"1;url={$website}/\" />";
include "footer.php";
/**
 * Luo otsikko kysymyslistalle
 */
function create_headings()
{
    $end_array = get_tags();
    if (count($end_array) == 0) {
        mainheader($_GET['username'], false);
        subheader("0 Questions", false);
        return false;
    } else {
        mainheader($_GET['username'], false);
        create_tab_box_question_usernames($_GET['username']);
        subheader(count($end_array) . " Questions", false);
        return true;
    }
}
Example #24
0
<?php

/*
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "header.php";
subheader(_("Password Reset"));
if ($sesslife == false) {
    if (isset($_GET["k"])) {
        $key = cleanInput($_GET["k"]);
        if (!empty($key)) {
            if (isset($_GET["u"])) {
                $key_user = cleanInput($_GET["u"]);
                if (!empty($key_user)) {
                    try {
                        $check = "SELECT * FROM `members` WHERE `email` = :key_user AND `pass_reset_key` = :key";
                        $check_do = $db->prepare($check);
                        $check_do->bindParam(':key_user', $key_user, PDO::PARAM_STR);
                        $check_do->bindParam(':key', $key, PDO::PARAM_STR);
                        $check_do->execute();
                        $number = $db->query("SELECT FOUND_ROWS()")->fetchColumn();
                    } catch (PDOException $e) {
Example #25
0
<?php

/*
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "../" . USER_DIRECTORY . "/header.php";
subheader(_("Clear SQL Logs"));
if ($sesslife == true) {
    if ($is_admin == 1) {
        echo "<div class=\"page-header\"><h1>" . _("Clear SQL Logs") . "</h1></div>";
        if (isset($_POST["clearlogs"])) {
            /*
            getting the date to make sure that the current date's log file is not deleted.
            */
            $log_date = date("Y-m-d");
            /*
            deleting all sql logs present on the system.
            */
            foreach (new DirectoryIterator("../" . MODS_DIRECTORY . "/logs") as $fileInfo) {
                if (!$fileInfo->isDot() && $fileInfo->getFilename() != "log_{$log_date}.txt") {
                    unlink("../" . MODS_DIRECTORY . "/logs/" . $fileInfo->getFilename());
                }
Example #26
0
<?php

/*
	@! AuthManager v3.0
	@@ User authentication and management web application
-----------------------------------------------------------------------------	
	** author: StitchApps
	** website: http://www.stitchapps.com
	** email: support@stitchapps.com
	** phone support: +91 9871084893
-----------------------------------------------------------------------------
	@@package: am_authmanager3.0
*/
include "../init.php";
include "header.php";
subheader(_("Account"));
if ($sesslife == true) {
    echo "<div class=\"page-header\"><h1>" . _("Account") . "</h1></div>";
    echo "<div class=\"row\">";
    echo "<div class=\"span6\">";
    try {
        $q = "SELECT `email`, `key`, `join`, `access` FROM `members` WHERE `id` = :userid";
        $q_do = $db->prepare($q);
        $q_do->bindParam(':userid', $userid, PDO::PARAM_INT);
        $q_do->execute();
        $q_num = $db->query("SELECT FOUND_ROWS()")->fetchColumn();
    } catch (PDOException $e) {
        $log->logError($e . " - " . basename(__FILE__));
    }
    if (!empty($q_num)) {
        $f = $q_do->fetch(PDO::FETCH_ASSOC);