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

PHP printc函数代码示例

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

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



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

示例1: editor_activex

function editor_activex($textarea, $cols, $rows, $text)
{
    //style sheet for active-x editor
    printc("<style type=\"text/css\">\n");
    printc("<!--\n");
    printc("  .btn   { BORDER-WIDTH: 1; width: 26px; height: 24px; }\n");
    printc("  .btnDN { BORDER-WIDTH: 1; width: 26px; height: 24px; BORDER-STYLE: inset; BACKGROUND-COLOR: buttonhighlight; }\n");
    printc("  .btnNA { BORDER-WIDTH: 1; width: 26px; height: 24px; filter: alpha(opacity=25); }\n");
    printc("-->\n");
    printc("</style>\n");
    printc("<style type=\"text/css\">\n");
    printc("<!--\n");
    printc("   body, td { font-family: arial; font-size: 12px; }\n");
    printc("  .headline { font-family: arial black, arial; font-size: 28px; letter-spacing: -2px; }\n");
    printc("  .subhead  { font-family: arial, verdana; font-size: 12px; let!ter-spacing: -1px; }\n");
    printc("-->\n");
    printc("</style>\n");
    //	Begin modification 4 - 11.11.02 - afranco
    //	Add explanation of how to get <br />s
    printc("<div class='desc'><b>Note:</b> To get a single line break, hold down SHIFT while pressing enter.");
    //	Begin modification 2 - 10.26.02 - rlange
    //	Added an id tag to the textarea definition
    printc("<textarea name='{$textarea}' id='{$textarea}' cols='{$cols}' rows='{$rows}'>");
    printc(spchars($text));
    printc("</textarea>");
    //	End modification 2 - 10.26.02 - rlange
    //	Begin modification 3 - 10.26.02 - rlange
    //	Create the iView from JavaScript for the above textarea
    printc("<script language=\"javascript1.2\">\n");
    printc("editor_generate('{$textarea}');\n");
    printc("</script>\n");
}
开发者ID:adamfranco,项目名称:segue-1.x,代码行数:32,代码来源:editor_activex.inc.php


示例2: countit

function countit()
{
    static $count = 0;
    // default value
    $count++;
    printc("Count: {$count}");
}
开发者ID:NASTYHAWK,项目名称:php-beginners,代码行数:7,代码来源:static.php


示例3: printStoryEditLinks

