function bh_filelink_uri($filecode) { return bh_get_weburi() . "filelink.php?filecode=" . $filecode; }
} elseif (empty($signup['email'])) { bh_log($bhlang['error:email_empty'], BH_ERROR); # Open layout object $layoutobj = new bhlayout("signup"); # Send the file listing to the layout, along with directory name $layoutobj->title = $bhlang['title:signup']; $layoutobj->content1 = $_POST['signup']; $layoutobj->display(); } else { # Good. Now sign them up. # Add a registrations row $regid = md5(rand(1, 99999999) . rand(1, time()) . microtime()); # Dispatch an email $emailobj = new bhemail($signup['email']); $emailobj->subject = str_replace("#SITENAME#", $bhconfig['sitename'], $bhlang['emailsubject:registration_validation']); $emailobj->message = str_replace("#LINK#", bh_get_weburi() . "/index.php?page=signup&confirmregid={$regid}&username={$username}", $bhlang['email:registration_validation']); $emailaway = $emailobj->send(); if ($emailaway == false) { # Open layout object $layoutobj = new bhlayout("generic"); # Send the file listing to the layout, along with directory name $layoutobj->title = $bhlang['title:signup']; $layoutobj->content1 = "<br><br>" . $bhlang['error:email_error']; $layoutobj->display(); } else { insert_bhdb("registrations", array("regid" => $regid, "username" => $username, "password" => md5($signup['pass1']), "fullname" => $signup['fullname'], "email" => $signup['email'], "status" => "0", "regtime" => time())); bh_log($bhlang['log:user_signed_up_'] . $username, "BH_SIGNUP"); # Open layout object $layoutobj = new bhlayout("generic"); # Send the file listing to the layout, along with directory name $layoutobj->title = $bhlang['title:signup'];
$layoutobj = new bhlayout("generic"); # Send the file listing to the layout, along with directory name $layoutobj->title = $bhlang['title:recover_password']; $layoutobj->content1 = "<br><br>" . $bhlang['error:email_doesnt_exist']; $layoutobj->display(); } else { # Insert a password reset request row for that username $username = $userirows[0]['username']; $resetid = md5(time() . rand(1, 99999) . rand(54, time())); insert_bhdb("passwordresets", array("username" => $username, "resetid" => $resetid, "time" => time())); # Get their email address $emailaddr = $userirows[0]['itemcontent']; # Email them about it with the validation link $emailobj = new bhemail($emailaddr); $emailobj->subject = str_replace("#SITENAME#", $bhconfig['sitename'], $bhlang['emailsubject:passreset_u_request']); $emailobj->message = str_replace("#LINK#", bh_get_weburi() . "/index.php?page=passreset&doresetid={$resetid}&username={$username}", str_replace("#USERNAME#", $username, $bhlang['email:passreset_u_request'])); $emailaway = $emailobj->send(); if ($emailaway == false) { # Open layout object $layoutobj = new bhlayout("generic"); # Send the file listing to the layout, along with directory name $layoutobj->title = $bhlang['title:signup']; $layoutobj->content1 = "<br><br>" . $bhlang['error:email_error']; $layoutobj->display(); } else { # Open layout object $layoutobj = new bhlayout("generic"); # Send the file listing to the layout, along with directory name $layoutobj->title = $bhlang['title:signup']; $layoutobj->content1 = "<br><br>" . $bhlang['notice:passreset_request_sent']; $layoutobj->display();
<?php /* * ByteHoard 2.1 * Copyright (c) Andrew Godwin & contributors 2004 * * Installer2 - Page File * $Id$ * */ $pagearray = array(); $pagearray['title'] = $bhlang['install:title:bytehoard_installation'] . " :: " . $bhlang['install:title:set_paths']; # Get miscellaneous include require_once "../includes/misc.inc.php"; $pagearray['content'] = $bhlang['install:paths:intro'] . "\n<br><br>\n<form action='index.php?page=install_complete' method='POST'>\n<table><tr><td>" . $bhlang['install:paths:system_url'] . "</td><td><input type='textbox' name='install[baseuri]' value='" . bh_get_weburi() . "' size='50'></td></tr>\n<tr><td>" . $bhlang['install:paths:file_storage_directory'] . "</td><td><input type='textbox' name='install[fileroot]' value='filestorage/' size='50'></td></tr>\n<tr><td colspan='2'><input type='submit' value='" . $bhlang['button:save_settings'] . "'></td></tr></table></form>"; return $pagearray;