Exemplo n.º 1
0
                    $picfilename = 'dept_' . $dept_nr . '.' . $picext;
                    copy($_FILES['img']['tmp_name'], $root_path . $dept_logos_path . $picfilename);
                }
                header("location:dept_info.php" . URL_REDIRECT_APPEND . "&edit=1&mode=newdata&dept_nr={$dept_nr}");
                exit;
            } else {
                echo $dept_obj->getLastQuery . "<br>{$LDDbNoSave}";
            }
            break;
        case 'select':
            # Get department�s information
            $dept = $dept_obj->getDeptAllInfo($dept_nr);
            //while(list($x,$v)=each($dept)) $$x=$v;
            extract($dept);
            # Get departments phone info
            if ($dept_phone = $comm->DeptInfo($dept_nr)) {
                extract($dept_phone);
            }
    }
    // end of switch
}
$deptarray = $dept_obj->getAllActiveSort('name_formal');
$depttypes = $dept_obj->getTypes();
# Prepare title
$sTitle = "{$LDDepartment} :: ";
if ($mode == 'select') {
    $sTitle = $sTitle . $LDUpdate;
} else {
    $sTitle = $sTitle . $LDCreate;
}
# Start Smarty templating here