} $compliteStyle .= "}\n"; } } } } $compliteStyle .= "</style>\n"; } $compliteStyle = preg_replace("'<style[^>]*>\\s*<\\/style>'si", '', $compliteStyle); @mkdir(ROOT_DIR . '/userData/userData/' . $is_logged); @file_put_contents(ROOT_DIR . '/userData/userData/' . $is_logged . '/' . $filenames . '.html', $compliteStyle . $dataPost); } } else { show_info('info', 'Возникла ошибка получения данных.'); } } elseif ($action == 'allPrj') { $file = my_fileBuld($dirName); $allowed = array('prj'); if (count($file['dir']) > 0) { foreach ($file['dir'] as $name) { $p++; $p = $p > 2 ? 1 : $p; $date = @date("F d Y", @filemtime($dirName . '/' . $name)); $size = FSizeNumber(sizeFolder($dirName . '/' . $name)); $prj .= '<li class="li_prj_' . $name . ' p_' . $p . '"><div class="lineB"><img src="lib/images/future_projects.png" class="left" /><div class="left textPad" style="min-width: 100px; font-weight: bold">' . $name . '</div><div class="left grayColor textPad" style="min-width: 110px">' . $date . '</div><div class="left grayColor textPad">' . $size . '</div><div class="right"><div class="grayBtn" style="margin-right: 10px" onclick="file.open(\'' . $name . '\')">Открыть</div><div class="grayBtn" onclick="file.del(\'' . $name . '\')">Удалить</div></div><div class="clear"></div></div></li>'; } print '<ul class="ul tableList projectList">' . $prj . '</ul>'; } else { print 'Вы еще не создали ни один проект.'; } }
show_info('info', 'Возникла ошибка при удалении'); } } elseif ($action == 'renameLib') { if ($idName == '') { show_info('info', 'Библиотека не указана!'); } $newname = $_POST['newname'] !== '' ? replase($_POST['newname']) : show_info('info', 'Библиотека не указана!'); rename(ROOT_DIR . '/data/' . $is_logged . '/' . $idName, ROOT_DIR . '/data/' . $is_logged . '/' . $newname); clearCache(); } elseif ($action == 'showlib') { $read = my_fileBuld(ROOT_DIR . '/data/' . $is_logged); if (count($read['dir']) > 0) { foreach ($read['dir'] as $name) { $p++; $p = $p > 2 ? 1 : $p; $size = sizeFolder(ROOT_DIR . '/data/' . $is_logged . '/' . $name); $date = showDate(ROOT_DIR . '/data/' . $is_logged . '/' . $name); $prj .= '<li class="li_prj_' . $name . ' p_' . $p . '"> <div class="lineB"> <img src="lib/images/future_projects.png" class="left" /> <div class="left textPad" style="min-width: 100px; font-weight: bold">' . $name . '</div> <div class="left grayColor textPad" style="min-width: 200px">' . $date . '</div> <div class="left grayColor textPad">' . FSizeNumber($size) . '</div> <div class="right"> <div class="grayBtn" style="margin-right: 10px" onclick="libraly.export_lib(\'' . $name . '\')">Экспорт</div> <div class="grayBtn" style="margin-right: 10px" onclick="libraly.renameLib(\'' . $name . '\')">Изменить</div> <div class="grayBtn" onclick="libraly.del(\'' . $name . '\')">Удалить</div> </div> <div class="clear"></div> </div> </li>';