• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP lt函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: showareas

function showareas()
{
    doAreaEdit();
    global $indexTemplateAreas;
    //execute the nano site in demo to read the content areas
    demoExecuteNanoSite();
    $sett = getDetails('settings');
    $contents = $sett['def-template-areas'];
    $areaInfo = array();
    foreach ($contents as $areaName) {
        $areaFile = areaDataDir("{$areaName}");
        $fileContent = file_exists($areaFile) ? file_get_contents($areaFile) : '';
        $areaInfo[$areaName] = $fileContent;
    }
    $saveAllTxt = lt('Save all Areas');
    $biggerInp = lt('Bigger Input Box');
    $smallerInp = lt('Smaller Input Box');
    echo "<form action='?action=showareas&do=editarea' method='post'>";
    echo "<input type='submit' value='+ {$saveAllTxt} +' class='floatright'>";
    echo "<input type='hidden' name='areaCount' value='" . count($areaInfo) . "'>";
    $cnt = 1;
    foreach ($areaInfo as $areaName => $areaContents) {
        $boxId = "box{$cnt}";
        //md5($areaName);
        echo "<h2>&raquo; {$areaName}</h2>\r\n\t\t\t    <input type='hidden' name='areaName{$cnt}' value='{$areaName}'>\r\n\t\t\t\t<table><tr valign='top'><td>\r\n\t\t\t\t<textarea name='areaContent{$cnt}' rows='2' cols='60' id='{$boxId}' class='areabox'>" . htmlentities($areaContents) . "</textarea>\r\n\t\t\t\t</td><td>\r\n\t\t\t\t<input type='button' onclick='makesmall(\"{$boxId}\")' value='-' title='{$smallerInp}' class='isizeh'>\r\n\t\t\t\t<input type='button' onclick='makebig(\"{$boxId}\")' value='+' title='{$biggerInp}' class='isizeh'>\r\n\t\t\t\t</td></tr></table>\r\n\t\t\t ";
        $cnt++;
    }
    echo "<input type='submit' value='+ {$saveAllTxt} +' class='floatright'>";
    echo "</form>";
    echo "<script language='javascript'>\r\n\t\t\tfunction makebig(id) {\r\n\t\t\tobj = document.getElementById(id);\r\n\t\t\tif( obj.rows < 30 ) obj.rows+= 5;\r\n\t\t\t}\r\n\t\t\tfunction makesmall(id) {\r\n\t\t\tobj = document.getElementById(id);\r\n\t\t\tif( obj.rows > 5 ) obj.rows-= 5;\r\n\t\t\t}\r\n\t\t  </script>";
}
开发者ID:appcoding2,项目名称:nano-cms,代码行数:31,代码来源:admin.contentareas.lib.php


示例2: sortSlice

 /**
  * Recursively quicksorts the slice of the array between
  * the specified left and right positions.
  *
  * @param integer $left The position of the leftmost element to be sorted.
  * @param integer $right The position of the rightmost element to be sorted.
  */
 protected function sortSlice($left, $right)
 {
     if ($right - $left + 1 > self::CUTOFF) {
         $p = $this->selectPivot($left, $right);
         $this->swap($p, $right);
         $pivot = $this->array[$right];
         $i = $left;
         $j = $right - 1;
         for (;;) {
             while ($i < $j && lt($this->array[$i], $pivot)) {
                 ++$i;
             }
             while ($i < $j && gt($this->array[$j], $pivot)) {
                 --$j;
             }
             if ($i >= $j) {
                 break;
             }
             $this->swap($i++, $j--);
         }
         if (gt($this->array[$i], $pivot)) {
             $this->swap($i, $right);
         }
         if ($left < $i) {
             $this->sortSlice($left, $i - 1);
         }
         if ($right > $i) {
             $this->sortSlice($i + 1, $right);
         }
     }
 }
开发者ID:EdenChan,项目名称:Instances,代码行数:38,代码来源:AbstractQuickSorter.php