function printStoryEditLinks()
{
    global $thisSite, $thisSection, $thisPage, $thisStory, $tagged_page, $site_owner, $o, $story_set, $s, $sid, $site, $section, $page, $cfg;
    printc("<div class='edit_links'>");
    if ($cfg['disable_edit_content'] == TRUE && $_SESSION['ltype'] != 'admin') {
        printc("<div align='right'>editing disabled</div>");
    } else {
        /******************************************************************************
         * edit, delete options 
         ******************************************************************************/
        if ($_REQUEST['tag']) {
            $envvars = "&amp;site=" . $thisSite->name;
            if ($tagged_section) {
                $envvars .= "&amp;section=" . $tagged_section;
            }
            if ($tagged_page) {
                $envvars .= "&amp;page=" . $tagged_page;
            }
        }
        //printpre($story_set);
        $l = array();
        if ($_SESSION[auser] == $site_owner || $_SESSION[auser] != $site_owner && !$o->getField("locked")) {
            if (!$_REQUEST['tag']) {
                if (($thisPage->getField("storyorder") == 'custom' || $thisPage->getField("storyorder") == '') && $thisPage->hasPermission("edit")) {
                    if ($_REQUEST[showorder] == "story") {
                        $l[] = "<a href='{$PHP_SELF}?{$sid}{$envvars}&amp;action=viewsite&amp;site={$site}&amp;section={$section}&amp;page={$page}&amp;showorder=0" . ($story_set ? "&amp;story_set=" . ($story_set + 1) : "") . "' class='small' title='Reorder content blocks on this page'>hide order</a>";
                    } else {
                        $l[] = "<a href='{$PHP_SELF}?{$sid}{$envvars}&amp;action=viewsite&amp;site={$site}&amp;section={$section}&amp;page={$page}&amp;showorder=story" . ($story_set ? "&amp;story_set=" . ($story_set + 1) : "") . "' class='small' title='Reorder content blocks on this page'>reorder</a>";
                    }
                }
                if (($thisPage->getField("archiveby") == '' || $thisPage->getField("archiveby") == 'none' || !$thisPage->getField("archiveby")) && $thisPage->hasPermission("edit")) {
                    //								if ($i!=0 && ($thisPage->getField("storyorder") == 'custom' || $thisPage->getField("storyorder") == '')) {
                    //									$l[] = "<a href='$PHP_SELF?$sid$envvars&amp;action=viewsite&amp;reorder=story&amp;direction=up&amp;id=$s' class='small' title='Move this Content Block up'><b>&uarr;</b></a>";
                    //								}
                    //								if ($i!=count($thisPage->stories)-1 && ($thisPage->getField("storyorder") == 'custom' || $thisPage->getField("storyorder") == '')) {
                    //									$l[] = "<a href='$PHP_SELF?$sid$envvars&amp;action=viewsite&amp;reorder=story&amp;direction=down&amp;id=$s' class='small' title='Move this Content Block down'><b>&darr;</b></a>";
                    //								}
                }
                if ($thisPage->hasPermission("edit") || $o->hasPermission("edit")) {
                    $l[] = "<a href='copy_parts.php?{$sid}&amp;site={$site}&amp;section={$section}&amp;page={$page}&amp;story={$s}&amp;type=story' class='small' title='Move/Copy this Content Block to another page' onclick=\"doWindow('copy_parts','300','250')\" target='copy_parts'>move</a>";
                }
            }
            if ($thisPage->hasPermission("edit") || $o->hasPermission("edit")) {
                $l[] = "<a href='{$PHP_SELF}?{$sid}{$envvars}&amp;action=edit_story&amp;site={$site}&amp;section={$section}&amp;page={$page}&amp;edit_story={$s}&amp;comingFrom=viewsite" . ($story_set ? "&amp;story_set=" . ($story_set + 1) : "") . "' class='small' title='Edit this Content Block'>edit</a>";
            }
            if ($thisPage->hasPermission("delete") || $o->hasPermission("delete")) {
                $l[] = "<a href='javascript:doconfirm(\"Are you sure you want to delete this content?\",\"{$PHP_SELF}?{$sid}{$envvars}&amp;site={$site}&amp;section={$section}&amp;page={$page}&amp;action=delete_story&amp;delete_story={$s}\")' class='small' title='Delete this Content Block'>delete</a>";
            }
            if ($thisPage->hasPermission("edit") || $o->hasPermission("edit")) {
                $l[] = "<a href='index.php?{$sid}&amp;action=viewsite&amp;site={$site}&amp;section={$section}&amp;page={$page}&amp;story=" . $s . "&amp;versioning=" . $s . "' class='small' title='View the history of this content'>versions</a>";
            }
        }
        printc(implode(" | ", $l));
    }
    printc("</div>");
}
开发者ID:adamfranco,项目名称:segue-1.x,代码行数:56,代码来源:viewsite.inc.php


示例4: fexplode

function fexplode(&$arr)
{
    //Task 3
    printf("\n\nTask Explode\n\n");
    if (!isset($arr)) {
        //must throw exception here
        return;
    }
    $target = "I love ZaraLab";
    $index = array_search($target, $arr);
    if ($index !== false) {
        //printf("format");
        $temp = explode(" ", $arr[$index]);
        $arr[$index] = $temp;
    }
    printc($arr);
}
开发者ID:TWalew,项目名称:php-beginners,代码行数:17,代码来源:functions.php


示例5: _execute_db_update

