GetRow($current_box_query);
?>
|
| |
|
Execute($db_file_result_raw);
$file_count = 0;
while ($files = $db_file_result->fields) {
$file_count++;
if (((!$_GET['fID']) || ($_GET['fID'] == $files['admin_files_id'])) && (!$fInfo) ) {
$fInfo = new objectInfo($files);
}
if (isset($fInfo) && is_object($fInfo) && ($files['admin_files_id'] == $fInfo->admin_files_id) ) {
echo ' ' . "\n";
} else {
echo ' ' . "\n";
}
?>
|
admin_files_id) ) { echo ''; } else { echo ''; } ?> |
MoveNext();
}
?>
|
|
|
|
Execute($installed_boxes_query);
$installed_boxes = array();
while($db_boxes = $installed_boxes_result->fields) {
$installed_boxes[] = $db_boxes['admin_boxes_name'];
// Move that ADOdb pointer!
$installed_boxes_result->MoveNext();
}
$none = 0;
$boxes = array();
$dir = dir(OOS_ABSOLUTE_PATH . 'admin/includes/boxes/');
while ($boxes_file = $dir->read()) {
if ( (substr("$boxes_file", -4) == '.php') && !(in_array($boxes_file, $installed_boxes))){
$boxes[] = array('admin_boxes_name' => $boxes_file,
'admin_boxes_id' => 'b' . $none);
} elseif ( (substr("$boxes_file", -4) == '.php') && (in_array($boxes_file, $installed_boxes))) {
$db_boxes_id_query = "SELECT admin_files_id AS admin_boxes_id FROM " . $oostable['admin_files'] . " WHERE admin_files_is_boxes = 1 AND admin_files_name = '" . intval($boxes_file) . "'";
$db_boxes_id = $dbconn->GetRow($db_boxes_id_query);
$boxes[] = array('admin_boxes_name' => $boxes_file,
'admin_boxes_id' => $db_boxes_id['admin_boxes_id']);
}
$none++;
}
$dir->close();
sort($boxes);
reset ($boxes);
$boxnum = count($boxes);
$i = 0;
while ($i < $boxnum) {
if (((!$_GET['cID']) || ($_GET['none'] == $boxes[$i]['admin_boxes_id']) || ($_GET['cID'] == $boxes[$i]['admin_boxes_id'])) && (!$cInfo) ) {
$cInfo = new objectInfo($boxes[$i]);
}
if (isset($cInfo) && is_object($cInfo) && ($boxes[$i]['admin_boxes_id'] == $cInfo->admin_boxes_id) ) {
if ( substr("$cInfo->admin_boxes_id", 0,1) == 'b') {
echo ' ' . "\n";
} else {
echo ' ' . "\n";
}
} else {
echo ' ' . "\n";
}
?>
' . ucfirst (substr_replace ($boxes[$i]['admin_boxes_name'], '' , -4)) . ''; ?> |
' . oos_image(OOS_IMAGES . 'icon_status_green_light.gif', STATUS_BOX_INSTALL, 10, 10) . '';
} else {
echo '' . oos_image(OOS_IMAGES . 'icon_status_red_light.gif', STATUS_BOX_REMOVE, 10, 10) . ' ' . oos_image(OOS_IMAGES . 'icon_status_green.gif', STATUS_BOX_INSTALLED, 10, 10);
}
} else {
if (substr($boxes[$i]['admin_boxes_id'], 0,1) == 'b') {
echo oos_image(OOS_IMAGES . 'icon_status_red.gif', '', 10, 10) . ' ' . oos_image(OOS_IMAGES . 'icon_status_green_light.gif', '', 10, 10) . '';
} else {
echo oos_image(OOS_IMAGES . 'icon_status_red_light.gif', '', 10, 10) . ' ' . oos_image(OOS_IMAGES . 'icon_status_green.gif', '', 10, 10);
}
}
?>
|
admin_boxes_id) ) { echo ''; } else { echo ''; } ?> |
|
|
'
' . TEXT_INFO_HEADING_NEW_FILE . '');
$files_array = array();
$admin_filestable = $oostable['admin_files'];
$file_query = "SELECT admin_files_name FROM $admin_filestable WHERE admin_files_is_boxes = '0' ";
$file_result = $dbconn->Execute($file_query);
while ($fetch_files = $file_result->fields) {
$files_array[] = $fetch_files['admin_files_name'];
// Move that ADOdb pointer!
$file_result->MoveNext();
}
$file_dir = array();
$dir = dir(OOS_ABSOLUTE_PATH . OOS_ADMIN);
while ($file = $dir->read()) {
if ((substr("$file", -4) == '.php') && $file != $aContents['default'] && $file != $aContents['login'] && $file != $aContents['logoff'] && $file != $aContents['forbiden'] && $file != $aContents['password_forgotten'] && $file != $aContents['admin_account'] && $file != 'invoice.php' && $file != 'packingslip.php') {
$file_dir[] = substr($file, 0, -4);
}
}
$result = $file_dir;
if (count($files_array) > 0) {
$result = array_values (array_diff($file_dir, $files_array));
}
sort ($result);
reset ($result);
$show = array();
foreach ($result as $key => $val) {
$show[] = array('id' => $val,
'text' => $val);
}
$contents = array('form' => oos_draw_form('id', 'store_file', $aContents['admin_files'], 'cPath=' . $_GET['cPath'] . '&fID=' . $files['admin_files_id'] . '&action=file_store', 'post', FALSE, 'enctype="multipart/form-data"'));
$contents[] = array('text' => '
' . TEXT_INFO_NEW_FILE_BOX . ucfirst(substr_replace ($current_box['admin_box_name'], '', -4)) . '');
$contents[] = array('text' => TEXT_INFO_NEW_FILE_INTRO );
$contents[] = array('align' => 'left', 'text' => '
' . oos_draw_pull_down_menu('admin_files_name', $show, $show));
$contents[] = array('text' => oos_draw_hidden_field('admin_files_to_boxes', $_GET['cPath']));
$contents[] = array('align' => 'center', 'text' => '
' . oos_submit_button(IMAGE_SAVE) . '
' . BUTTON_CANCEL . '');
break;
case 'remove_file':
$heading[] = array('text' => '
' . TEXT_INFO_HEADING_DELETE_FILE . '');
$contents = array('form' => oos_draw_form('id', 'remove_file', $aContents['admin_files'], 'action=file_remove&cPath=' . $_GET['cPath'] . '&fID=' . $files['admin_files_id'], 'post', FALSE, 'enctype="multipart/form-data"'));
$contents[] = array('text' => oos_draw_hidden_field('admin_files_id', $_GET['fID']));
$contents[] = array('text' => sprintf(TEXT_INFO_DELETE_FILE_INTRO, $fInfo->admin_files_name, ucfirst(substr_replace ($current_box['admin_box_name'], '', -4))) );
$contents[] = array('align' => 'center', 'text' => '
' . oos_submit_button(IMAGE_CONFIRM) . '
' . BUTTON_CANCEL . '');
break;
default:
if (isset($cInfo) && is_object($cInfo)) {
$heading[] = array('text' => '
' . TEXT_INFO_HEADING_DEFAULT_BOXES . $cInfo->admin_boxes_name . '');
if ( substr($cInfo->admin_boxes_id, 0,1) == 'b') {
$contents[] = array('text' => '
' . $cInfo->admin_boxes_name . ' ' . TEXT_INFO_DEFAULT_BOXES_NOT_INSTALLED . ' ');
$contents[] = array('text' => TEXT_INFO_DEFAULT_BOXES_INTRO);
} else {
$contents = array('form' => oos_draw_form('id', 'newfile', $aContents['admin_files'], 'cPath=' . $cInfo->admin_boxes_id . '&action=store_file', 'post', FALSE, 'enctype="multipart/form-data"'));
$contents[] = array('align' => 'center', 'text' => oos_submit_button(BUTTON_INSERT_FILE) );
$contents[] = array('text' => oos_draw_hidden_field('this_category', $cInfo->admin_boxes_id));
$contents[] = array('text' => '
' . TEXT_INFO_DEFAULT_BOXES_INTRO);
}
$contents[] = array('text' => '
');
}
if (isset($fInfo) && is_object($fInfo)) {
$heading[] = array('text' => '
' . TEXT_INFO_NEW_FILE_BOX . ucfirst(substr_replace ($current_box['admin_box_name'], '', -4)) . '');
$contents[] = array('align' => 'center', 'text' => '
' . oos_button(BUTTON_INSERT_FILE) . ' ' . oos_button(BUTTON_DELETE) . '');
$contents[] = array('text' => '
' . TEXT_INFO_DEFAULT_FILE_INTRO . ucfirst(substr_replace ($current_box['admin_box_name'], '', -4)));
}
}
if ( (oos_is_not_null($heading)) && (oos_is_not_null($contents)) ) {
?>
infoBox($heading, $contents);
?>
|