Help with PHP for website - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Help with PHP for website

hedgehog333hedgehog333 Posts: 1Member
Hello,
I'm setting up a website and when I try to access it at www.url.com/random/admin.php it brings up a login page. I enter my login details but it doesn't work. Here's my config.php script, hopefully someone can help me out.

<?
// config.php

// all varaibles must be defined

// mysql:
$conf[table] = "people"; // do not alter
$conf[ipnlog] = "ipnlog"; // do not alter
$conf[dbuser] = "danfai10_db";
$conf[dbpass] = "xxxxxxx";
$conf[dbname] = "danfai10_db";
$conf[dbhost] = "coconia.net";

// site specific:
$conf[domain] = "danfai10.coconia.net"; // without www or http://
$conf[subdir] = "random/"; // sub folder
$conf[bgcolor] = "#800000";
$conf[adminsremail] = "[email protected]"; // admin spam report email
$conf[rname] = "Big Cash Stormpay Randomizer!"; // Randomizer name
$conf[rcost] = "5"; // cost to pay sponsor
$conf[acost] = "5";
$conf[spay_admin] = "[email protected]";

// admin:
$conf[adminuser] = "admin";
$conf[adminpass] = "xxxxxxx";
$conf[fromemail] = "[email protected]";


$conf[ipn_code] = "ipncode";


// define price array
$plst['2.50'] = 1;
$plst['5.00'] = 2;
$plst['8.00'] = 4;
$plst['15.00'] = 8;
$plst['30.00'] = 16;
$plst['60.00'] = 30;
$plst['90.00'] = 50;
$plst['150.00'] = 100;
$plst['240.00'] = 200;
$plst['400.00'] = 500;

function output_content($layout, $cont = '') {
global $conf;
$fp = fopen($layout.".html", "r");
$content = '';
while(!feof($fp)) {
$content .= fread($fp, 1024);
}
fclose($fp);
$content = str_replace("%{r_name}", $conf[rname], $content);
$content = str_replace("%{admin_semail}", $conf[adminsremail], $content);
$content = str_replace("%{bgcolor}", $conf[bgcolor], $content);
$content = str_replace("%{r_amount}", $conf[rcost], $content);
if($layout == "admin") {
$content = str_replace("%{admin}", $cont, $content);
} else {
$content = str_replace("%{s_domain}", $conf[domain], $content);
$content = str_replace("%{s_dir}", $conf[subdir], $content);
$content = str_replace("%{a_amount}", $conf[acost], $content);
$content = str_replace("%{p_email}", $conf[spay_admin], $content);
}
return($content);
}

Comments

  • tvientitvienti Posts: 230Member
    You're going to have to give us some more information than that. For starters, when you say "it doesn't work", what exactly do you mean?

    : Hello,
    : I'm setting up a website and when I try to access it at www.url.com/random/admin.php it brings up a login page. I enter my login details but it doesn't work. Here's my config.php script, hopefully someone can help me out.
    :
    : <?
    : // config.php
    :
    : // all varaibles must be defined
    :
    : // mysql:
    : $conf[table] = "people"; // do not alter
    : $conf[ipnlog] = "ipnlog"; // do not alter
    : $conf[dbuser] = "danfai10_db";
    : $conf[dbpass] = "xxxxxxx";
    : $conf[dbname] = "danfai10_db";
    : $conf[dbhost] = "coconia.net";
    :
    : // site specific:
    : $conf[domain] = "danfai10.coconia.net"; // without www or http://
    : $conf[subdir] = "random/"; // sub folder
    : $conf[bgcolor] = "#800000";
    : $conf[adminsremail] = "[email protected]"; // admin spam report email
    : $conf[rname] = "Big Cash Stormpay Randomizer!"; // Randomizer name
    : $conf[rcost] = "5"; // cost to pay sponsor
    : $conf[acost] = "5";
    : $conf[spay_admin] = "[email protected]";
    :
    : // admin:
    : $conf[adminuser] = "admin";
    : $conf[adminpass] = "xxxxxxx";
    : $conf[fromemail] = "[email protected]";
    :
    :
    : $conf[ipn_code] = "ipncode";
    :
    :
    : // define price array
    : $plst['2.50'] = 1;
    : $plst['5.00'] = 2;
    : $plst['8.00'] = 4;
    : $plst['15.00'] = 8;
    : $plst['30.00'] = 16;
    : $plst['60.00'] = 30;
    : $plst['90.00'] = 50;
    : $plst['150.00'] = 100;
    : $plst['240.00'] = 200;
    : $plst['400.00'] = 500;
    :
    : function output_content($layout, $cont = '') {
    : global $conf;
    : $fp = fopen($layout.".html", "r");
    : $content = '';
    : while(!feof($fp)) {
    : $content .= fread($fp, 1024);
    : }
    : fclose($fp);
    : $content = str_replace("%{r_name}", $conf[rname], $content);
    : $content = str_replace("%{admin_semail}", $conf[adminsremail], $content);
    : $content = str_replace("%{bgcolor}", $conf[bgcolor], $content);
    : $content = str_replace("%{r_amount}", $conf[rcost], $content);
    : if($layout == "admin") {
    : $content = str_replace("%{admin}", $cont, $content);
    : } else {
    : $content = str_replace("%{s_domain}", $conf[domain], $content);
    : $content = str_replace("%{s_dir}", $conf[subdir], $content);
    : $content = str_replace("%{a_amount}", $conf[acost], $content);
    : $content = str_replace("%{p_email}", $conf[spay_admin], $content);
    : }
    : return($content);
    : }
    :

Sign In or Register to comment.