function _execute_db_update($KG_Path, $KG_Thumb)
{
    global $super_array;
    global $database_table;
    printc("Updating Database ...");
    mysql_query("TRUNCATE TABLE {$database_table}");
    $files = array();
    if (is_dir($KG_Path)) {
        if ($dh = opendir($KG_Path)) {
            while (($file = readdir($dh)) !== false) {
                if ($file != "." and $file != "..") {
                    $type = filetype("{$KG_Path}/" . $file);
                    if ($type == 'dir') {
                        _get_contents_indir($KG_Path, $KG_Thumb, $file);
                    }
                }
            }
            closedir($dh);
        }
    }
    //print_r($super_array);
    _insert_to_sql($super_array);
    printc("Updating Database Complete");
}
开发者ID:Alien-nick,项目名称:princeamds-code,代码行数:24,代码来源:cgi-updater.php


示例6: array_search

<?php

$search = 'I love ZaraLab';
$search_index = array_search($search, $array);
$new = explode(" ", $search);
$array[$search_index] = $new;
printc($array);
开发者ID:petkofff,项目名称:php-beginners-1,代码行数:7,代码来源:task4.php


示例7: makedownloadbar

<?php

/* $Id$ */
include "output_modules/common.inc.php";
$t = makedownloadbar($o);
$st = convertTagsToInteralLinks($site, $t);
if ($o->getField("texttype") == 'text') {
    $st = nl2br($st);
}
$wikiResolver =& WikiResolver::instance();
$st = $wikiResolver->parseText($st, $site, $section, $page);
printc($st);
if ($o->getField("discuss")) {
    include dirname(__FILE__) . "/discussionLink.inc.php";
}
开发者ID:adamfranco,项目名称:segue-1.x,代码行数:15,代码来源:file.inc.php


示例8: addOne

<?php

require_once './lib/functions.php';
$var = 10;
function addOne()
{
    global $var;
    $var++;
}
addOne();
$message = sprintf('Value of $var is %d', $var);
printc($message);
function addOneAlt()
{
    $GLOBALS['var']++;
}
addOneAlt();
$message = sprintf('Value of $var is %d', $var);
printc($message);
开发者ID:NASTYHAWK,项目名称:php-beginners,代码行数:19,代码来源:globals.php


示例9: printc

    printc("</td></tr>\n");
}
/******************************************************************************
 * print out title and options
 ******************************************************************************/
printc("<tr><td align='left'>");
printc("<a href='index.php?action=" . $action . "&amp;" . $getinfo2 . "'>" . spchars($pageObj->getField('title')) . "</a>");
if ($storyObj->getField('title')) {
    printc(" > " . spchars($storyObj->getField('title')));
}
if ($_REQUEST['oldversion'] && $_REQUEST['newversion']) {
    printc(" > <a href='index.php?{$sid}&amp;action=" . $action . "&amp;site=" . $_REQUEST['site'] . "&amp;section=" . $_REQUEST['section'] . "&amp;page=" . $_REQUEST['page'] . "&amp;story=" . $_REQUEST['story'] . "&amp;versioning=" . $_REQUEST['story'] . "'>All Versions</a>");
    printc(" > Selected Versions");
} else {
    if ($_REQUEST['versioning']) {
        printc(" > All Versions");
        /******************************************************************************
         * if particular version then get version details
         ******************************************************************************/
    } else {
        if ($_REQUEST['version']) {
            printc(" > <a href='index.php?{$sid}&amp;action=" . $action . "&amp;site=" . $_REQUEST['site'] . "&amp;section=" . $_REQUEST['section'] . "&amp;page=" . $_REQUEST['page'] . "&amp;story=" . $_REQUEST['story'] . "&amp;versioning=" . $_REQUEST['story'] . "'>All Versions</a>");
            printc(" > Revision " . $version_num);
        } else {
            printc(" > in depth");
        }
    }
}
printc("</td></tr>\n");
printc("</table>\n");
开发者ID:adamfranco,项目名称:segue-1.x,代码行数:30,代码来源:versions.inc.php


示例10: array_search

<?php