示例3: savepages

function savepages()
{
    global $nc;
    runTweak('on-save-pages');
    $pagesdata = serialize($nc);
    if (!put2file(PAGES_DETAILS_FILE, $pagesdata)) {
        MsgBox(lt("file writing error"), 'redbox');
    }
}
开发者ID:appcoding2,项目名称:nano-cms,代码行数:9,代码来源:general.lib.php


示例4: savepages

function savepages()
{
    global $NANO;
    runTweak('on-save-pages');
    $pagesdata = serialize($NANO);
    if (!put2file(PAGES_DETAILS_FILE, $pagesdata)) {
        MsgBox(lt("File writing error"), 'redbox');
        return false;
    }
    return true;
}
开发者ID:appcoding2,项目名称:nano-cms,代码行数:11,代码来源:general.lib.php


示例5: contains

 /**
  * Tests whether the specified comparable object
  * is in this binary search tree.
  *
  * @param object IComparable $obj The object for which to look.
  * @return boolean True if the specified object
  * is in this binary search tree; false otherwise.
  */
 public function contains(IComparable $obj)
 {
     if ($this->isEmpty()) {
         return false;
     } elseif (eq($obj, $this->getKey())) {
         return true;
     } elseif (lt($obj, $this->getKey())) {
         return $this->getLeft()->contains($obj);
     } else {
         return $this->getRight()->contains($obj);
     }
 }
开发者ID:EdenChan,项目名称:Instances,代码行数:20,代码来源:BinarySearchTree.php


示例6: savepages

function savepages()
{
    global $NANO;
    runTweak('on-save-pages');
    $pagesdata = serialize($NANO);
    $pagesdata = '<?php header("Location: ../index.php"); /*    DO NOT EDIT THIS FILE' . "\n{$pagesdata}\n*/?>";
    if (!put2file(PAGES_DETAILS_FILE, $pagesdata)) {
        MsgBox(lt("File writing error"), 'redbox');
        return false;
    }
    return true;
}
开发者ID:a6smile,项目名称:dvdbrowsereview,代码行数:12,代码来源:general.lib.php


示例7: merge

 /**
  * Merges two sorted subsequences of the array into one.
  * @param integer $left The first position of the left subsequence.
  * @param integer $middle The first position of the right subsequence.
  * The last position in the left subsequences is middle-1.
  * @param integer $right The last position of the right subsequence.
  */
 protected function merge($left, $middle, $right)
 {
     $i = $left;
     $j = $left;
     $k = $middle + 1;
     while ($j <= $middle && $k <= $right) {
         if (lt($this->array[$j], $this->array[$k])) {
             $this->tempArray[$i++] = $this->array[$j++];
         } else {
             $this->tempArray[$i++] = $this->array[$k++];
         }
     }
     while ($j <= $middle) {
         $this->tempArray[$i++] = $this->array[$j++];
     }
     for ($i = $left; $i < $k; ++$i) {
         $this->array[$i] = $this->tempArray[$i];
     }
 }
开发者ID:EdenChan,项目名称:Instances,代码行数:26,代码来源:TwoWayMergeSorter.php


示例8: showpageslist

