Jump to content

please help me its urgent.


nancyaggarwal

Recommended Posts

Sir i m a fresher in php development so i m not so much familiar in "php classes" please help me its urgent.Sir my problem is i want to display an image on the "index page" only but when i write the coding of the image on the index page it will on the whole projects background becoz

"index page is call" on every another page......so wat is the solution for that.....to solve that

problem i have made new page and use image on that page.....but after that i have face one

more problem that is how i m able to redirect the url. on this page........becoz according to the url the first page is open is the index page  i just change the name of the files "index.php"  to "index1.php" and make new php file  using image and name it "index.php" it works but not properly it gives me the error........i dont under stand the proper path of the file plz help me....

This coding is done in PHP5..........

PROBLEM :-------------

Warning

Help

Missing file. Possible Module "companies" missing!

 

 

HERE IS THE CODE:---------------

 

$m = '';

$a = '';

$u = '';

 

// check if we are logged in

if ($AppUI->doLogin()) {

// load basic locale settings

$AppUI->setUserLocale();

@include_once( './locales/'.$AppUI->user_locale.'/locales.php' );

@include_once( './locales/core.php' );

setlocale( LC_TIME, $AppUI->user_lang );

$redirect = $_SERVER['QUERY_STRING']?strip_tags($_SERVER['QUERY_STRING']):'';

if (strpos( $redirect, 'logout' ) !== false) {

$redirect = '';

}

 

if (isset( $locale_char_set )) {

header('Content-type: text/html;charset='.$locale_char_set);

}

 

require DP_BASE_DIR.'/style/'.$uistyle.'/login.php';

// destroy the current session and output login page

session_unset();

session_destroy();

exit;

}

$AppUI->setUserLocale();

 

 

// bring in the rest of the support and localisation files

require_once DP_BASE_DIR.'/includes/permissions.php';

 

 

$def_a = 'index1';

if (! isset($_GET['m']) && !empty($dPconfig['default_view_m'])) {

  $m = $dPconfig['default_view_m'];

$def_a = !empty($dPconfig['default_view_a']) ? $dPconfig['default_view_a'] : $def_a;

$tab = $dPconfig['default_view_tab'];

} else {

// set the module from the url

$m = $AppUI->checkFileName(dPgetCleanParam( $_GET, 'm', getReadableModule() ));

}

// set the action from the url

$a = $AppUI->checkFileName(dPgetCleanParam( $_GET, 'a', $def_a));

 

/* This check for $u implies that a file located in a subdirectory of higher depth than 1

* in relation to the module base can't be executed. So it would'nt be possible to

* run for example the file module/directory1/directory2/file.php

* Also it won't be possible to run modules/module/abc.zyz.class.php for that dots are

* not allowed in the request parameters.

*/

 

$u = $AppUI->checkFileName(dPgetCleanParam( $_GET, 'u', '' ));

 

// load module based locale settings

@include_once DP_BASE_DIR.'/locales/'.$AppUI->user_locale.'/locales.php';

@include_once DP_BASE_DIR.'/locales/core.php';

 

setlocale( LC_TIME, $AppUI->user_lang );

$m_config = dPgetConfig($m);

@include_once DP_BASE_DIR.'/functions/' . $m . '_func.php';

 

// TODO: canRead/Edit assignements should be moved into each file

 

// check overall module permissions

// these can be further modified by the included action files

$perms =& $AppUI->acl();

$canAccess = $perms->checkModule($m, 'access');

$canRead = $perms->checkModule($m, 'view');

$canEdit = $perms->checkModule($m, 'edit');

$canAuthor = $perms->checkModule($m, 'add');

$canDelete = $perms->checkModule($m, 'delete');

 

if ( !$suppressHeaders ) {

// output the character set header

if (isset( $locale_char_set )) {

header('Content-type: text/html;charset='.$locale_char_set);

}

}

 

// include the module class file - we use file_exists instead of @ so

// that any parse errors in the file are reported, rather than errors

// further down the track.

$modclass = $AppUI->getModuleClass($m);

if (file_exists($modclass))

include_once( $modclass );

if ($u && file_exists(DP_BASE_DIR.'/modules/'.$m.'/'.$u.'/'.$u.'.class.php'))

include_once DP_BASE_DIR.'/modules/'.$m.'/'.$u.'/'.$u.'.class.php';

 

// do some db work if dosql is set

// TODO - MUST MOVE THESE INTO THE MODULE DIRECTORY

if (isset( $_REQUEST['dosql']) ) {

    //require('./dosql/' . $_REQUEST['dosql'] . '.php');

  require  DP_BASE_DIR.'/modules/'.$m.'/' . ($u ? ($u.'/') : '') . $AppUI->checkFileName($_REQUEST['dosql']) . '.php';

}

 

// start output proper

include  DP_BASE_DIR.'/style/'.$uistyle.'/overrides.php';

 

if(!$suppressHeaders) {

require DP_BASE_DIR.'/style/'.$uistyle.'/header.php';

}

if (! isset($_SESSION['all_tabs'][$m]) ) {

// For some reason on some systems if you don't set this up

// first you get recursive pointers to the all_tabs array, creating

// phantom tabs.

if (! isset($_SESSION['all_tabs'])) {

$_SESSION['all_tabs'] = array();

}

$_SESSION['all_tabs'][$m] = array();

$all_tabs =& $_SESSION['all_tabs'][$m];

foreach ($AppUI->getActiveModules() as $dir => $module) {

if (! $perms->checkModule($dir, 'access')) {

continue;

}

$modules_tabs = $AppUI->readFiles(DP_BASE_DIR.'/modules/'.$dir.'/', '^' . $m . '_tab.*\.php');

foreach($modules_tabs as $mod_tab) {

// Get the name as the subextension

// cut the module_tab. and the .php parts of the filename

// (begining and end)

$nameparts = explode('.', $mod_tab);

$filename = substr($mod_tab, 0, -4);

if (count($nameparts) > 3) {

$file = $nameparts[1];

if (! isset($all_tabs[$file])) {

$all_tabs[$file] = array();

}

$arr =& $all_tabs[$file];

$name = $nameparts[2];

} else {

$arr =& $all_tabs;

$name = $nameparts[1];

}

$arr[] = array(

'name' => ucfirst(str_replace('_', ' ', $name)),

'file' => DP_BASE_DIR . '/modules/' . $dir . '/' . $filename,

'module' => $dir);

 

/*

** Don't forget to unset $arr again! $arr is likely to be used in the sequel declaring

** any temporary array. This may lead to strange bugs with disappearing tabs (cf. #1767).

** @author: gregorerhardt @date: 20070203

*/

unset($arr);

}

}

} else {

$all_tabs =& $_SESSION['all_tabs'][$m];

}

 

$module_file = DP_BASE_DIR.'/modules/'.$m.'/'.($u?($u.'/'):'').$a.'.php';

if (file_exists($module_file)) {

  require $module_file;

}

else

{

// TODO: make this part of the public module?

// TODO: internationalise the string.

  $titleBlock = new CTitleBlock('Warning', 'log-error.gif');

  $titleBlock->show();

 

  echo $AppUI->_('Missing file. Possible Module "'.$m.'" missing!');

}

if(!$suppressHeaders) {

echo '<iframe name="thread" src="' . DP_BASE_URL . '/modules/index1.html" width="0" height="0" frameborder="0"></iframe>';

require DP_BASE_DIR.'/style/'.$uistyle.'/footer.php';

}

ob_end_flush();

?>

THANKS IN ADVANCE.

Link to comment
Share on other sites

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.