$search = "I love ZaraLab";
$key = array_search($search, $array);
$new = explode(' ', $search);
$array[$key] = $new;
printc('Taks Explode', $array);
开发者ID:NASTYHAWK,项目名称:php-beginners,代码行数:7,代码来源:explode.php


示例11: printc

/******************************************************************************
 * print out story content
 ******************************************************************************/
printc("<div class='story'>");
printc(stripslashes($st));
printc("</div>");
/******************************************************************************
 * Append link to more and discussion
 ******************************************************************************/
if ($o->getField("discuss") || $o->getField("longertext")) {
    if ($o->getField("longertext") && !ereg("^[\n\r]*<br />\$", $o->getField("longertext"))) {
        if ($action == 'viewsite') {
            $discussAction = 'viewsite';
        } else {
            if (ereg("preview_edit_as|preview_as", $action)) {
                $discussAction = ereg_replace("preview_edit_as", "preview_as", $action);
            } else {
                $discussAction = 'site';
            }
        }
        $link = "index.php?{$sid}&amp;action=" . $discussAction . "&amp;site={$site}&amp;section={$section}&amp;page={$page}&amp;story=" . $o->id . "&amp;detail=" . $o->id;
        printc("<a href='" . $link . "'>" . " ...more</a>\n");
    }
    include dirname(__FILE__) . "/discussionLink.inc.php";
}
if ($tagged_section) {
    $section = $source_section;
}
if ($tagged_page) {
    $page = $source_page;
}
开发者ID:adamfranco,项目名称:segue-1.x,代码行数:31,代码来源:story.inc.php


示例12: main

function main()
{
    $options = getopt("hdsrp:", array('help', 'debug', 'silent', 'remove', 'path:'));
    // Check if help requested
    if (hasOption($options, 'h', 'help')) {
        printc(HELP);
        die;
    }
    if (!hasOption($options, 'p', 'path')) {
        printc("Error: path required\n");
        printc(HELP);
        die;
    }
    $silent = hasOption($options, 's', 'silent');
    $debug = hasOption($options, 'd', 'debug');
    // Disable silent on debug
    if ($debug) {
        $silent = false;
    }
    $remove = hasOption($options, 'r', 'remove');
    // Process path
    $path = array_key_exists('p', $options) ? $options['p'] : $options['path'];
    printc('Using path: ' . $path, $silent);
    printc('Remove is: ' . ($remove ? 'on' : 'off'), $silent);
    printc('Remove debug is: ' . ($debug ? 'on' : 'off'), $silent);
    $path = realpath($path);
    if ($path === NULL || !is_dir($path)) {
        printc('Error: directory does not exists');
        die;
    }
    // Add directory separator to path
    $ds = DIRECTORY_SEPARATOR;
    $path = rtrim($path, $ds) . $ds;
    // Include Wordpress files
    printc('Loading Wordpress', $silent);
    define('BASE_PATH', $path);
    define('WP_USE_THEMES', false);
    // Require main wp loader
    require_once $path . 'wp-load.php';
    require_once $path . 'wp-admin' . $ds . 'includes' . $ds . 'image.php';
    require_once $path . 'wp-admin' . $ds . 'includes' . $ds . 'file.php';
    $regenerator = new Regenerator($remove, $debug, $silent);
    $regenerator->run();
}
开发者ID:vladimir-g,项目名称:wp-regenerate-thumbnails-cli,代码行数:44,代码来源:wp-regenerate-thumbnails-cli.php