function showpageslist()
{
    global $nc;
    demoExecuteNanoSite();
    $cdt = getDetails('cats');
    $sett = getDetails('settings');
    $slugs = getDetails('slugs');
    $titles = getDetails('titles');
    $templateCats = $sett['def-template-links'];
    $defaultCats = explode(',', NANO_MUSTHAVE_CATS);
    $musthaveCats = array_unique(array_merge($templateCats, $defaultCats));
    $selectedCat = 1;
    $toggStat = 'false';
    if (isset($_GET[addcat])) {
        $newCatName = strtolower(stripslashes($_POST[catname]));
        if (in_array($newCatName, array_keys($cdt))) {
            $msg = sprintf(lt("Cannot add new Links Category : %s already exists", 'cat-add-fail-already-exists'), "<b>{$newCatName}</b>");
            MsgBox($msg);
        } else {
            $cdt[$newCatName] = array();
            $msg = sprintf(lt("Pages Category %s Added Successfully", 'cat-add-success'), "<b>{$newCatName}</b>");
            MsgBox($msg, 'greenbox');
            setDetails('cats', $cdt);
            savepages();
        }
    }
    if (isset($_GET[removecat])) {
        $catN = $_GET[removecat];
        if (!in_array($catN, array_keys($cdt))) {
            MsgBox(lt("Category to be deleted does not exist", 'cat-to-del-not-exists'), 'redbox');
        } else {
            if (in_array($catN, $musthaveCats)) {
                MsgBox("<b>{$catN}</b> : " . lt('Cannot be deleted'), 'redbox');
            } else {
                unset($cdt[$catN]);
                $msg = sprintf(lt("Pages Category %s was removed Successfully", 'cat-remove-success'), "<b>{$catN}</b>");
                MsgBox($msg, 'greenbox');
                setDetails('cats', $cdt);
                savepages();
            }
        }
    }
    if (isset($_GET[addtocat])) {
        $slug2add = $_POST[page];
        $cat2add = $_POST[cat];
        if (in_array($slug2add, $cdt[$cat2add])) {
            $msg = sprintf(lt("The page %s is already listed in %s", 'page-already-listed'), "<b>{$titles[$slug2add]}</b>", "<b>{$cat2add}</b>");
            MsgBox($msg);
        } else {
            array_push($cdt[$cat2add], $slug2add);
            $msg = sprintf(lt("The page %s was added successfully under %s", 'page-to-cat-add-success'), "<b>{$titles[$slug2add]}</b>", "<b>{$cat2add}</b>");
            MsgBox($msg);
            setDetails('cats', $cdt);
            savepages();
            $selectedCat = $cat2add;
            $toggStat = 'true';
        }
    }
    $catSelectList = array();
    foreach ($cdt as $cN => $cSC) {
        $catSelectList[$cN] = $cN;
    }
    $pagesAndOpt = lt('Pages & Category Options', 'page-and-cat-opt');
    $pagesListing = lt('Pages & Category Listing', 'page-and-cat-list');
    $addNewCat = lt('Add new Category');
    $addToAnotherCat = lt('Add page to another category', 'add-page-to-another-cat');
    $addLabel = lt('Add');
    $useUrlLabel = lt('Url you can use');
    $moveLabel = lt('Move');
    $optLabel = lt('Options');
    $pageLabel = lt('Page');
    echo "<a href='#nogo' class='nodeco'><h2 id='cat_anchor' class='cattitle'><span id='toggCon'></span>{$pagesAndOpt}</h2></a>\r\n\t\t\t<table id='cat_options'>\r\n\t\t\t <tr>\r\n\t\t\t \t<form action='?action=showpages&addcat=true' method='post'>\r\n\t\t\t\t<td>{$addNewCat} : </td><td><input type='text' name='catname'> <input type='submit' value='{$addLabel}'></td>\r\n\t\t\t\t</form>\r\n\t\t\t </tr>\r\n\t\t\t <tr>\r\n\t\t\t\t<form action='?action=showpages&addtocat=true' method='post'>\r\n\t\t\t\t<td>{$addToAnotherCat}</td><td>" . pagesList('page', $titles, 0) . " to " . pagesList('cat', $catSelectList, $selectedCat) . "\r\n\t\t\t\t\t <input type='submit' value='{$addLabel}'>\r\n\t\t\t\t</td>\r\n\t\t\t\t</form>\r\n\t\t\t </tr>\r\n\t\t\t</table>";
    $js = "catopt = new Toggle('cat_options',{$toggStat},'cat_anchor');catopt.setToggleContent( 'toggCon', '+', '-' );";
    $v = 0;
    echo "<h2>&raquo; {$pagesListing}</h2>";
    echo "<div class='linkcats-div'>";
    foreach ($cdt as $catname => $catslugs) {
        $v++;
        $slugids = array_values($catslugs);
        $n = count($slugids) - 1;
        if (!in_array($catname, $musthaveCats)) {
            $removeOpt = "( <a href='?action=showpages&removecat={$catname}'>remove</a> )";
        } else {
            $removeOpt = '';
        }
        //just user interface stuff
        $toggStat = $catname == $_SESSION[opencat] ? 'true' : 'false';
        if (!isset($_SESSION[opencat]) and $catname == 'sidebar') {
            $toggStat = true;
        }
        if ($catname == $_SESSION[opencat]) {
            $toggStat = 'true';
            unset($_SESSION[opencat]);
        } else {
            $toggStat == 'false';
        }
        $js .= "catopt{$v} = new Toggle('t{$v}',{$toggStat},'h2{$v}'); catopt{$v}.setToggleContent( 'co{$v}', '+', '-' );";
        echo "<a href='#nogo'><h2 class='cattitle noborder' id='h2{$v}'><span id='co{$v}' class='togg'>&raquo;</span> {$catname} {$removeOpt}</h2></a>";
        echo "<div class='borderWrap'>";
        echo "<table cellpadding='5px' cellspacing='2px'  width='100%' id='t{$v}' class='pageListTable'>";
//.........这里部分代码省略.........
开发者ID:appcoding2,项目名称:nano-cms,代码行数:101,代码来源:admin.pages.lib.php


示例9: lt

lt(array(), 'Array');
lt(array('a', 'b'), 'Array');
echo "\n";
gt('Array', array(1, 2));
gt('Array', array());
gt(array(), 'Array');
gt(array('a', 'b'), 'Array');
echo "======\n";
eq('', null);
eq(null, null);
eq(null, '');
eq('', '');
echo "\n";
lt('', null);
lt(null, null);
lt(null, '');
lt('', '');
echo "\n";
gt('', null);
gt(null, null);
gt(null, '');
gt('', '');
echo "======\n";
eq(-1.0, null);
eq(null, -1.0);
echo "\n";
lt(-1.0, null);
lt(null, -1.0);
echo "\n";
gt(-1.0, null);
gt(null, -1.0);
开发者ID:badlamer,项目名称:hhvm,代码行数:31,代码来源:some_cmp_tests.php


示例10: dt

function dt()
{
    global $T, $V;
    // go through all the pending ticks
    foreach ($T as $e => $f) {
        if ($f[0] <= lt()) {
            // if this entry needs to be done
            if ($f[1][0] == '$') {
                $V[substr($f[1], 1)]($f[3], 1, $f[2]);
            } else {
                $f[1]($f[2]);
            }
            // do it
            unset($T[$e]);
            // and call it done
        }
    }
}
开发者ID:pushcx,项目名称:Hennepin,代码行数:18,代码来源:hennepin.php


示例11: main

 /**
  * Main program.
  *
  * @param array $args Command-line arguments.
  * @return integer Zero on success; non-zero on failure.
  */
 public static function main($args)
 {
     printf("BoxedFloat main program.\n");
     $status = 0;
     $d1 = new BoxedFloat(1.0);
     printf("d1 = %s\n", str($d1));
     $d2 = new BoxedFloat(0.5);
     printf("d2 = %s\n", str($d2));
     printf("d1 < d2 = %s\n", str(lt($d1, $d2)));
     printf("hash(d1) = %d\n", hash($d1));
     printf("hash(d2) = %d\n", hash($d2));
     printf("hash(57.0) = 0%o\n", hash(new BoxedFloat(57.0)));
     printf("hash(23.0) = 0%o\n", hash(new BoxedFloat(23.0)));
     printf("hash(0.75) = 0%o\n", hash(new BoxedFloat(0.75)));
     printf("hash(-123.0e6) = 0%o\n", hash(new BoxedFloat(-123000000.0)));
     printf("hash(-123.0e7) = 0%o\n", hash(new BoxedFloat(-1230000000.0)));
     printf("hash(0.875) = 0%o\n", hash(new BoxedFloat(0.875)));
     printf("hash(14.0) = 0%o\n", hash(new BoxedFloat(14.0)));
     return $status;
 }
开发者ID:EdenChan,项目名称:Instances,代码行数:26,代码来源:BoxedFloat.php


示例12: lt

                    <a href="../" title="<?php 
echo lt('View Site');
?>
" target="_blank"><img class='updown' src='theme/images/window.gif' alt="<?php 
echo lt('View Site');
?>
" /></a> 
                    <a href="?logout" title="<?php 
echo lt('Logout');
?>
"><img class='delete' src='theme/images/trash.gif' alt="<?php 
echo lt('Logout');
?>
" <?php 
if (isset($razorArray['settings']['maintenance']) && $razorArray['settings']['maintenance'] == true) {
    echo "onclick='return confirm(\"" . lt("You are in maintenance mode, are you sure you want to log out in maintenance mode") . "\");'";
}
?>
 /></a>
                </div>
            </div>
        <div id="midbrace">
            <div id="midbox">
                <div id="leftbar">
                    <div id="leftnav">
                        <?php 
loadAdminSubLinks();
?>
                        <?php 
BsocketB('admin-xhtml-leftnav');
?>
开发者ID:roboshepherd,项目名称:FaruqsFewDays,代码行数:31,代码来源:default_admin_xhtml.php


示例13: commitChanges

 function commitChanges()
 {
     $catList = getDetails('cats');
     $sd = getDetails('slugs');
     $tt = getDetails('titles');
     $tt[$this->slugId] = $this->title;
     $sd[$this->slugId] = $this->slug;
     foreach ($catList as $catName => $catSlugs) {
         //the cat is there in our list and our page is not there in master list then just add/push it
         $isCategoryInOurList = in_array($catName, $this->cats);
         $isSlugInMasterCategory = in_array($this->slugId, $catSlugs);
         if ($isCategoryInOurList and !$isSlugInMasterCategory) {
             array_push($catList[$catName], $this->slugId);
             echo '<br>' . lt('Added');
         }
         if (!$isCategoryInOurList and $isSlugInMasterCategory) {
             $catSlugsIndexes = array_flip($catList[$catName]);
             array_splice($catList[$catName], $catSlugsIndexes[$this->slugId], 1);
             echo "<br>" . lt('Deleted from list') . " - {$catName}";
         }
     }
     setDetails('cats', $catList);
     setDetails('slugs', $sd);
     setDetails('titles', $tt);
 }
开发者ID:appcoding2,项目名称:nano-cms,代码行数:25,代码来源:setting.php


示例14: nanoadmin_showsettings

function nanoadmin_showsettings()
{
    $home = getDetails('homepage');
    $pages = getDetails('titles');
    $slugs = getDetails('slugs');
    $username = getDetails('username');
    $seourl_stat = (bool) getDetails('seourl');
    $seourl = array(lt('Disabled'), lt('Enabled'));
    $is_modrewrite_available = true;
    if (isset($_POST['save'])) {
        runTweak('save-settings');
        $_POST = array_map('stripslashes', $_POST);
        $home = $_POST['homepage'];
        $seourl_stat = $_POST['seourls'];
        $seourl_stat = $is_modrewrite_available ? $seourl_stat : 0;
        if ($seourl_stat == 1) {
            file_put_contents(NANO_INDEX_LOCATION . '.htaccess', NANO_HTACCESS_FORMAT);
        } else {
            unlink(NANO_INDEX_LOCATION . '.htaccess');
        }
        $username = $_POST['username'];
        $password = $_POST['password'];
        setDetails('homepage', $home);
        setDetails('seourl', $seourl_stat);
        if (!empty($username)) {
            setDetails('username', $username);
        }
        if (!empty($password)) {
            setDetails('password', md5($password));
            //reset the logged session variable
            $_SESSION[NANO_CMS_ADMIN_LOGGED] = md5(md5($password) . $_SESSION[LOGIN_TIME_STAMP]);
        }
        if (savepages()) {
            MsgBox(lt('Settings were saved successfully'), 'greenbox');
        }
    }
    $word_homepage = lt('Home Page');
    $word_sefurl = lt('Search Engine Friendly URL\'s');
    $word_new = lt('New');
    $word_username = lt('Username');
    $word_password = lt('Password');
    $word_leaveitemtpy = lt("Leave empty if you don't want to change", 'leave-empty-for-no-change');
    $word_loginsettings = lt("Login Settings");
    $word_save = lt("Save Changes");
    $word_settings = lt("NanoCMS Settings");
    if ($is_modrewrite_available) {
        $select_seourl = html_select('seourls', $seourl, $seourl_stat);
        $word_modrewrite = lt("mod_rewrite is required and is available");
    } else {
        $select_seourl = html_select('seourls', $seourl, $seourl_stat, ' disabled="disabled"');
        $word_modrewrite = lt("mod_rewrite is <b>not available</b>, please contact your host or enable it via httpd.conf", 'modrewrite-not-available');
    }
    $select_homepage = html_select('homepage', $pages, $home);
    echo $output = <<<NANO_SETTINGS
\t<h2>{$word_settings}</h2>
\t<form action="#" method="POST" accept-charset="utf-8">
\t\t<table width="100%" cellpadding="5">
\t\t\t<tr>
\t\t\t\t<td>{$word_homepage}</td><td>{$select_homepage}</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td>{$word_sefurl} <br /><small>[ {$word_modrewrite} ]</small></td><td>{$select_seourl}</td>
\t\t\t</tr>
\t\t\t<tr><td>&nbsp;</td></tr>
\t\t\t<tr>
\t\t\t\t<td colspan="2"><h2>{$word_loginsettings}</h2></td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td colspan="2">{$word_leaveitemtpy}</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td>{$word_new} {$word_username}</td><td><input type="text" value="{$username}" name="username" /></td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td>{$word_new} {$word_password}</td><td><input type="text" name="password" value="" /></td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td><br /><input type="submit" value="{$word_save}" name="save" /></td>
\t\t\t</tr>
NANO_SETTINGS;
    runTweak('admin-settings');
    echo "\r\n\t\t</table>\r\n\t</form>";
}
开发者ID:a6smile,项目名称:dvdbrowsereview,代码行数:83,代码来源:admin.settings.lib.php


示例15: findMinTree

 /**
  * Returns the binomial tree in this binomial queue
  * that has the "smallest" root.
  * The smallest root is the root which is less than or
  * equal to all other roots.
  *
  * @return object BinomialTree The binomial tree in this binomial queue
  * that has the "smallest" root.
  */
 protected function findMinTree()
 {
     $minTree = NULL;
     for ($ptr = $this->treeList->getHead(); $ptr !== NULL; $ptr = $ptr->getNext()) {
         $tree = $ptr->getDatum();
         if ($minTree === NULL || lt($tree->getKey(), $minTree->getKey())) {
             $minTree = $tree;
         }
     }
     return $minTree;
 }
开发者ID:EdenChan,项目名称:Instances,代码行数:20,代码来源:BinomialQueue.php


示例16: lt

 public function lt($other)
 {
     return lt($this, $other);
 }
开发者ID:Vinceveve,项目名称:php-rql,代码行数:4,代码来源:misc.php


示例17: _lt

function _lt($defaultText, $text_type = '')
{
    echo lt($defaultText, $text_type);
}
开发者ID:a6smile,项目名称:dvdbrowsereview,代码行数:4,代码来源:setting.php


示例18: message_die

    message_die(GENERAL_MESSAGE, 'PLUGIN_DISABLED');
}
if ($config['cash_adminnavbar']) {
    $navbar = 1;
    include 'admin_cash.' . PHP_EXT;
}
$current_time = time();
$ar_time = array('all' => '', 'day' => '(log_time > ' . ($current_time - 86400) . ')', 'week' => '(log_time > ' . ($current_time - 604800) . ')', 'month' => '(log_time > ' . ($current_time - 2592000) . ')', 'year' => '(log_time > ' . ($current_time - 31536000) . ')');
function lt($const)
{
    return "log_type = {$const}";
}
$action_types = array(CASH_LOG_DONATE => 'user', CASH_LOG_ADMIN_MODEDIT => 'admin', CASH_LOG_ADMIN_CREATE_CURRENCY => 'admin', CASH_LOG_ADMIN_DELETE_CURRENCY => 'admin', CASH_LOG_ADMIN_RENAME_CURRENCY => 'admin', CASH_LOG_ADMIN_COPY_CURRENCY => 'admin');
$action_users = array('user' => array(), 'admin' => array());
while (list($type, $user) = each($action_types)) {
    $action_users[$user][] = lt($type);
}
$ar_action = array('all' => '', 'user' => '(' . implode(' OR ', $action_users['user']) . ')', 'admin' => '(' . implode(' OR ', $action_users['admin']) . ')');
$ar_count = array('a' => 10, 'b' => 25, 'c' => 50, 'd' => 100);
if (isset($_GET['delete']) && ($_GET['delete'] == 'all' || $_GET['delete'] == 'admin' || $_GET['delete'] == 'user')) {
    $deleteclause = $ar_action[$_GET['delete']];
    if ($deleteclause != '') {
        $deleteclause = " WHERE " . $deleteclause;
    }
    $sql = "DELETE FROM " . CASH_LOGS_TABLE . $deleteclause;
    $db->sql_query($sql);
}
//
// most of this is just stupid sorting stuff
// -- but then, that's mostly all the functionality that this page has :P
//
开发者ID:GabrielAnca,项目名称:icy_phoenix,代码行数:31,代码来源:cash_log.php


示例19: bladepackInstall

function bladepackInstall()
{
    if ($_SESSION['adminType'] == 'user') {
        return;
    }
    $startInstall = false;
    if (isset($_GET['startinstall']) && $_GET['startinstall']) {
        $startInstall = true;
    }
    if ($startInstall) {
        $filename = basename($_FILES['file-upload']['name']);
        $stripFileName = explode('.', $filename);
        if (end($stripFileName) == 'zip') {
            $bladepacksDir = getSystemRoot(RAZOR_ADMIN_FILENAME) . RAZOR_BLADEPACK_DIR;
            $bladepackFiles = readDirContents($bladepacksDir);
            $fileExists = false;
            foreach ($bladepackFiles as $fileCheck) {
                $fileCheckT = explode('.', $fileCheck);
                $filenameT = explode('.', $filename);
                if (reset($fileCheckT) == reset($filenameT)) {
                    $fileExists = true;
                }
            }
            if (!$fileExists) {
                uploadFile(RAZOR_BLADEPACK_DIR . $filename, $_FILES['file-upload']['tmp_name']);
                $bpInstall = new BPCONTROL();
                $bpInstall->extractContents(RAZOR_BLADEPACK_DIR . $filename);
                if ($bpInstall->checkContents(RAZOR_BLADEPACK_DIR)) {
                    if ($bpInstall->extractXmlData()) {
                        $bpInstall->saveContents(RAZOR_BLADEPACK_DIR);
                        MsgBox(lt('Bladepack installed successfully'), 'greenbox');
                        if ($bpInstall->searchXmlArray($bpInstall->xmlContents, 'note')) {
                            MsgBox(lt('PLEASE READ SPECIAL NOTES FOR BLADE PACK'), 'yellowbox');
                            $sentance = '';
                            $noteArray = array();
                            $noteArray = $bpInstall->searchXmlArray($bpInstall->xmlContents, 'note');
                            foreach ($noteArray['child'] as $paras) {
                                $sentance .= '<' . $paras['tag'] . '>' . $paras['value'] . '</' . $paras['tag'] . '>';
                            }
                            MsgBox($sentance, 'yellowbox');
                        }
                        deleteFile(RAZOR_BLADEPACK_DIR . $filename, false);
                    } else {
                        MsgBox(lt('Error installing bladepack, cannot parse xml, attempting to clean up install file'), 'redbox');
                        deleteFile(RAZOR_BLADEPACK_DIR . $filename);
                    }
                } else {
                    MsgBox(lt('Error installing bladepack, unpack error, attempting to clean up install file'), 'redbox');
                    deleteFile(RAZOR_BLADEPACK_DIR . $filename);
                }
            } else {
                MsgBox(lt('Error installing bladepack, bladepack already present'), 'redbox');
            }
        } else {
            MsgBox(lt("Error installing bladepack, only bladepack parcels allowed"), 'redbox');
        }
    }
    echo "<h1>" . lt('Install Blade Packs') . "</h1>";
    echo "<div class='contentwh'>";
    echo "<h3>" . lt('Upload blade pack parcel') . "</h3>";
    echo '<p>' . lt('Please only upload verified blade pack parcel files downloaded from the official razorCMS website. All blade pack parcels are distributed in zip archive format') . '.</p>';
    echo '<form enctype="multipart/form-data" action="?action=bladeinstall&startinstall=true" method="POST">';
    echo "<table class='tableViewBlades'>";
    echo "<tr class='tableFooter'><th class='auto'></th><th class='ten'></th></tr>";
    echo '<tr><td><input name="file-upload" type="file" /></td><td><input id="button" type="submit" value="' . lt('upload file') . '" name="upload"/></td></tr>';
    echo "<tr class='tableFooter'><th class='twentyFive'></th><th class='auto'></th></tr></table></form></div>";
}
开发者ID:roboshepherd,项目名称:FaruqsFewDays,代码行数:67,代码来源:admin_func.php


示例20: demoExecuteNanoSite

function demoExecuteNanoSite()
{
    global $indexTemplateAreas, $indexTemplateLL;
    $sett = getDetails('settings');
    $catt = getDetails('cats');
    $indexLastModified = filemtime(NANO_CMS_PAGE);
    if ($sett['index-last-modified'] >= $indexLastModified) {
        return;
    }
    $removeFunctionList = array('show_sidebar', 'show_content_slug', 'show_title', 'require_once');
    $replaceFunction = 'dummyFunction';
    $demoContentToRun = file_get_contents(NANO_CMS_PAGE);
    $demoContentToRun = str_replace('show_content_area', 'readIntoAreaList', $demoContentToRun);
    $demoContentToRun = str_replace('show_links', 'readIntoLinksList', $demoContentToRun);
    $demoContentToRun = str_replace($removeFunctionList, $replaceFunction, $demoContentToRun);
    ob_start();
    eval(" ?> " . $demoContentToRun . " <?php ");
    $cont = ob_get_contents();
    ob_end_clean();
    MsgBox(lt("Template Changes Detected! Config & Settings updated!", 'template-changes-detected'));
    $newcatt = array_diff($indexTemplateLL, array_keys($catt));
    foreach ($newcatt as $newcatname) {
        $catt[$newcatname] = array();
    }
    foreach ($indexTemplateAreas as $k => $v) {
        $indexTemplateAreas[$k] = strtolower($v);
    }
    $sett['index-last-modified'] = $indexLastModified;
    $sett['def-template-areas'] = array_unique($indexTemplateAreas);
    $sett['def-template-links'] = array_unique($indexTemplateLL);
    setDetails('settings', $sett);
    setDetails('cats', $catt);
    savepages();
}
开发者ID:appcoding2,项目名称:nano-cms,代码行数:34,代码来源:admin.tweakers.lib.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP lti_add_type函数代码示例发布时间:2022-05-15
下一篇:
PHP lstat函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap