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


PHP templates_draw函数代码示例

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


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

示例1: folio_control_page_edit_move

function folio_control_page_edit_move($page)
{
    // Find the security information for the page.
    global $CFG;
    $url = url;
    $page_ident = intval($page->page_ident);
    $parentpage_ident = intval($page->parentpage_ident);
    // Check to see if we're on the homepage.
    if (folio_page_is_homepage($page)) {
        // Don't allow moving a homepage.
        $run_result = '<input type="hidden" name="parentpage_ident" value="' . $page->parentpage_ident . '" />';
    } elseif (!isloggedin()) {
        // Have to be logged in to move a page.
        // mark control as disabled & don't bother loading all of the pages.
        $run_result = "\t\t\t<SELECT NAME=\"parentpage_ident\" DISABLED>";
        // Get parentpage title
        $pages = recordset_to_array(get_recordset_sql('select page_ident, title from ' . $CFG->prefix . 'folio_page ' . 'WHERE newest = 1 and user_ident = ' . $page->user_ident . ' AND page_ident = ' . $page->parentpage_ident));
        // build
        if ($pages) {
            // Iterate
            foreach ($pages as $potentialpage) {
                // Selected
                $run_result .= '<OPTION VALUE=' . $potentialpage->page_ident . " SELECTED=true>" . $potentialpage->title . "\n";
            }
            $run_result .= "</SELECT><br/>\n" . "<input type='hidden' name='parentpage_ident' value='{$potentialpage->page_ident}' />\n";
        } else {
            // No pages.  Show control set to homepage & disabled.
            $run_result = "\t\t\t<SELECT NAME=\"parentpage_ident\" disabled=TRUE>" . '<OPTION VALUE="' . $page->parentpage_ident . '" SELECTED=true>Homepage' . "</SELECT><br/>\n" . "<input type='hidden' name='parentpage_ident' value='{$potentialpage->page_ident}' />\n";
        }
        $run_result = templates_draw(array('context' => 'databoxvertical', 'name' => 'Parent Page', 'contents' => $run_result));
    } else {
        // Ok conditions, build the control.
        $run_result = "\t\t\t<SELECT NAME=\"parentpage_ident\">";
        // Get all titles for active pages belonging to the current user
        $pages = recordset_to_array(get_recordset_sql('select page_ident, title from ' . $CFG->prefix . 'folio_page ' . 'WHERE newest = 1 and user_ident = ' . $page->user_ident . ' AND page_ident <> ' . $page->page_ident . ' AND parentpage_ident <> ' . $page->page_ident . ' order by title'));
        // build
        if ($pages) {
            // Iterate
            foreach ($pages as $potentialpage) {
                if ($page->parentpage_ident == $potentialpage->page_ident) {
                    // Selected
                    $run_result .= '<OPTION VALUE=' . $potentialpage->page_ident . " SELECTED=true>" . $potentialpage->title . "\n";
                } else {
                    // !Selected
                    $run_result .= '<OPTION VALUE=' . $potentialpage->page_ident . " >" . $potentialpage->title . "\n";
                }
            }
            $run_result .= "</SELECT><br/>\n";
        } else {
            // No pages.  Show control set to homepage & disabled.
            $run_result = "\t\t\t<SELECT NAME=\"parentpage_ident\" disabled=TRUE>" . '<OPTION VALUE="' . $page->parentpage_ident . '" SELECTED=true>Homepage' . "</SELECT><br/>\n";
        }
        $run_result = templates_draw(array('context' => 'databoxvertical', 'name' => 'Parent Page', 'contents' => $run_result));
    }
    return $run_result;
}
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:56,代码来源:page_edit_move.php

示例2: foreach

<?php

