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

PHP templates_draw函数代码示例

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

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



在下文中一共展示了templates_draw函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 <[email protected]>
 * @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


示例16: trim

$code = trim(optional_param('passwordcode'));
if (!empty($code)) {
    if ($details = get_record_sql('SELECT pr.ident AS passcodeid,u.* FROM ' . $CFG->prefix . 'password_requests pr
                                   JOIN ' . $CFG->prefix . "users u ON u.ident = pr.owner\r\n                                   WHERE pr.code = ? AND u.user_type = ?", array($code, 'person'))) {
        $createpassword = sprintf(__gettext("Please, enter a new Password:"));
        $run_result .= <<<END
    
    <p>
        {$createpassword}
    </p>
        
\t\t\t<form action="" method="post">
\t
END;
        $run_result .= templates_draw(array('context' => 'databoxvertical', 'name' => __gettext("New Password"), 'contents' => display_input_field(array("join_password1", "", "password"))));
        $run_result .= templates_draw(array('context' => 'databoxvertical', 'name' => __gettext("Confirm your new Password"), 'contents' => display_input_field(array("join_password2", "", "password"))));
        $id = $details->ident;
        $email = $details->email;
        $buttonValue = __gettext("Create");
        $run_result .= <<<END
\t\t\t<p align="center">
                <input type="hidden" name="action" value="invite_create_password" />
\t\t\t\t<input type="hidden" name="id" value={$id} />
\t\t\t\t<input type="hidden" name="email" value={$email} />
                <input type="submit" value={$buttonValue} />
            </p>\t\t\t
    </form>
END;
        /*$validcharset = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz234567898765432";
          $newpassword = "";
          for ($i = 0; $i < 8; $i++) {
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:31,代码来源:create_new_password.php


示例17: strftime

    }
    $author = "";
    $usericon = "default.png";
    //if (!empty($post->owner)) {
    //    $post_authors[$post->owner] = $author;
    //}
    // $date = stripslashes($post->posted);
    $date = strftime("%B %d, %Y", $post->added);
    if ($date != $prevdate) {
        $run_result .= "<div class=\"feed_date\"><h2>" . $date . "</h2></div>";
    }
    $prevdate = $date;
    if (trim($date) == "") {
        $date = __gettext("unknown");
    }
    // $date = stripslashes($post->added);
    $fullname = stripslashes($post->name);
    $tagline = stripslashes($post->tagline);
    $title = stripslashes($post->title);
    $body = stripslashes($post->body);
    $controls = "";
    $controls .= "<a href=\"" . $post->siteurl . "\">[" . __gettext("View site") . "]</a><br /><br />";
    if (logged_on) {
        if (run("rss:subscribed", $post->feed)) {
            $controls .= "<a href=\"" . url . "_rss/subscriptions.php?action=unsubscribe&amp;feed=" . $post->feed . "\" onclick=\"return confirm('" . __gettext("Are you sure you want to unsubscribe from this feed?") . "')\">[" . __gettext("Unsubscribe") . "]</a>";
        } else {
            $controls .= "<a href=\"" . url . "_rss/subscriptions.php?action=subscribe&amp;feed=" . $post->feed . "\" onclick=\"return confirm('" . __gettext("Are you sure you want to subscribe to this feed?") . "')\">[" . __gettext("Subscribe") . "]</a>";
        }
    }
    $run_result .= templates_draw(array('context' => 'rsspost', 'usericon' => $usericon, 'body' => $body, 'fullname' => $fullname, 'title' => $title, 'sitelink' => $post->siteurl, 'feedlink' => url . "_rss/individual.php?feed=" . $post->feed, 'link' => $post->url, 'tagline' => $tagline, 'controls' => $controls));
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:31,代码来源:function_view_post.php


示例18: dirname

<?php

// Run includes
require_once dirname(dirname(__FILE__)) . "/includes.php";
templates_page_setup();
// Draw page
echo templates_page_draw(array(sprintf(gettext("%s Terms &amp; Conditions"), sitename), templates_draw(array('body' => run("content:terms"), 'name' => sprintf(gettext("%s Terms &amp; Conditions"), sitename), 'context' => 'contentholder'))));
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:7,代码来源:terms.php


示例19: array

<?php

// Add multiple users
if (logged_on && run("users:flags:get", array("admin", $_SESSION['userid']))) {
    global $admin_users_add;
    if (!isset($admin_users_add)) {
        $admin_users_add = array("", "", "", "", "", "", "", "", "", "", "", "");
    } else {
        for ($i = 0; $i < 12; $i++) {
            if (!isset($admin_users_add[$i])) {
                $admin_users_add[$i] = "";
            }
        }
    }
    $run_result .= "<p>" . gettext("You can create up to 12 users below; passwords wi 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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