$error = ''; $packet = new dlpacket($CONFIG['DB_HOST'], $CONFIG['DB_NAME'], $CONFIG['DB_USER'], $CONFIG['DB_PASS']); $filesOut = ''; $filesErrorOut = ''; if ($id) { // Edit if ($packet->loadById($id)) { $packetIsFinished = $packet->isFinished(); $packetIsOwnedByUser = $user->get('id') == $packet->get('_user'); if (!$packetIsOwnedByUser) { $error .= '<li>This packet is owned by another user.</li>'; } if ($packet->isArchived()) { $error .= '<li>This packet is archived. Press <i><u>Packet Reset</u></i> to restart/reset the packet and all links.</li>'; } else { if ($packet->isDownloading()) { $error .= '<li>You can not modify a downloading packet.</li>'; } elseif ($packet->isFinished()) { $error .= '<li>You can not modify a finished packet.</li>'; } } if ($packet->get('ftime') || $packet->get('archive')) { $smarty->assign('reset', ' <tr> <td colspan="' . $tableColspan . '"><a href="?a=packetResetExec&id=' . $packet->get('id') . '">Packet Reset</td> </tr> '); } $smarty->assign('nameValue', $packet->get('name')); $smarty->assign('nameDisabled', 'disabled="disabled"'); $smarty->assign('source', $packet->get('source'));