当前位置: 首页>>代码示例>>PHP>>正文


PHP _htmlStr函数代码示例

本文整理汇总了PHP中_htmlStr函数的典型用法代码示例。如果您正苦于以下问题:PHP _htmlStr函数的具体用法?PHP _htmlStr怎么用?PHP _htmlStr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_htmlStr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _HCM_filelist

function _HCM_filelist($cesta = "", $velikosti = false)
{
    $result = "";
    $cesta = _indexroot . $cesta;
    $velikosti = _boolean($velikosti);
    if (mb_substr($cesta, -1, 1) != "/") {
        $cesta .= "/";
    }
    if (@file_exists($cesta) and @is_dir($cesta)) {
        $handle = @opendir($cesta);
        while (false !== ($item = @readdir($handle))) {
            if (@is_dir($cesta . $item) or $item == "." or $item == "..") {
                continue;
            }
            $items[] = $item;
        }
        natsort($items);
        $result = "<ul>\n";
        foreach ($items as $item) {
            $result .= "<li>";
            $result .= "<a href='" . $cesta . _htmlStr($item) . "' target='_blank'>" . $item . "</a>";
            if ($velikosti) {
                $result .= " (" . round(@filesize($cesta . $item) / 1024) . "kB)";
            }
            $result .= "</li>\n";
        }
        $result .= "</ul>\n";
        @closedir($handle);
    }
    return $result;
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:filelist.php

示例2: _HCM_flash

function _HCM_flash($cesta = "", $sirka = null, $vyska = null)
{
    // prednastavene rozmery
    $defwidth = "320";
    $defheight = "240";
    // nacteni parametru
    $cesta = _htmlStr($cesta);
    if (!_isAbsolutePath($cesta)) {
        $cesta = _url . "/" . $cesta;
    }
    if (!isset($sirka)) {
        $sirka = $defwidth;
        $sirka_def = true;
    } else {
        $sirka = intval($sirka);
        $sirka_def = false;
    }
    if (!isset($vyska)) {
        if (!$sirka_def) {
            $vyska = round(0.75 * $sirka);
        } else {
            $vyska = $defheight;
        }
    } else {
        $vyska = intval($vyska);
    }
    // sestaveni kodu
    return "\n<!--[if !IE]> -->\n<object type='application/x-shockwave-flash' data='" . $cesta . "' width='" . $sirka . "' height='" . $vyska . "'>\n<!-- <![endif]-->\n\n<!--[if IE]>\n<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='{$sirka}' height='{$vyska}'>\n<param name='movie' value='" . $cesta . "' />\n<!--><!---->\n<param name='loop' value='true' />\n<param name='menu' value='false' />\n<param name='wmode' value='transparent'>\n\n" . $GLOBALS['_lang']['hcm.player.alt'] . "\n</object>\n<!-- <![endif]-->\n";
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:29,代码来源:flash.php

示例3: _HCM_linkart

function _HCM_linkart($id = null, $text = null, $nove_okno = false)
{
    if (null === $text) {
        $query = DB::query_row('SELECT art.title,art.title_seo,cat.title_seo AS cat_title_seo FROM `' . _mysql_prefix . '-articles` AS art JOIN `' . _mysql_prefix . '-root` AS cat ON(cat.id=art.home1) WHERE art.' . (is_numeric($id) ? 'id' : 'title_seo') . '=' . DB::val($id));
        if (false === $query) {
            return '{' . _htmlStr($id) . '}';
        }
        $text = $query['title'];
    } else {
        $query = array('title_seo' => null, 'cat_title_seo' => null);
    }
    return "<a href='" . _linkArticle($id, $query['title_seo'], $query['cat_title_seo']) . "'" . ($nove_okno ? ' target="_blank"' : '') . ">" . $text . "</a>";
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:13,代码来源:linkart.php

示例4: _HCM_ximg

function _HCM_ximg($cesta = '', $extrakod = null)
{
    // alternativni text
    $ralt = basename($cesta);
    if (($dotpos = mb_strrpos($ralt, ".")) !== false) {
        $ralt = mb_substr($ralt, 0, $dotpos);
    }
    // kod
    if (isset($extrakod)) {
        $rpluscode = " " . $extrakod;
    } else {
        $rpluscode = "";
    }
    return "<img src='" . _htmlStr($cesta) . "' alt='" . $ralt . "'" . $rpluscode . " />";
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:15,代码来源:ximg.php

示例5: _HCM_img

function _HCM_img($cesta = "", $vyska_nahledu = null, $titulek = null, $lightbox = null)
{
    if (isset($vyska_nahledu) and $vyska_nahledu > 0) {
        $vyska_nahledu = intval($vyska_nahledu);
    } else {
        $vyska_nahledu = 96;
    }
    if (isset($titulek) and $titulek != "") {
        $titulek = _htmlStr($titulek);
    }
    if (!isset($lightbox)) {
        $lightbox = SL::$hcmUid;
    }
    $thumb = _pictureThumb($cesta, array('x' => null, 'y' => $vyska_nahledu));
    return "<a href='" . _htmlStr($cesta) . "' target='_blank' class='lightbox' data-fancybox-group='lb_hcm" . $lightbox . "'" . ($titulek != "" ? ' title=\'' . $titulek . '\'' : '') . "><img src='" . $thumb . "' alt='" . ($titulek != "" ? $titulek : 'img') . "' /></a>\n";
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:16,代码来源:img.php

示例6: _HCM_mailform

function _HCM_mailform($adresa = "", $priloha = false, $predmet = null)
{
    // priprava
    $result = "";
    $_SESSION[_sessionprefix . 'hcm_' . SL::$hcmUid . '_mail_receiver'] = @implode(",", _arrayRemoveValue(@explode(";", trim($adresa)), ""));
    if (_boolean($priloha)) {
        $rfile = array($GLOBALS['_lang']['hcm.mailform.att'], "<input type='file' name='att' />");
        $att = true;
    } else {
        $rfile = array('');
        $att = false;
    }
    if (isset($predmet)) {
        $rsubject = " value='" . _htmlStr($predmet) . "'";
    } else {
        $rsubject = "";
    }
    $rcaptcha = _captchaInit();
    // zprava
    $msg = '';
    if (isset($_GET['hcm_mr_' . SL::$hcmUid])) {
        switch ($_GET['hcm_mr_' . SL::$hcmUid]) {
            case 1:
                $msg = _formMessage(1, $GLOBALS['_lang']['hcm.mailform.msg.done']);
                break;
            case 2:
                $msg = _formMessage(2, $GLOBALS['_lang']['hcm.mailform.msg.failure']);
                break;
            case 3:
                $msg = _formMessage(3, $GLOBALS['_lang']['hcm.mailform.msg.failure2']);
                break;
            case 4:
                $msg = _formMessage(3, $GLOBALS['_lang']['xsrf.msg']);
                break;
        }
    }
    // predvyplneni odesilatele
    if (_loginindicator) {
        $sender = _loginemail;
    } else {
        $sender = "&#64;";
    }
    $result .= "<div class='anchor'><a name='hcm_mform_" . SL::$hcmUid . "'></a></div>\n" . $msg . _formOutput("mform" . SL::$hcmUid, _indexroot . "remote/hcm/mform.php?_return=" . urlencode(_indexOutput_url) . ($att ? "' enctype='multipart/form-data" : ''), array(array($GLOBALS['_lang']['hcm.mailform.sender'], "<input type='text' class='inputsmall' name='sender' value='" . $sender . "' /><input type='hidden' name='fid' value='" . SL::$hcmUid . "' />"), array($GLOBALS['_lang']['posts.subject'], "<input type='text' class='inputsmall' name='subject'" . $rsubject . " />"), $rcaptcha, array($GLOBALS['_lang']['hcm.mailform.text'], "<textarea class='areasmall' name='text' rows='9' cols='33'></textarea>", true), $rfile), array("text", "sender"), $GLOBALS['_lang']['hcm.mailform.send']);
    return $result;
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:45,代码来源:mailform.php

示例7: _HCM_player

function _HCM_player($soubor = "", $sirka = null, $vyska = null, $autoplay = false)
{
    // prednastavene hodnoty
    $extension = pathinfo($soubor);
    if (isset($extension['extension'])) {
        $extension = $extension['extension'];
    }
    if ($extension == "mp3") {
        $defvyska = "19";
    } else {
        $defvyska = "240";
    }
    $defsirka = "320";
    // nacteni parametru
    $soubor = _htmlStr($soubor);
    if (!_isAbsolutePath($soubor)) {
        $soubor = _url . "/" . $soubor;
    }
    if (!isset($sirka)) {
        $sirka = $defsirka;
    } else {
        $sirka = intval($sirka);
    }
    if (!isset($vyska)) {
        $vyska = $defvyska;
    } else {
        $vyska = intval($vyska);
    }
    $autoplay = _booleanStr(_boolean($autoplay));
    // sestaveni kodu
    return '
<div id="player_' . SL::$hcmUid . '"><div class="message2">' . $GLOBALS['_lang']['hcm.player.alt'] . '</div></div>
<script type="text/javascript">
// <![CDATA[
        var so = new SWFObject("' . _indexroot . 'remote/hcm/player.swf", "player_embed_' . SL::$hcmUid . '", "' . $sirka . '", "' . $vyska . '", "9", "#000000");
        so.addParam("allowfullscreen","true");
        so.addVariable("file", "' . $soubor . '");
        so.addVariable("link", "' . $soubor . '");
        so.addVariable("autostart", "' . $autoplay . '");
        so.write("player_' . SL::$hcmUid . '");
// ]]>
</script>
';
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:44,代码来源:player.php

示例8: _HCM_gallery

function _HCM_gallery($cesta = "", $rozmery = null, $strankovani = null, $lightbox = 1)
{
    // priprava
    $result = "";
    $cesta = _indexroot . $cesta;
    $cesta_noroot = $cesta;
    if (mb_substr($cesta, -1, 1) != "/") {
        $cesta .= "/";
    }
    if (mb_substr($cesta_noroot, -1, 1) != "/") {
        $cesta_noroot .= "/";
    }
    if (isset($strankovani) and $strankovani > 0) {
        $strankovat = true;
        $strankovani = intval($strankovani);
        if ($strankovani <= 0) {
            $strankovani = 1;
        }
    } else {
        $strankovat = false;
    }
    $lightbox = _boolean($lightbox);
    if (isset($rozmery)) {
        $rozmery = explode('/', $rozmery);
        if (sizeof($rozmery) === 2) {
            // sirka i vyska
            $x = intval($rozmery[0]);
            $y = intval($rozmery[1]);
        } else {
            // pouze vyska
            $x = null;
            $y = intval($rozmery[0]);
        }
    } else {
        // neuvedeno
        $x = null;
        $y = 128;
    }
    if (@file_exists($cesta) and @is_dir($cesta)) {
        $handle = @opendir($cesta);
        // nacteni polozek
        $items = array();
        while (false !== ($item = @readdir($handle))) {
            $ext = pathinfo($item);
            if (isset($ext['extension'])) {
                $ext = mb_strtolower($ext['extension']);
            } else {
                $ext = "";
            }
            if (@is_dir($item) or $item == "." or $item == ".." or !in_array($ext, SL::$imageExt)) {
                continue;
            }
            $items[] = $item;
        }
        @closedir($handle);
        natsort($items);
        // priprava strankovani
        if ($strankovat) {
            $count = count($items);
            $paging = _resultPaging(_indexOutput_url, $strankovani, $count, "", "#hcm_gal" . SL::$hcmUid, "hcm_gal" . SL::$hcmUid . "p");
        }
        // vypis
        $result = "<div class='anchor'><a name='hcm_gal" . SL::$hcmUid . "'></a></div>\n<div class='gallery'>\n";
        $counter = 0;
        foreach ($items as $item) {
            if ($strankovat and $counter > $paging[6]) {
                break;
            }
            if (!$strankovat or $strankovat and _resultPagingIsItemInRange($paging, $counter)) {
                $thumb = _pictureThumb($cesta_noroot . $item, array('x' => $x, 'y' => $y));
                $result .= "<a href='" . $cesta . _htmlStr($item) . "' target='_blank'" . ($lightbox ? " class='lightbox' data-fancybox-group='lb_hcm" . SL::$hcmUid . "'" : '') . "><img src='" . $thumb . "' alt='" . $item . "' /></a>\n";
            }
            $counter++;
        }
        $result .= "</div>\n";
        if ($strankovat) {
            $result .= $paging[0];
        }
    }
    return $result;
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:81,代码来源:gallery.php

示例9: _checkboxActivate

         $rights .= "\n        <tr>\n        <td><strong>" . $_lang['admin.users.groups.' . $item] . "</strong></td>\n        <td><input type='checkbox' name='{$item}' value='1'" . _checkboxActivate($query[$item]) . _inputDisable($id != 1) . " /></td>\n        <td class='lpad'>" . $_lang['admin.users.groups.' . $item . '.help'] . "</td>\n        </tr>\n        ";
     } else {
         $rights .= "</table></fieldset><fieldset><legend>" . mb_substr($item, 1) . "</legend><table>";
     }
 }
 /* ---  ulozeni  --- */
 if (isset($_POST['title'])) {
     $newdata = array();
     // zakladni atributy
     $newdata['title'] = DB::esc(_htmlStr(trim($_POST['title'])));
     if ($newdata['title'] == "") {
         $newdata['title'] = DB::esc($_lang['global.novalue']);
     }
     $newdata['descr'] = DB::esc(_htmlStr(trim($_POST['descr'])));
     if ($id != 2) {
         $newdata['icon'] = DB::esc(_htmlStr(trim($_POST['icon'])));
     }
     $newdata['color'] = DB::esc(preg_replace('/([^0-9a-zA-Z#])/s', '', trim($_POST['color'])));
     if ($id > 2) {
         $newdata['blocked'] = _checkboxLoad("blocked");
     }
     if ($id != 2) {
         $newdata['reglist'] = _checkboxLoad("reglist");
     }
     // uroven, blokovani
     if ($id > 2) {
         $newdata['level'] = intval($_POST['level']);
         if ($newdata['level'] > _loginright_level) {
             $newdata['level'] = _loginright_level - 1;
         }
         if ($newdata['level'] >= 10000) {
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:users-editgroup.php

示例10: _backupRestore

/**
 * [ADMIN] Backup API - obnovit zalohu (castecnou nebo jen databaze)
 * @param string $path cesta k souboru
 * @return array|bool true pri uspechu, jinak array(err_msg, fatal 1/0)
 */
function _backupRestore($path)
{
    // priprava
    global $_lang;
    $fatal = false;
    $path = realpath($path);
    // proces obnovy
    do {
        /* ----- nacteni a kontroly ----- */
        // kontrola souboru
        if (($err = _backupCheckFile($path, array(_backup_db, _backup_partial))) !== true) {
            break;
        }
        // nacteni souboru
        $kzip = new KZip($path);
        if (!empty($kzip->error)) {
            $err = str_replace('*errstr*', _htmlStr($kzip->error), $_lang['admin.other.backup.restore.upload.err.load']);
            break;
        }
        $type = $kzip->vars['type'];
        // uprava merge pole
        if (isset($kzip->vars['merge'])) {
            $kzip->vars['merge'] = array_flip($kzip->vars['merge']);
        }
        // kontrola prava pro zapis
        if ($type === _backup_partial) {
            $a_files = '/files/';
            $dirs = $kzip->listFiles($a_files, true);
            $dirs = $dirs[0];
            for ($i = 0; isset($dirs[$i]); ++$i) {
                if (($err = _emptyDir(realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/' . _indexroot . $dirs[$i]) . '/')) !== true) {
                    $err = str_replace('*path*', _htmlStr($err), $_lang['admin.other.backup.restore.err.access']);
                    break 2;
                }
            }
        }
        /* ----- provedeni ----- */
        // chyby na teto urovni jsou jiz fatalni
        $fatal = true;
        // databaze
        $dbdump = new DBDump();
        // tabulky
        $tbl_import = $dbdump->importTables($kzip->getFile('/database/struct'));
        if (!$tbl_import[0]) {
            $err = $tbl_import[1] . ': <code>' . _htmlStr($tbl_import[2]) . '</code>';
            break;
        }
        // data
        $dbstream = $kzip->getFileStream('/database/data');
        $data_import = $dbdump->importData($dbstream);
        $dbstream->free();
        if (!$data_import[0]) {
            $err = $data_import[1];
            break;
        }
        // aktualizovat hlavni URL, vynutit kontrolu instalace
        if (($url = _getBaseUrl()) !== false) {
            DB::query('UPDATE `' . _mysql_prefix . '-settings` SET `val`=' . DB::val(rtrim($url, '/')) . ' WHERE `var`=\'url\'');
        }
        DB::query('UPDATE `' . _mysql_prefix . '-settings` SET `val`=\'1\' WHERE `var`=\'installcheck\'');
        // deaktivovat modrewrite, pokud neexistuje .htaccess
        if (!file_exists(_indexroot . '.htaccess')) {
            DB::query('UPDATE `' . _mysql_prefix . '-settings` SET `val`=\'0\' WHERE `var`=\'modrewrite\'');
        }
        // soubory
        if ($type === _backup_partial) {
            for ($i = 0; isset($dirs[$i]); ++$i) {
                echo "\n\n";
                $dirpath = realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/' . _indexroot . $dirs[$i]) . '/';
                if (!isset($kzip->vars['merge'], $kzip->vars['merge'][$dirs[$i]])) {
                    _emptyDir($dirpath, false);
                }
                $kzip->extractFiles($dirpath, $a_files . $dirs[$i] . '/', false, true, array($kzip->vars['void']));
            }
        }
        // hotovo
        $kzip->free();
        return true;
    } while (false);
    // chyba
    if (isset($kzip)) {
        $kzip->free();
    }
    return array($err, $fatal);
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:90,代码来源:functions-backup.php

示例11: _get

/* ---  priprava  --- */
if (isset($_GET['c'])) {
    $c = _get('c');
    $returntolist = true;
} else {
    $c = '1';
    $returntolist = false;
}
/* ---  ulozeni  --- */
if (isset($_POST['title'])) {
    // nacteni promennych
    $title = DB::esc(_htmlStr($_POST['title']));
    $column = _post('column');
    $ord = floatval($_POST['ord']);
    $content = DB::esc(_filtrateHCM($_POST['content']));
    $visible = _checkboxLoad('visible');
    $public = _checkboxLoad('public');
    $class = trim($_POST['class']);
    if ($class === '') {
        $class = null;
    } else {
        $class = DB::esc(_htmlStr($class));
    }
    // vlozeni
    DB::query("INSERT INTO `" . _mysql_prefix . "-boxes` (ord,title,content,visible,public,`column`,class) VALUES (" . $ord . ",'" . $title . "','" . $content . "'," . $visible . "," . $public . ",'" . DB::esc($column) . "'," . (isset($class) ? '\'' . $class . '\'' : 'NULL') . ")");
    define('_redirect_to', 'index.php?p=content-boxes-edit&c=' . urlencode($column) . '&created');
    return;
}
/* ---  vystup  --- */
$output .= "\n<a href='index.php?p=" . ($returntolist ? "content-boxes-edit&amp;c=" . urlencode($c) : "content-boxes") . "' class='backlink'>&lt; " . $_lang['global.return'] . "</a>\n<h1>" . $_lang['admin.content.boxes.new.title'] . "</h1>\n<p class='bborder'></p>\n\n<form class='cform' action='index.php?p=content-boxes-new&amp;c=" . urlencode($c) . "' method='post'>\n\n<table class='formtable'>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.title'] . "</strong></td>\n<td><input type='text' name='title' class='inputmedium' maxlength='96' /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.boxes.column'] . "</strong></td>\n<td><input type='text' maxlength='64' name='column' value='" . _htmlStr($c) . "' class='inputmedium' /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.ord'] . "</strong></td>\n<td><input type='text' name='ord' value='1' class='inputmedium' /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.class'] . "</strong></td>\n<td><input type='text' name='class' class='inputmedium' maxlength='24' /></td>\n</tr>\n\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['admin.content.form.content'] . "</strong></td>\n<td><textarea name='content' class='areasmall_100pwidth codemirror' rows='9' cols='33'></textarea></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.settings'] . "</strong></td>\n<td>\n<label><input type='checkbox' name='visible' value='1' checked='checked' /> " . $_lang['admin.content.form.visible'] . "</label>&nbsp;&nbsp;\n<label><input type='checkbox' name='public' value='1' checked='checked' /> " . $_lang['admin.content.form.public'] . "</label>\n</td>\n</tr>\n\n<tr>\n<td></td>\n<td><input type='submit' value='" . $_lang['global.create'] . "' /></td>\n</tr>\n\n</table>\n\n" . _xsrfProtect() . "</form>\n\n";
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:30,代码来源:content-boxes-new.php

示例12: dump

 /**
  * Vydumpovat hodnotu
  *
  * @param mixed $value
  * @param int $level
  * @return string
  */
 protected function dump($value, $level = 0)
 {
     if (is_object($value)) {
         return 'object(' . get_class($value) . ')';
     } elseif (is_array($value)) {
         if ($level > 9) {
             return 'array(' . sizeof($value) . ')';
         }
         $out = "array(" . sizeof($value) . ") {\n";
         $padding = str_repeat('    ', $level + 1);
         foreach ($value as $key => $val) {
             $out .= $padding . _htmlStr($key) . ' => ' . $this->dump($val, $level + 1) . "\n";
         }
         $out .= '}';
         return $out;
     } elseif (is_string($value)) {
         return 'string(' . strlen($value) . ') &quot;' . _htmlStr(_cutStr($value, 192)) . "&quot;";
     } elseif (is_int($value)) {
         return 'int(' . $value . ')';
     } elseif (is_float($value)) {
         return 'float(' . $value . ')';
     } elseif (is_bool($value)) {
         return 'bool(' . ($value ? 'true' : 'false') . ')';
     } else {
         return gettype($value);
     }
 }
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:34,代码来源:devkit.php

示例13: _formMessage

            $message = _formMessage($done === $total ? 1 : 2, sprintf($_lang['admin.content.manageimgs.upload.msg'], $done, $total));
            break;
    }
}
/* ---  odstraneni obrazku  --- */
if (isset($_GET['del']) && _xsrfCheck(true) && $continue) {
    $del = intval($_GET['del']);
    _tmpGalStorageCleanOnDel('id=' . $del . ' AND home=' . $g);
    DB::query("DELETE FROM `" . _mysql_prefix . "-images` WHERE id=" . $del . " AND home=" . $g);
    if (DB::affectedRows() === 1) {
        $message = _formMessage(1, $_lang['global.done']);
    }
}
/* ---  vystup  --- */
if ($continue) {
    $output .= "\n<a href='index.php?p=content-editgallery&amp;id=" . $g . "' class='backlink'>&lt; návrat zpět</a>\n<h1>" . $_lang['admin.content.manageimgs.title'] . "</h1>\n<p class='bborder'>" . str_replace("*galtitle*", $galdata['title'], $_lang['admin.content.manageimgs.p']) . "</p>\n\n" . $message . "\n\n<script type='text/javascript'>\n/* <![CDATA[ */\n\$(document).ready(function(){\n    \$('.hs_fieldset').each(function(){\n        var fieldset = this;\n        var link = \$(fieldset).find('legend > a').get(0);\n        var form = \$(fieldset).children('form');\n        \$(form).hide();\n        \$(link).click(function(){\n            \$(form).slideToggle('fast');\n\n            return false;\n        });\n    });\n});\n/* ]]> */\n</script>\n\n<fieldset>\n<legend>" . $_lang['admin.content.manageimgs.upload'] . "</legend>\n<form action='index.php?p=content-manageimgs&amp;g=" . $g . "' method='post' enctype='multipart/form-data'>\n    <p>" . sprintf($_lang['admin.content.manageimgs.upload.text'], _galuploadresize_w, _galuploadresize_h) . "</p>\n    <input type='hidden' name='xaction' value='7' />\n    <div id='fmanFiles'><input type='file' name='uf0[]' multiple='multiple' />&nbsp;&nbsp;<a href='#' onclick='return _sysFmanAddFile();'>" . $_lang['admin.fman.upload.addfile'] . "</a></div>\n    <div class='hr'><hr /></div>\n    <p>\n        <input type='submit' value='" . $_lang['admin.content.manageimgs.upload.submit'] . "' />" . (($uplimit = _getUploadLimit(true)) !== null ? " &nbsp;<small>" . $_lang['global.uploadlimit'] . ": <em>" . _getUploadLimit() . "MB</em>, " . $_lang['global.uploadext'] . ": <em>" . implode(', ', SL::$imageExt) . "</em></small>" : '') . "<br />\n        <label><input type='checkbox' value='1' name='moveords' checked='checked' /> " . $_lang['admin.content.manageimgs.moveords'] . "</label>\n    </p>\n" . _xsrfProtect() . "</form>\n</fieldset>\n\n<fieldset class='hs_fieldset'>\n<legend><a href='#'>" . $_lang['admin.content.manageimgs.insert'] . "</a> &nbsp;<small>(" . $_lang['admin.content.manageimgs.insert.tip'] . ")</small></legend>\n<form action='index.php?p=content-manageimgs&amp;g=" . $g . "' method='post' name='addform' onsubmit='_sysGalTransferPath(this);'>\n<input type='hidden' name='xaction' value='1' />\n\n<table>\n<tr class='valign-top'>\n\n<td>\n    <table>\n    <tr>\n    <td class='rpad'><strong>" . $_lang['admin.content.form.title'] . "</strong></td>\n    <td><input type='text' name='title' class='inputmedium' maxlength='64' /></td>\n    </tr>\n\n    <tr>\n    <td class='rpad'><strong>" . $_lang['admin.content.form.ord'] . "</strong></td>\n    <td><input type='text' name='ord' class='inputsmall' disabled='disabled' />&nbsp;&nbsp;<label><input type='checkbox' name='moveords' value='1' checked='checked' onclick=\"_sysDisableField(this.checked, 'addform', 'ord');\" /> " . $_lang['admin.content.manageimgs.moveords'] . "</label></td>\n    </tr>\n\n    <tr>\n    <td class='rpad'><strong>" . $_lang['admin.content.manageimgs.prev'] . "</strong></td>\n    <td><input type='text' name='prev' class='inputsmall' disabled='disabled' />&nbsp;&nbsp;<label><input type='checkbox' name='autoprev' value='1' checked='checked' onclick=\"_sysDisableField(this.checked, 'addform', 'prev');\" /> " . $_lang['admin.content.manageimgs.autoprev'] . "</label></td>\n    </tr>\n\n    <tr>\n    <td class='rpad'><strong>" . $_lang['admin.content.manageimgs.full'] . "</strong></td>\n    <td><input type='text' name='full' class='inputmedium' /></td>\n    </tr>\n\n    <tr>\n    <td></td>\n    <td><input type='submit' value='" . $_lang['global.insert'] . "' /></td>\n    </tr>\n\n    </table>\n</td>\n\n<td>\n" . (_loginright_adminfman ? "<div id='gallery-browser'>\n    " . (!isset($_GET['browserpath']) ? "<a href='#' onclick=\"return _sysGalBrowse('" . urlencode(_upload_dir) . (_loginright_adminfmanlimit ? _loginname . '%2F' : '') . "');\"><img src='images/icons/loupe.png' alt='browse' class='icon' />" . $_lang['admin.content.manageimgs.insert.browser.link'] . "</a>" : "<script type='text/javascript'>_sysGalBrowse('" . _htmlStr($_GET['browserpath']) . "');</script>") . "\n</div>" : '') . "\n</td>\n\n</tr>\n</table>\n\n" . _xsrfProtect() . "</form>\n</fieldset>\n\n";
    // strankovani
    $paging = _resultPaging("index.php?p=content-manageimgs&amp;g=" . $g, $galdata['var2'], "images", "home=" . $g);
    $s = $paging[2];
    $output .= "\n<fieldset>\n<legend>" . $_lang['admin.content.manageimgs.current'] . "</legend>\n<form action='index.php?p=content-manageimgs&amp;g=" . $g . "&amp;page=" . $s . "' method='post' name='editform'>\n<input type='hidden' name='xaction' value='4' />\n\n<input type='submit' value='" . $_lang['admin.content.manageimgs.savechanges'] . "' class='gallery-savebutton' />\n" . $paging[0] . "\n<div class='cleaner'></div>";
    // vypis obrazku
    $images = DB::query("SELECT * FROM `" . _mysql_prefix . "-images` WHERE home=" . $g . " ORDER BY ord " . $paging[1]);
    $images_forms = array();
    if (DB::size($images) != 0) {
        // sestaveni formularu
        while ($image = DB::row($images)) {
            // kod nahledu
            $preview = _galleryImage($image, "1", $galdata['var4'], $galdata['var3']);
            // kod formulare
            $images_forms[] .= "\n<table>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.title'] . "</strong></td>\n<td><input type='text' name='i" . $image['id'] . "_title' class='inputmedium' value='" . $image['title'] . "' maxlength='64' /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.ord'] . "</strong></td>\n<td><input type='text' name='i" . $image['id'] . "_ord' class='inputmedium' value='" . $image['ord'] . "' /></td>\n</tr>\n\n" . (!$image['in_storage'] ? "<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.manageimgs.prev'] . "</strong></td>\n<td><input type='hidden' name='i" . $image['id'] . "_prevtrigger' value='1' /><input type='text' name='i" . $image['id'] . "_prev' class='inputsmall' value='" . $image['prev'] . "'" . _inputDisable($image['prev'] != "") . " />&nbsp;&nbsp;<label><input type='checkbox' name='i" . $image['id'] . "_autoprev' value='1' onclick=\"_sysDisableField(checked, 'editform', 'i" . $image['id'] . "_prev');\"" . _checkboxActivate($image['prev'] == "") . " /> " . $_lang['admin.content.manageimgs.autoprev'] . "</label></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.manageimgs.full'] . "</strong></td>\n<td><input type='text' name='i" . $image['id'] . "_full' class='inputmedium' value='" . $image['full'] . "' /></td>\n</tr>" : '') . "\n\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['global.preview'] . "</strong></td>\n<td>" . $preview . "<br /><br /><a href='" . _xsrfLink("index.php?p=content-manageimgs&amp;g=" . $g . "&amp;page=" . $s . "&amp;del=" . $image['id']) . "' onclick='return _sysConfirm();'><img src='images/icons/delete.png' alt='del' class='icon' />" . $_lang['admin.content.manageimgs.delete'] . "</a></td>\n</tr>\n\n</table>\n    ";
        }
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:content-manageimgs.php

示例14: foreach

                }
                // radek vystupu
                echo "<tr class='valign-top'>";
                foreach ($fields as $field) {
                    if (mb_substr_count($item[$field], "\n") == 0) {
                        $content = _htmlStr($item[$field]);
                    } else {
                        $content = "<textarea rows='8' cols='80' readonly='readonly'>" . _htmlStr($item[$field]) . "</textarea>";
                    }
                    echo "<td>" . $content . "</td>";
                }
                echo "</tr>\n";
            }
            echo "</table>";
        } else {
            if ($aff_rows == 0) {
                echo "\n<p>" . $_lang['admin.other.sqlex.null'] . "</p>\n";
            } else {
                echo "\n<p><strong>" . $_lang['admin.other.sqlex.affected'] . ":</strong> " . $aff_rows . "</p>\n";
            }
        }
    } else {
        echo "<h3>" . $_lang['global.error'] . ":</h3>\n<pre>" . _htmlStr(DB::error()) . "</pre>";
    }
}
?>

</div>
</body>
</html>
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:30,代码来源:sqlex.php

示例15: opendir

    $handle = opendir($backup_dir);
    while (false !== ($item = readdir($handle))) {
        if ($item === '.' || $item === '..' || !is_file($backup_dir . $item)) {
            continue;
        }
        $backups[] = $item;
    }
    // serazeni a vypis
    if (!empty($backups)) {
        natsort($backups);
        $output .= "<table class='list'>\n<thead><tr><td>" . $_lang['admin.other.backup.restore.item'] . "</td><td>" . $_lang['global.type'] . "</td><td>" . $_lang['global.time'] . "</td><td>" . $_lang['global.note'] . "</td><td>" . $_lang['global.size'] . "</td><td>" . $_lang['global.extra'] . "</td></tr></thead>\n<tbody>\n";
        foreach ($backups as $file) {
            // info o archivu
            $file_err = false;
            $file_vars = _backupCheckFile($backup_dir . $file, array(_backup_db, _backup_partial), true);
            if (!is_array($file_vars)) {
                $file_err = true;
            }
            $file_h = _htmlStr($file);
            // polozka
            $output .= "<tr>\n<td><label><input type='radio' name='fname' value='" . $file_h . "'" . ($file_err ? " disabled='disabled'" : '') . " /> " . $file_h . "</label></td>\n<td>" . ($file_err ? '-' : $_lang['admin.other.backup.backup.' . ($file_vars['type'] === _backup_db ? 'db' : 'partial')]) . "</td>\n<td>" . ($file_err ? '-' : _formatTime($file_vars['time'])) . "</td>\n<td>" . ($file_err ? "<img src='images/icons/warn.png' alt='err' /> " . $_lang['global.error'] : (empty($file_vars['note']) ? '-' : _htmlStr(_cutStr($file_vars['note'], 48, false)))) . "</td>\n<td>" . number_format(filesize($backup_dir . $file) / 1024, 0, '.', ' ') . "kB</td>\n<td><a href='" . $backup_dir . $file_h . "'>" . $_lang['global.download'] . "</a></td>\n</tr>\n";
        }
        $output .= "</tbody></table><br />\n\n<p><strong>" . $_lang['global.action'] . ":</strong> &nbsp;\n<select name='sub_action'>\n    <option value='-1'>...</option>\n    <option value='1'>" . $_lang['admin.other.backup.restore.do'] . "</option>\n    <option value='2'>" . $_lang['global.delete'] . "</option>\n</select> &nbsp;\n<input type='submit' value='" . $_lang['global.do'] . "' onclick='return _sysConfirm();' />&nbsp;\n<a href='index.php?p=fman&amp;dir=" . urlencode('../data/backup/') . "'><img src='images/icons/list.png' class='icon' alt='fman' />" . $_lang['admin.other.backup.restore.fman'] . "</a>\n</p>\n\n" . _admin_smallNote($_lang['admin.other.backup.restore.warning'], true, 'warn');
    } else {
        $output .= '<p>' . $_lang['admin.other.backup.restore.none'] . '</p>';
    }
    $output .= "\n</fieldset>\n" . _xsrfProtect() . "</form>\n";
} else {
    /* ----- volba akce ----- */
    $output .= (_loginright_adminbackup ? "\n<fieldset>\n<legend>" . $_lang['admin.other.backup.backup'] . "</legend>\n<form action='index.php?p=other-backup' method='post'>\n<p>" . $_lang['admin.other.backup.backup.p'] . "</p>\n\n<input type='hidden' name='do_backup' value='1' />\n<p><input type='submit' value='" . $_lang['admin.other.backup.backup.db'] . "' name='type_db' />&nbsp; <small class='note'>(" . $_lang['admin.other.backup.backup.db.hint'] . ")</small></p>\n<p><input type='submit' value='" . $_lang['admin.other.backup.backup.partial'] . "' name='type_partial' />&nbsp; <small class='note'>(" . $_lang['admin.other.backup.backup.partial.hint'] . ")</small></p>\n<p><input type='submit' value='" . $_lang['admin.other.backup.backup.full'] . "' name='type_full' />&nbsp; <small class='note'>(" . $_lang['admin.other.backup.backup.full.hint'] . ")</small></p>\n\n" . _xsrfProtect() . "</form>\n</fieldset>" : '') . (_loginright_adminrestore ? "\n\n<fieldset>\n<legend>" . $_lang['admin.other.backup.restore'] . "</legend>\n<form class='cform' method='post'>\n<p>" . $_lang['admin.other.backup.restore.p'] . "</p>\n<p><input type='submit' name='do_restore' value='" . $_lang['global.continue'] . "' /></p>\n" . _xsrfProtect() . "</form>\n</fieldset>\n" : '');
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:other-backup.php


注:本文中的_htmlStr函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。