while ($entry = $d->read()) { if ($entry[0] != '.') { $arrpath[$entry] = $entry; } } $d->close(); $htmltemplatepp = make_droplist($arrpath, 'template', $templatepp); $arrpath = array('' => ''); $d = dir('../' . $gallerypath . '/'); while ($entry = $d->read()) { if ($entry[0] != '.' && $entry != 'thumb' && is_dir(LOCALPATH . $gallerypath . '/' . $entry)) { $arrpath[$entry] = $entry; } } $d->close(); $photorotpathdrop = make_droplist($arrpath, 'photorotpath', $photorotpath); if ($info_pic == '1') { $checked_info_pic = 'checked="checked"'; } if ($multiupload == '1') { $checked_multiupload = 'checked="checked"'; } $contentcenter .= <<<EOT <form action="{$url}" method="post" name="settings_form"> <label title="Путь к галлереи, относительно корня сайта :: pictures">Путь к галлереи, относительно корня сайта: <input type="text" name="gallerypath" value="{$gallerypath}" /></label> <br /> Каталог случайного фото: {$photorotpathdrop} <br /> <br /> <label title="Количество колонок :: два, три или четыре (можно и больше, но оптимально 2)">Количество картинок в строке:<select name="xtable"> EOT;
} } $d->close(); $templatedrop = make_droplist($arrtmpl, 'template', $template); $arrlng = array(); $d = dir('../lang'); while ($entry = $d->read()) { if (getftype($entry) == 'php') { $entry = basename($entry, '.php'); if ($entry[0] != '.') { $arrlng[$entry] = $entry; } } } $d->close(); $languagedrop = make_droplist($arrlng, 'language', $language); $rss_contentdrop = '<select name="rss_content" id="rss_content">'; $rss_contentdrop .= '<option ' . ($rss_content == '1' ? 'selected="selected"' : '') . ' value="1">Только новости</option>'; $rss_contentdrop .= '<option ' . ($rss_content == '2' ? 'selected="selected"' : '') . ' value="2">Только статьи</option>'; $rss_contentdrop .= '<option ' . ($rss_content == '3' ? 'selected="selected"' : '') . ' value="3">Все</option>'; $rss_contentdrop .= '</select>'; $captchainf = __('Возможно хостинг не совместим с модулем "графическая каптча"'); $gdinfo = getgdinfo(); if (false !== $gdinfo) { if ($gdinfo > 1) { if (1 == getgdinfo('FreeType Support')) { $captchainf = __('"Графическая каптча" поддерживается хостингом'); } } } $url = $_SERVER['PHP_SELF'];
function get_kan_phpfile($currentvalue) { $count_files = sizeof($dir = scandir(MYCODE, 1)) - 2; for ($i = 0; $i < $count_files; $i++) { if (getftype($dir[$i]) !== 'php') { continue; } $data = file(MYCODE . $dir[$i]); if (trim($data[1]) == '//phpfile') { if ($data[2][0] == '#') { $title = $data[2]; } else { $title = ''; } $arr[basename($dir[$i], '.php')] = basename($dir[$i], '.php') . $title; } } return make_droplist($arr, 'selectName', $currentvalue, 'onchange="parentNode.getElementsByTagName(\'input\')[0].value=value"'); }