} if ($data['albumid'] > 0) { if (empty($data['name'])) { $error = $lang_module['err_null_name']; } else { if (empty($data['v_path'])) { $error = $lang_module['err_null_path']; } elseif (empty($error)) { if ($id == 0) { $num = $db->sql_numrows($adb->getAlbumImgs($data['albumid'])); if (empty($data['name'])) { list($mo, $data['name']) = split('[/.]', $data['path']); // } if ($adb->addNewImg($data['name'], $data['alias'], $data['path'], nv_editor_nl2br($data['description']), $thumb_name, $data['albumid'], $num + 1, $data['v_path'], $data['is_show'])) { $adb->update_numphoto($data['albumid']); $adb->freeResult(); Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=listimg&idb=" . $data['albumid']); die; } else { $error = $lang_module['err_save_img']; } } else { if ($adb->updateImgInfo($data['pictureid'], $data['name'], $data['alias'], $data['path'], nv_editor_nl2br($data['description']), $thumb_name, $data['albumid'], $data['v_path'], $data['is_show'])) { $adb->update_numphoto($data['albumid']); $adb->freeResult(); Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=listimg&idb=" . $data['albumid']); die; } else { $error = $lang_module['err_save_img']; }