Jump to content

Help with 3rd party code...


ghostrider1

Recommended Posts

Hello everyone, I am fairly new to PHP and I got this project to fix... I need some help though, and im hoping someone can give me a hand...

Ok.. This site has a admin.php page, in this page, you can add departments and subdepartments, when I add a sub department, I fill all the blanks and submit the request... well.. the same page comes up without any subdepartments listed... I believe they are not being stored in the database..

Look at this code please and tell me if this might be a connection/permissions issue:

case 'addsubdepartment':
$display = 4;
$newChoice='Add Sub Department';
break;
case 'Add Sub Department':
if ($_REQUEST['start'] == ''){
$_REQUEST['start'] = 0;
}
$message=$department->SubDepartmentValidation();
if($message=='')
{
$extension = split('\.', $_FILES['subdeptphoto']['name']);
$photoext = $extension[sizeof($extension) - 1];
$extension = split('\.', $_FILES['subdeptdoc']['name']);
$docext = $extension[sizeof($extension) - 1];
$extension = split('\.', $_FILES['subdeptvideo']['name']);
$videoext = $extension[sizeof($extension) - 1];
$department->SetSubDepartment($_REQUEST,$photoext,$docext,$videoext);
$subdeptId = $department->AddSubDepartment();
if($_FILES['subdeptphoto']['name']){
upload_once($subdeptId,$_FILES,'subdeptphoto',$photoext);
}
if($_FILES['subdeptdoc']['name']){
upload_documents($subdeptId,$_FILES,'subdeptdoc',$docext);
}
if($_FILES['subdeptvideo']['name']){
upload_videos($subdeptId,$_FILES,'subdeptvideo',$videoext);

}
$department->GetSubDepartmentById($_REQUEST['deptid'],'limit '.$_REQUEST['start'].','.$_REQUEST['noofrecords']);
$display = 3;
}
else

{
$department->mDbArr=$_REQUEST;
$display = 4;
$newChoice='Add Sub Department';
}
break;
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.