global $page_owner;
global $USER;
if ($page_owner != -1) {
    if (user_type($page_owner) == "person") {
        if ($result = get_records_select('users', "owner = ? AND user_type = ? Limit 5", array($page_owner, 'community'))) {
            $body = "<ul>";
            foreach ($result as $row) {
                $row->name = run("profile:display:name", $row->ident);
                $body .= "<li><a href=\"" . url . $row->username . "/\">" . $row->name . "</a></li>";
            }
            $body .= "<li><a href=\"" . url . $USER->username . "/communities/owned" . "\">" . __gettext("All community") . "</a></li>";
            $body .= "</ul>";
            // $run_result .= $body;
            $run_result .= "<li id=\"community_owned\">";
            $run_result .= templates_draw(array('context' => 'sidebarholder', 'title' => __gettext("Owned communities"), 'body' => $body));
            $run_result .= "</li>";
        } else {
            $run_result .= "";
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:clavel-svn,代码行数:23,代码来源:communities_owned.php

示例3: file_folder_view

function file_folder_view($folder)
{
    global $CFG;
    /*
     *    View a specific folder
     *    (Access rights are presumed)
     */
    // Find out who's the owner
    global $page_owner;
    $owner_username = user_info('username', $page_owner);
    // If we're not in the parent folder, provide a link to return to the parent
    /*
    if ($folder->ident != -1) {
        $folder->name = stripslashes($folder->name);
    }
    */
    $body = "<h2>" . $folder->name . "</h2>";
    // Firstly, get a list of folders
    // Display folders we actually have access to
    if ($folder->idents = get_records_select('file_folders', "parent = {$folder->ident} AND (" . run("users:access_level_sql_where") . ") and files_owner = {$page_owner}")) {
        $subFolders = __gettext("Subfolders");
        // gettext variable
        $body .= <<<END

                            <h3>
                                {$subFolders}
                            </h3>

END;
        foreach ($folder->idents as $folder->ident_details) {
            if (run("users:access_level_check", $folder->ident_details->access) == true) {
                $username = $owner_username;
                $ident = (int) $folder->ident_details->ident;
                $name = get_access_description($folder->ident_details->access);
                $name .= stripslashes($folder->ident_details->name);
                $folder->identmenu = file_folder_edit_links($folder->ident_details);
                $keywords = display_output_field(array("", "keywords", "folder", "folder", $ident, $folder->ident_details->owner));
                if ($keywords) {
                    $keywords = __gettext("Keywords: ") . $keywords;
                }
                $body .= templates_draw(array('context' => 'folder', 'username' => $username, 'url' => $CFG->wwwroot . "{$username}/files/{$ident}", 'ident' => $ident, 'name' => $name, 'menu' => $folder->identmenu, 'icon' => $CFG->wwwroot . "mod/file/folder.png", 'keywords' => $keywords));
            }
        }
    }
    // Then get a list of files
    // View files we actually have access to
    if ($files = get_records_select('files', "folder = ? AND files_owner = ?", array($folder->ident, $page_owner))) {
        foreach ($files as $file) {
            if (run("users:access_level_check", $file->access) == true || $file->owner == $_SESSION['userid']) {
                $username = $owner_username;
                $ident = (int) $file->ident;
                $folder->ident = $file->folder;
                $title = get_access_description($file->access);
                $title .= stripslashes($file->title);
                $description = nl2br(stripslashes($file->description));
                $filetitle = urlencode($title);
                $originalname = stripslashes($file->originalname);
                $filemenu = round($file->size / 1048576, 4) . "MB ";
                $icon = $CFG->wwwroot . "_icon/file/" . $file->ident;
                $filepath = $CFG->wwwroot . "{$username}/files/{$folder->ident}/{$ident}/" . urlencode($originalname);
                $mimetype = mimeinfo('type', $file->originalname);
                if ($mimetype == "audio/mpeg" || $mimetype == "audio/mp3") {
                    $filemenu .= " <object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\"\n        codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\"\n        width=\"17\" height=\"17\" >\n            <param name=\"allowScriptAccess\" value=\"sameDomain\" />\n            <param name=\"movie\" value=\"" . $CFG->wwwroot . "mod/file/mp3player/musicplayer.swf?song_url={$filepath}&amp;song_title={$filetitle}\" />\n            <param name=\"quality\" value=\"high\" />\n            <embed src=\"" . $CFG->wwwroot . "mod/file/mp3player/musicplayer.swf?song_url={$filepath}&amp;song_title={$filetitle}\"\n            quality=\"high\" bgcolor=\"#E6E6E6\" name=\"xspf_player\" allowscriptaccess=\"sameDomain\"\n            type=\"application/x-shockwave-flash\"\n            pluginspage=\"http://www.macromedia.com/go/getflashplayer\"\n            align=\"center\" height=\"17\" width=\"17\" />\n        </object>";
                }
                $filemenu = file_edit_links($file);
                $keywords = display_output_field(array("", "keywords", "file", "file", $ident, $file->owner));
                if ($keywords) {
                    $keywords = __gettext("Keywords: ") . $keywords;
                }
                $body .= templates_draw(array('context' => 'file', 'username' => $username, 'title' => $title, 'ident' => $ident, 'folder' => $folder->ident, 'description' => $description, 'originalname' => $originalname, 'url' => $filepath, 'menu' => $filemenu, 'icon' => $icon, 'keywords' => $keywords));
                $body .= display_run_displayobjectannotations($file, "file::file");
            }
        }
    }
    // Deliver an apologetic message if there aren't any files or folders
    if (empty($files) && empty($folder->idents)) {
        $body .= "<p>" . __gettext("This folder is currently empty.") . "</p>";
    }
    return $body;
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:80,代码来源:lib.php

示例4: returnHTML

/**
* Build presentation data
**/
function returnHTML($purpose, $format, $results, $resultcount, $page, $username)
{
    $url = url;
    // PURPOSE
    if ($purpose == 'activity') {
        $pagetitle = 'Recent Activity';
    } elseif ($purpose == 'subscribe') {
        $pagetitle = 'Recent Changes';
    } else {
        error('Invalid purpose ' . $purpose . ' passed to feeds.php');
        die;
    }
    switch ($format) {
        case 'html':
            $body = folio_control_htmlfeed($results, $resultcount, $page, $username);
            // Transfer into template & write.
            templates_page_setup();
            if (isloggedin()) {
                $rsskey = folio_createhash($_SESSION['userid'] . '/');
            } else {
                $rsskey = '';
            }
            $types = str_replace(' ', '+', required_param('types'));
            $body = templates_draw(array('context' => 'contentholder', 'title' => "<a href='{$url}{$username}/{$purpose}/rss/{$types}/{$rsskey}'><img border=0 src='{$url}_templates/icons/rss.png' /></a> {$username} :: {$pagetitle} ", 'body' => $body));
            return templates_page_draw(array($pagetitle, $body));
            break;
        case 'rss':
            $body = folio_control_rssfeed($results, $resultcount, $username);
            header("Pragma: public");
            header("Cache-Control: public");
            header('Expires: ' . gmdate("D, d M Y H:i:s", time() + 3600) . " GMT");
            $etag = md5($body);
            header('ETag: "' . $etag . '"');
            header("Content-Length: " . strlen($body));
            header("Content-type: text/xml; charset=utf-8");
            return $body;
            break;
        default:
            error('Invalid format passed to feeds.php');
            break;
    }
}
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:45,代码来源:feeds.php

示例5: gettext

$heading2 = gettext("Heading two");
// gettext variable
$bulletList = gettext("A bullet list");
// gettext variable
$heading3 = gettext("Heading three");
// gettext variable
$numberedList = gettext("A numbered list");
// gettext variable
$body = <<<END
        
    <img src="{{url}}_templates/leaves.jpg" width="300" height="225" alt="A test image" align="right" />
    <h1>{$heading1}</h1>
    <p>Paragraph text</p>
    <h2>{$heading2}</h2>
    <ul>
        <li>{$bulletList}</li>
    </ul>
    <h3>{$heading3}</h3>
    <ol>
        <li>{$numberedList}</li>
    </ol>
        
END;
$run_result .= templates_draw(array('context' => 'contentholder', 'title' => $name, 'body' => $body));
// Form elements
$name = "Data input";
$body = templates_draw(array('context' => 'databox', 'name' => gettext("Some text input"), 'column1' => display_input_field(array("blank", "", "text")), 'column2' => run("display:access_level_select", array("blank", "PUBLIC"))));
$body .= templates_draw(array('context' => 'databox1', 'name' => gettext("Some longer text input"), 'column1' => display_input_field(array("blank", "", "longtext"))));
$body .= templates_draw(array('context' => 'databoxvertical', 'name' => gettext("Further text input"), 'contents' => display_input_field(array("blank", "", "longtext")) . "<br />" . display_input_field(array("blank", "", "text")) . "<br /><input type='button' value='Button' />"));
$run_result .= templates_draw(array('context' => 'contentholder', 'title' => $name, 'body' => $body, 'submenu' => ''));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:30,代码来源:templates_preview.php

示例6: htmlspecialchars

{$memberlist}
                            </select><br />
                            <input type="submit" value="{$removeFromGroup}" />
                            <input type="hidden" name="groupid" value="{$parameter[0]->ident}" />
                            <input type="hidden" name="action" value="group:removemember" />
                        </p></form>
                    </td>
                </tr>
            </table>
END;
$namevalue = htmlspecialchars($parameter[0]->name, ENT_COMPAT, 'utf-8');
// $accessvalue = run("display:access_level_select",array("groupaccess",$parameter[0]->access));
$saveGroup = gettext("Save this group");
// gettext variable
$deleteGroup = gettext("Delete this group");
// gettext variable
$name = <<<END
                        <form action="index.php" method="post" style="display:inline">
                            <input type="text"   name="groupname" value="{$namevalue}" />
                            <input type="hidden" name="action" value="group:edit" />
                            <input type="hidden" name="groupid" value="{$parameter[0]->ident}" />
                            <input type="submit" value={$saveGroup} />
                        </form>
                        <form action="index.php" method="post" style="display:inline">
                            <input type="hidden" name="action" value="group:delete" />
                            <input type="hidden" name="groupid" value="{$parameter[0]->ident}" />
                            <input type="submit" value={$deleteGroup} />
                        </form>
END;
$body .= templates_draw(array('context' => 'databoxvertical', 'name' => $name, 'contents' => $column1 . $column2));
$run_result .= $body;
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:31,代码来源:groups_edit_display.php

示例7: templates_draw

        if (run("permissions:check", "profile")) {
            $body .= "<form action=\"\" method=\"post\" >";
        }
        $body .= templates_draw(array('context' => 'adminTable', 'name' => "<b>" . gettext("Last updated") . "</b>", 'column1' => "<b>" . gettext("Resource name") . "</b>", 'column2' => "&nbsp;"));
        foreach ($feed_subscriptions as $feed) {
            $name = "<a href=\"" . $feed->siteurl . "\">" . stripslashes($feed->name) . "</a>";
            $column2 = "<a href=\"" . url . "_rss/individual.php?feed=" . $feed->ident . "\">" . gettext("View content") . "</a>";
            if (run("permissions:check", "profile")) {
                $column2 .= " | <a href=\"" . url . "_rss/subscriptions.php?action=unsubscribe&amp;feed=" . $feed->ident . "\" onclick=\"return confirm('" . gettext("Are you sure you want to unsubscribe from this feed?") . "')\">" . gettext("Unsubscribe") . "</a>";
            }
            $body .= templates_draw(array('context' => 'adminTable', 'name' => strftime("%B %d %Y, %H:%M", $feed->last_updated), 'column1' => $name, 'column2' => $column2));
        }
        if (run("permissions:check", "profile")) {
            $body .= templates_draw(array('context' => 'adminTable', 'name' => "<input type=\"hidden\" name=\"action\" value=\"rss:subscriptions:update\" />", 'column1' => "<input type=\"submit\" value=\"" . gettext("Update") . "\" />", 'column2' => ""));
            $body .= "</form>";
        }
    } else {
        if ($_SESSION['userid'] == $page_owner) {
            $body .= "<p>" . gettext("You are not subscribed to any feeds.") . "</p>";
        } else {
            $body .= "<p>" . gettext("No feeds were found.") . "</p>";
        }
    }
    if (run("permissions:check", "profile")) {
        $body .= "<p>" . gettext("To subscribe to a new feed, enter its address below:") . "</p>";
        $body .= "<form action=\"\" method=\"post\">";
        $body .= templates_draw(array('context' => 'adminTable', 'name' => "&nbsp;", 'column1' => "<input type=\"text\" name=\"url\" value=\"http://\" style=\"width: 100%\" />", 'column2' => "<input type=\"submit\" value=\"" . gettext("Subscribe") . "\" />"));
        $body .= "<input type=\"hidden\" name=\"action\" value=\"subscribe-new\" /></form>";
    }
    $run_result .= $body;
}
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:31,代码来源:function_subscriptions.php

示例8: array

                                    WHERE wc.posted > ? AND wl.owner = ?
                                    ORDER BY wc.posted DESC', array($starttime, $page_owner))) {
    foreach ($activities as $activity) {
        $commentbody = stripslashes($activity->body);
        $commentbody .= "<br /><br /><a href=\"" . url . $activity->username . "/weblog/" . $activity->weblogpost . ".html\">" . __gettext("Read more") . "</a>";
        $activity->postedname = stripslashes($activity->postedname);
        $activity->weblogname = stripslashes($activity->weblogname);
        if ($activity->weblog == $USER->ident) {
            $activity->weblogname = __gettext("your blog");
        }
        if ($activity->owner == $USER->ident) {
            $commentposter = sprintf(__gettext("<b>You</b> commented on weblog post '%s' in %s:"), stripslashes($activity->weblogtitle), $activity->weblogname);
        } else {
            $commentposter = sprintf(__gettext("<b>%s</b> commented on weblog post '%s' in %s:"), $activity->postedname, stripslashes($activity->weblogtitle), $activity->weblogname);
        }
        $body .= templates_draw(array('context' => 'databox1', 'name' => $commentposter, 'column1' => $commentbody));
    }
} else {
    $body .= "<p>" . __gettext("No activity during this time period.") . "</p>";
}
// Display the river, if river plugin is installed!
if (function_exists('river_save_event')) {
    $river = river_get_river($page_owner, 0, $starttime);
    $body .= "<h2>" . __gettext("Your river") . "</h2>";
    if ($river) {
        $d1 = "";
        $d2 = "";
        foreach ($river as $r) {
            $d2 = date("j-n-y", $r->ts);
            // Set second marker
            $txt = $r->string;
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:31,代码来源:index.php

示例9: user_info

    $community_owner = user_info('owner', $community_id);
    $result = run('community:members:data', array($community_id));
    $i = 1;
    if (!empty($result)) {
        foreach ($result as $key => $info) {
            $link = $CFG->wwwroot . $info->username . "/";
            $friends_name = user_name($info->ident);
            $info->icon = run("icons:get", $info->ident);
            $friends_icon = user_icon_html($info->ident, COMMUNITY_ICON_SIZE);
            // $friends_menu = run("users:infobox:menu",array($info->ident));
            $functions = array();
            if ($community_owner != $info->ident && $community_owner == $_SESSION['userid']) {
                $msg = "onclick=\"return confirm('" . __gettext("Are you sure you want to separate this user from the community?") . "')\"";
                $functions[] = "<a href=\"" . $CFG->wwwroot . $community_name . "/community/separate/" . $info->ident . "\" {$msg}>" . __gettext("Separate") . "</a>";
            } else {
                if ($community_owner == $info->ident) {
                    $functions[] = "<b>(" . __gettext("Owner") . ")</b>";
                }
            }
            $functions = implode("\n", array_map(create_function('$entry', "return \"<li>\$entry</li>\";"), $functions));
            $members .= templates_draw(array('context' => 'community_member', 'name' => $friends_name, 'icon' => $friends_icon, 'link' => $link, 'functions' => $functions));
            if ($i % COMMUNITY_MEMBERS_PER_ROW == 0) {
                $members .= "</tr><tr>";
            }
            $i++;
        }
    } else {
        $members .= "<td><p>" . __gettext("This community doesn't currently have any members.") . "</p></td>";
    }
    $run_result = templates_draw(array('context' => 'community_members', 'members' => $members));
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:31,代码来源:communities_members.php

示例10: display_input_field

            $column1 = "";
        }
        if (empty($current_template[$element['id']])) {
            $current_template[$element['id']] = $template[$element['id']];
        }
        $column2 = display_input_field(array("template[" . $element['id'] . "]", $current_template[$element['id']], "longtext"));
        /*        
                $run_result .= templates_draw(array(
                                        'context' => 'databox',
                                        'name' => $name,
                                        'column2' => $column1,
                                        'column1' => $column2
                                    )
                                    );
        */
        $run_result .= templates_draw(array('context' => 'databoxvertical', 'name' => $name, 'contents' => $column1 . "<br />" . $column2));
    }
}
if ($editable) {
    $save = __gettext("Save");
    // gettext variable
    $run_result .= <<<END
    
        <p align="center">
            <input type="hidden" name="action" value="templates:save" />
            <input type="hidden" name="save_template_id" value="{$template_id}" />
            <input type="submit" value="{$save}" />
        </p>    
    
END;
} else {
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:31,代码来源:templates_edit.php

示例11: str_replace

    $subdir = str_replace($_SERVER['SERVER_NAME'], "", substr($basedomain, strpos($basedomain, "://") + 3, strlen($basedomain) - 3));
    $passthru = $basedomain . str_replace($subdir, "", $_SERVER['REQUEST_URI']);
    $body .= templates_draw(array('template' => -1, 'context' => 'sidebarholder', 'submenu' => '', 'body' => '
            <table>
                <tr>
                    <td align="right"><p>
                        <label>' . __gettext("Username") . '&nbsp;<input type="text" name="username" id="username" style="size: 200px" /></label><br />
                        <label>' . __gettext("Password") . '&nbsp;<input type="password" name="password" id="password" style="size: 200px" />
                        </label>
                        <input type="hidden" name="passthru_url" value="' . $passthru . '" />
                        </p>
                    </td>
                </tr>
                <tr>
                    <td align="right"><p>
                        <input type="hidden" name="action" value="log_on" />
                        <label>' . '<input type="submit" name="submit" value="' . __gettext("Login") . '" /></label><br /><br />
                        <label><input type="checkbox" name="remember" />
                                ' . __gettext("Remember Login") . '</label><br />
                        <small>
                            ' . $reg_link . '
                            <a href="' . url . 'mod/invite/forgotten_password.php">' . __gettext("Forgotten password") . '</a>
                        </small></p>
                    </td>
                </tr>

            </table>

'));
    $body .= "</form></li>";
    $run_result .= $body;
开发者ID:BackupTheBerlios,项目名称:clavel-svn,代码行数:31,代码来源:function_log_on_pane.php

示例12: __gettext

<?php

/*
 * Created on Dec 1, 2007
 *
 * @author Diego Andrés Ramírez Aragón <diego@somosmas.org>
 * @copyright Corporación Somos más - 2007
 */
global $page_owner, $USER, $CFG;
if (isset($parameter)) {
    $selected = $page_owner;
    $field_label = __gettext("Assign to:");
    $options = array();
    $options[$USER->ident] = __gettext("Own");
    if ($communities = get_records_select('users', 'owner = ? AND user_type = ?', array($USER->ident, 'community'))) {
        foreach ($communities as $community) {
            $options[$community->ident] = __gettext("Community") . ": " . $community->name;
        }
    }
    if ($communities = get_records_sql("SELECT u.* FROM " . $CFG->prefix . "friends f\n\t\t                                    JOIN " . $CFG->prefix . 'users u ON u.ident = f.friend 
		                                    WHERE u.user_type = ? AND u.owner <> ? AND f.owner = ?', array('community', $USER->ident, $USER->ident))) {
        foreach ($communities as $community) {
            $options[$community->ident] = __gettext("Community") . ": " . $community->name;
        }
    }
    if ($selected == $USER->ident && count($options) > 1) {
        $run_result .= templates_draw(array('context' => 'databoxvertical', 'name' => $field_label, 'contents' => display_input_field(array('assign_to', $selected, 'select_associative', null, null, null, $options))));
    }
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:29,代码来源:weblogs_assign_field.php

示例13: dirname

<?php

//	ELGG manage owned users page
global $CFG;
// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
// Initialise functions for user details, icon management and profile management
run("userdetails:init");
run("profile:init");
run("friends:init");
run("ownedusers:init");
define("context", "network");
templates_page_setup();
// Whose owned users are we looking at?
global $page_owner;
// You must be logged on to view this!
//	protect(1);
$title = run("profile:display:name") . " :: " . gettext($CFG->owned_users_caption);
echo templates_page_draw(array($title, templates_draw(array('context' => 'contentholder', 'title' => $title, 'body' => run("ownedusers:owned", array($page_owner))))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:19,代码来源:owned.php

示例14: pages_sidebar

function pages_sidebar()
{
    global $CFG, $page_owner;
    $owner = page_owner();
    $menu_elements = pages_get_mainmenu($owner);
    if ($owner > 0) {
        if ($_SESSION['userid'] == $owner) {
            $title = __gettext('Your Content');
        } else {
            //$title = sprintf(__gettext("%s's pages"), htmlspecialchars(user_name($owner), ENT_COMPAT, 'utf-8'));
            $title = __gettext("Content");
        }
    } else {
        $title = $CFG->sitename;
    }
    $body = templates_draw(array('context' => 'sidebarholder', 'title' => $title, 'body' => pages_html_menu($menu_elements)));
    return $body;
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:18,代码来源:lib.php

示例15: commentwall_display_footer

/**
 * @param $wall List of objects.
 */
function commentwall_display_footer($owner, $limit = 3, $offset = 0)
{
    global $CFG;
    $html = "";
    $count = get_record_sql("SELECT count(ident) as ident from {$CFG->prefix}commentwall where wallowner={$owner} order by posted desc");
    $count = $count->ident;
    $qs = $_SERVER['REDIRECT_URL'];
    if ($qs == "") {
        $qs = $_SERVER['PHP_SELF'];
    }
    // See if we need to display a next button
    $nextbutton = "";
    if ($count - $offset > $limit) {
        $nextbutton = "<a href=\"{$qs}?owner={$owner}&offset=" . ($offset + $limit) . "\">" . __gettext("Back") . "</a>";
    }
    // See if we need to display a prev button
    $prevbutton = "";
    if (floor($offset / $limit) > 0) {
        $prevbutton = "<a href=\"{$qs}?owner={$owner}&offset=" . ($offset - $limit) . "\">" . __gettext("Forward") . "</a>";
    }
    return templates_draw(array('context' => 'commentwallfooter', 'nextbutton' => $nextbutton, 'prevbutton' => $prevbutton));
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:25,代码来源:lib.php


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