示例13: _output

 function _output($cr, $o)
 {
     global $sid, $error, $showallauthors, $showposts, $uploadurl, $site_owner, $_full_uri;
     $siteOwnerId = db_get_value("user", "user_id", "user_uname='" . addslashes($site_owner) . "'");
     $parentAuthorId = db_get_value("discussion", "FK_author", "discussion_id='" . addslashes($this->parentid) . "'");
     //print $siteOwnerId;
     //printc("author=".$parentAuthorId);
     $siteObj =& $this->storyObj->owningSiteObj;
     $siteLevelEditors = $siteObj->getSiteLevelEditors();
     $isSiteEditor = in_array($_SESSION[auser], $siteLevelEditors);
     if ($showposts == 1 || ($_SESSION[auser] == $this->authoruname || $o == 1 || $isSiteEditor || $site_owner == $this->authoruname && $_SESSION[aid] == $parentAuthorId && $_SESSION[auser] || in_array($this->authoruname, $siteLevelEditors) && $_SESSION[aid] == $parentAuthorId && $_SESSION[auser])) {
         // check to see if we have any info to commit
         $this->_commithttpdata();
         if ($_REQUEST['discuss'] == 'edit' && $_REQUEST['id'] == $this->id) {
             $this->_outputform('edit');
             return true;
         }
         if ($_REQUEST['discuss'] == 'del' && $_REQUEST['id'] == $this->id) {
             $this->_del();
             return true;
         }
         if ($_REQUEST['discuss'] == 'rate' && $_REQUEST['id'] == $this->id) {
             $this->_outputform('rate');
             return true;
         }
         //$script = $_SERVER['SCRIPT_NAME'];
         /******************************************************************************
          * 	Outputs html for displaying posts
          * outputs discussion post info
          ******************************************************************************/
         if (!$this->id) {
             return false;
         }
         printc("\n<tr>");
         $s = "<a href='" . $_full_uri . "/index.php?{$sid}&amp;action=site&amp;" . $this->getinfo . "&amp;expand=" . $this->id . "' name='" . $this->id . "'>" . $this->subject . "</a>\n";
         //	printc ("</form>");
         //		$s = $this->subject;
         //printpre($_SESSION);
         $a = "";
         if ($showallauthors == 1 || $_SESSION[auser] && ($o || $_SESSION[auser] == $this->authoruname || $site_owner == $this->authoruname && $_SESSION[aid] == $parentAuthorId)) {
             if ($this->opt("showauthor")) {
                 $a .= "by <span class='subject'>" . $this->authorfname . "</span>\n";
             }
             if ($this->opt("showauthor") && $this->opt("showtstamp")) {
                 $a .= " on ";
             }
         } else {
             $a .= "posted on ";
         }
         if ($this->opt("showtstamp")) {
             $a .= timestamp2usdate($this->tstamp);
         }
         // Wiki-markup example
         global $storyObj;
         $a .= WikiResolver::getMarkupExample($storyObj->getField("title"), $this->id);
         /******************************************************************************
          * 	 collect possible actions to current post (rely | del | edit | rate)
          ******************************************************************************/
         $b = array();
         if ($cfg['disable_discussion'] != TRUE && ($cfg['disable_discussion'] != TRUE && $_SESSION['ltype'] == 'admin')) {
             if ($cr) {
                 $b[] = "<a href='" . $_full_uri . "/index.php?{$sid}" . $this->getinfo . "&amp;replyto=" . $this->id . "&amp;action=site&amp;discuss=reply#reply'>reply</a>\n";
             }
             if ($o || $_SESSION[auser] == $this->authoruname && !$this->dbcount()) {
                 $b[] = "| <a href='" . $_full_uri . "/index.php?{$sid}" . $this->getinfo . "&amp;action=site&amp;discuss=del&amp;id=" . $this->id . "'>delete</a>\n";
             }
             if ($_SESSION[auser] == $this->authoruname && !$this->dbcount()) {
                 $b[] = " | <a href='" . $_full_uri . "/index.php?{$sid}" . $this->getinfo . "&amp;id=" . $this->id . "&amp;action=site&amp;discuss=edit#" . $this->id . "'>edit</a>\n";
             }
             if ($o) {
                 $ratelink = "<a href='" . $_full_uri . "/index.php?{$sid}" . $this->getinfo . "&amp;id=" . $this->id . "&amp;action=site&amp;discuss=rate#" . $this->id . "'>rate</a>\n";
             }
         }
         /******************************************************************************
          * if there are dicussion actions (reply | del | edit | rate) then print 
          ******************************************************************************/
         if ($a != "" || count($b)) {
             $c = '';
             if (count($b)) {
                 $c .= implode(" ", $b);
             }
             /******************************************************************************
              * discussion post header info (subject=$s, author and timestamp=$a, options=$c)
              ******************************************************************************/
             //printc ("<table width='100%' cellspacing='0px'>\n");
             printc("\n<td class='dheader3'>\n");
             printc("<table width='100%' cellspacing='0px'>\n");
             printc("<tr><td align='left'>\n");
             printc("<span class='subject'>\n");
             // subject
             printc($s);
             // rating
             if ($this->rating !== NULL) {
                 printc(" (Rating: " . $this->rating . ")");
             }
             printc("</span></td>\n");
             // link for rating
             printc("<td align='right'>{$ratelink}</td>\n");
             printc("</tr><tr>\n");
             printc("<td>{$a}\n");
//.........这里部分代码省略.........
开发者ID:adamfranco,项目名称:segue-1.x,代码行数:101,代码来源:discussion.inc.php


示例14: multiply10

<?php

require_once './lib/functions.php';
function multiply10($value)
{
    $value = $value * 10;
    return $value;
}
function multiply10ref(&$byReference)
{
    $byReference = multiply10($byReference);
}
$value = 2;
$multiply = multiply10($value);
$message1 = sprintf('%d * 10 = %d', $value, $multiply);
$message2 = sprintf('$value after multiply is %d', $value);
printc($message1);
printc($message2);
multiply10ref($value);
$message3 = sprintf('$value after multiply by reference is %d', $value);
printc($message3);
开发者ID:NASTYHAWK,项目名称:php-beginners,代码行数:21,代码来源:functions.php


示例15: handlearchive

function handlearchive($stories, $pa)
{
    global $startday, $startmonth, $startyear, $endday, $endmonth, $endyear, $usestart, $useend, $months;
    global $usesearch;
    global $site, $section, $page;
    $newstories = array();
    if (!$usesearch) {
        $endyear = date("Y");
        $endmonth = date("n");
        $endday = date("j");
    }
    printc("<div>");
    //	printc("<b>Search:</b> ");
    printc("Display content in date rage: ");
    printc("<form action='{$PHP_SELF}?{$sid}&amp;action=site&amp;site={$site}&amp;section={$section}&amp;page={$page}' method='post'>");
    printc("<input type='hidden' name='usesearch' value='1' />");
    printc("<select name='startday'>");
    for ($i = 1; $i <= 31; $i++) {
        printc("<option" . ($startday == $i ? " selected" : "") . ">{$i}\n");
    }
    printc("</select>\n");
    printc("<select name='startmonth'>");
    for ($i = 0; $i < 12; $i++) {
        printc("<option value=" . ($i + 1) . ($startmonth == $i + 1 ? " selected" : "") . ">{$months[$i]}\n");
    }
    printc("</select>\n<select name='startyear'>");
    $curryear = date("Y");
    for ($i = $curryear - 10; $i <= $curryear; $i++) {
        printc("<option" . ($startyear == $i ? " selected" : "") . ">{$i}\n");
    }
    printc("</select>");
    //	printc("<br />");
    printc(" to <select name='endday'>");
    for ($i = 1; $i <= 31; $i++) {
        printc("<option" . ($endday == $i ? " selected" : "") . ">{$i}\n");
    }
    printc("</select>\n");
    printc("<select name='endmonth'>");
    for ($i = 0; $i < 12; $i++) {
        printc("<option value=" . ($i + 1) . ($endmonth == $i + 1 ? " selected" : "") . ">{$months[$i]}\n");
    }
    printc("</select>\n<select name='endyear'>");
    for ($i = $curryear; $i <= $curryear + 5; $i++) {
        printc("<option" . ($endyear == $i ? " selected" : "") . ">{$i}\n");
    }
    printc("</select>");
    printc(" <input type='submit' class='button' value='go' />");
    printc("</form></div>");
    $start = mktime(1, 1, 1, $startmonth, $startday, $startyear);
    $end = mktime(1, 1, 1, $endmonth, $endday, $endyear);
    if ($pa == 'week') {
        if (!$usesearch) {
            $start = mktime(0, 0, 0, date("n"), date('j') - 7, date('Y'));
            $end = time();
        }
    }
    if ($pa == 'month') {
        if (!$usesearch) {
            $start = mktime(0, 0, 0, date("n") - 1, date('j'), date("Y"));
            $end = time();
        }
    }
    if ($pa == 'year') {
        if (!$usesearch) {
            $start = mktime(0, 0, 0, date("n"), date('j'), date("Y") - 1);
            $end = time();
        }
    }
    $txtstart = date("n/j/y", $start);
    $txtend = date("n/j/y", $end);
    foreach ($stories as $s) {
        $a = db_get_line("stories", "id='" . addslashes($s) . "'");
        $added = $a[addedtimestamp];
        ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $added, $regs);
        $year = (int) $regs[1];
        $month = (int) $regs[2];
        $day = (int) $regs[3];
        $t = mktime(0, 0, 0, $month, $day, $year);
        // 			$week = date("W",$t-(date("w",$t)*86400));
        //
        // 			if ($startyear == $year && $startweek == $week)
        // 				$newstories[] = $s;
        // 		if ((!$usestart || $start < $t) && (!$useend || $t < $end)) {
        if ($start < $t && $t < $end || false) {
            $newstories[$s] = $t;
        }
    }
    // 	print_r($newstories);
    arsort($newstories, SORT_NUMERIC);
    // 	print_r($newstories);
    $newstories = array_keys($newstories);
    printc("<b>Content ranging from {$txtstart} to {$txtend}.</b><br /><br />");
    return $newstories;
}
开发者ID:adamfranco,项目名称:segue-1.x,代码行数:94,代码来源:functions.inc.php


示例16: printc

    printc("<table border='0' width='100%'>");
    foreach (array_reverse($thisSite->sections, TRUE) as $s => $o) {
        if ($i != $total - 1) {
            $pdfname = $filename = $fileurl = $extra = '';
            $pdfname = createPdfName($o->getField("title"));
            $filename = "{$uploaddir}/" . $thisSite->name . "/{$pdfname}";
            $fileurl = "{$uploadurl}/" . $thisSite->name . "/{$pdfname}";
            if (file_exists($filename)) {
                $extra .= pdflink($filename, $fileurl, 1);
            }
            printc("<b><a href='{$PHP_SELF}?{$sid}&amp;site={$site}&amp;section={$s}&amp;action={$newaction}&amp;supplement=listarticles'>" . $o->getField("title") . "</a></b>");
            if ($isediting) {
                printc("<div align='right' class='smaller'>");
                if ($o->hasPermission("edit")) {
                    printc("<a href='{$PHP_SELF}?{$sid}&amp;action=edit_section&amp;site={$site}&amp;section={$s}&amp;edit_section={$s}&amp;comingFrom=viewsite%26supplement%3Dlistissues'>edit</a>\n");
                }
                if ($o->hasPermission("delete")) {
                    printc("<a href='{$PHP_SELF}?{$sid}&amp;action=delete_section&amp;site={$site}&amp;section={$s}&amp;delete_section={$s}&amp;comingFrom=viewsite%26supplement%3Dlistissues'>delete</a>\n");
                }
                printc("</div>");
            }
            printc("</td>");
            printc("<td>{$extra}</td></tr>");
        }
        $i++;
    }
    printc("</table>");
    if ($isediting && $thisSite->hasPermission("add")) {
        printc("<br /><div align='right'><a href='{$PHP_SELF}?{$sid}&amp;site={$site}&amp;action=add_section&amp;comingFrom=viewsite%26supplement%3Dlistissues'>+ add issue</a>");
    }
}
开发者ID:adamfranco,项目名称:segue-1.x,代码行数:31,代码来源:listissues.inc.php


示例17: assignvar

function assignvar()
{
    $var = 1;
    $message = sprintf('Value of $var inside the function is %d', $var);
    printc($message);
}
开发者ID:NASTYHAWK,项目名称:php-beginners,代码行数:6,代码来源:scope.php


示例18: printc

<?php

printc($array);
printc($array[0]);
printc($array[1]);
if (isset($array[3])) {
    printc($array[3]);
}
$search_index = array_search('First element', $array);
printc($search_index);
if ($search_index !== false) {
    printc($array[$search_index]);
}
$check = array_key_exists(0, $array);
printc($check);
开发者ID:NASTYHAWK,项目名称:php-beginners,代码行数:15,代码来源:arrays.php


示例19: printc

// make the navbars!
include "output_modules/publication/navbars.inc.php";
if ($thisSection) {
    printc("<div class='title'>Article listing:</div>");
    $newaction = $action;
    foreach ($thisSection->pages as $p => $o) {
        printc("<div class='articleitem'>");
        printc("<b><a href='{$PHP_SELF}?{$sid}&amp;site={$site}&amp;section={$section}&amp;page={$p}&amp;action={$newaction}'>" . $o->getField("title") . "</a></b>");
        list($first, $story) = each($o->stories);
        if ($story) {
            printc("<br />" . $story->getField("title"));
        }
        if (($author = $o->getField("url")) && $author != "http://") {
            printc("<br /><div class='leftmargin'>by {$author}</div>");
        }
        if ($isediting) {
            printc("<div align='right' class='smaller'>");
            if ($o->hasPermission("edit")) {
                printc("<a href='{$PHP_SELF}?{$sid}&amp;action=edit_page&amp;site={$site}&amp;section={$section}&amp;page={$p}&amp;edit_page={$p}&amp;comingFrom=viewsite%26supplement%3Dlistarticles'>edit</a>\n");
            }
            if ($o->hasPermission("delete")) {
                printc("<a href='{$PHP_SELF}?{$sid}&amp;action=delete_page&amp;site={$site}&amp;section={$section}&amp;page={$p}&amp;delete_page={$p}&amp;comingFrom=viewsite%26supplement%3Dlistarticles'>delete</a>\n");
            }
            printc("</div>");
        }
        printc("</div>");
    }
    if ($isediting && $thisSection->hasPermission("add")) {
        printc("<br /><div align='right'><a href='{$PHP_SELF}?{$sid}&amp;site={$site}&amp;section={$section}&amp;action=add_page&amp;comingFrom=viewsite%26supplement%3Dlistarticles'>+ add article</a>");
    }
}
开发者ID:adamfranco,项目名称:segue-1.x,代码行数:31,代码来源:listarticles.inc.php


示例20: header

        }
        $sitename = $_SESSION[siteObj]->getField("name");
        $comingFrom = $_SESSION[settings][comingFrom];
        $add = $_SESSION[settings][add];
        if ($add) {
            header("Location: index.php?{$sid}&action=viewsite&site={$sitename}");
        } else {
            if ($comingFrom) {
                header("Location: index.php?{$sid}&action={$comingFrom}&site={$sitename}");
            } else {
                header("Location: index.php?{$sid}");
            }
        }
        exit;
    } else {
        printc("<br />There was an error");
    }
}
/******************************************************************************
 * Form Stuff
 ******************************************************************************/
if ($_SESSION[settings][edit] && $_SESSION[settings][step] == 3 && $prevbutton) {
    $_SESSION[settings][step] = 2;
} else {
    if ($_SESSION[settings][edit] && $_SESSION[settings][step] == 3) {
        $_SESSION[settings][step] = 4;
    }
}
// ------- print out the add form -------
// --- The Navigation Links for the sidebar ---
$leftlinks = "________________<br /><table>";
开发者ID:adamfranco,项目名称:segue-1.x,代码行数:31,代码来源:add_site.inc.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP printerror函数代码示例发布时间:2022-05-15
下一篇:
PHP print_yes_row函数代码示例发布时间: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