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

PHP Sections类代码示例

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

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



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

示例1: display_page_content

function display_page_content()
{
    $section_name = requestIdParam();
    $section = Sections::FindByName($section_name);
    $items = $section->findItems();
    ?>
		
		<div id="right">
			<h3>Item Thumbnail</h3>
		</div>
		<div id="center">
			<h3>All the <?php 
    echo $section->display_name;
    ?>
</h3>
			<?php 
    echo $section->content;
    ?>
		<?php 
    echo "<ul>\r\n";
    foreach ($items as $item) {
        echo "\t\t\t<li><a href=\"" . get_link("portfolio/item/{$section_name}/" . $item->name) . "\">{$item->display_name}</a></li>\r\n";
    }
    echo "\t\t</ul>\r\n";
    ?>
		</div>
		<?php 
}
开发者ID:highchair,项目名称:hcd-trunk,代码行数:28,代码来源:view.php


示例2: layout

 /**
  * list sections
  *
  * @param resource the SQL result
  * @return an array of $url => (NULL, $title, NULL, 'section_123', NULL, 'visit this section')
  *
  * @see layouts/layout.php
  **/
 function layout($result)
 {
     global $context;
     // empty list
     if (!SQL::count($result)) {
         $output = array();
         return $output;
     }
     // no hovering label
     $href_title = '';
     // we return an array of ($url => $attributes)
     $items = array();
     // process all items in the list
     while ($item = SQL::fetch($result)) {
         // the url to view this item
         $url = Sections::get_permalink($item);
         // initialize variables
         $prefix = $suffix = '';
         // list all components for this item
         $items[$url] = array($prefix, ucfirst(Skin::strip($item['index_title'], 30)), $suffix, 'section_' . $item['id'], NULL, $href_title);
     }
     // end of processing
     SQL::free($result);
     return $items;
 }
开发者ID:rair,项目名称:yacs,代码行数:33,代码来源:layout_sections_as_main_tabs.php


示例3: layout

 /**
  * list sections
  *
  * @param resource the SQL result
  * @return string the rendered text
  *
  * @see layouts/layout.php
  **/
 function layout($result)
 {
     global $context;
     // empty list
     if (!SQL::count($result)) {
         $output = array();
         return $output;
     }
     // we return some text
     $text = '';
     // process all items in the list
     while ($item = SQL::fetch($result)) {
         // we want to make it visual
         if (!$item['thumbnail_url']) {
             continue;
         }
         // a title for the image --do not force a title
         if (isset($item['title'])) {
             $title = $item['title'];
         } else {
             $title = '';
         }
         // the url to view this item
         $url = Sections::get_permalink($item);
         // use the skin to shape it
         $text .= Skin::build_image('thumbnail', $item['thumbnail_url'], $title, $url);
     }
     // end of processing
     SQL::free($result);
     return $text;
 }
开发者ID:rair,项目名称:yacs,代码行数:39,代码来源:layout_sections_as_thumbnails.php


示例4: display_page_content

function display_page_content()
{
    $section_name = requestIdParam();
    $section = Sections::FindByName($section_name);
    $item_name = getRequestVarAtIndex(3);
    $item = Items::FindByName($item_name);
    $gallery = $item->getGallery();
    ?>

		<h1><?php 
    echo $item->display_name;
    ?>
</h1>
<?php 
    $next_item = $item->findNext($section);
    $prev_item = $item->findPrev($section);
    if ($prev_item) {
        echo "\t\t\t\t<a href=\"" . get_link("portfolio/item/{$section_name}/" . $prev_item->name) . "\">previous</a>\n";
    }
    if ($next_item) {
        echo "\t\t\t\t<a href=\"" . get_link("portfolio/item/{$section_name}/" . $next_item->name) . "\">next</a>\n";
    }
    echo $item->content;
    foreach ($gallery->get_photos() as $photo) {
        echo "<img src=\"/" . $photo->getPublicUrl() . "\" /><br />";
    }
}
开发者ID:highchair,项目名称:hcd-trunk,代码行数:27,代码来源:item.php


示例5: breadCrumbs

function breadCrumbs($section)
{
    $data = Sections::bread($section);
    $str = "";
    for ($i = count($data) - 1; $i >= 0; $i--) {
        $str .= "<a href='/?section=" . $data[$i]['id'] . "'>" . $data[$i]['name'] . "</a>/";
    }
    return $str;
}
开发者ID:xarrper,项目名称:cms,代码行数:9,代码来源:index.php


示例6: display_page_content

function display_page_content()
{
    $listname = getRequestVarAtIndex(2);
    switch ($listname) {
        case "portfolio":
            foreach ($_POST as $ordered_objects => $order_value) {
                // splits up the key to see if we are ordering a section, item or ignoring a portfolio area
                $ordered_parts = explode("_", $ordered_objects);
                // NOTICE: I have learned that when there are portfoli orphans, this reordering script breaks. I removed the hidden fields in the Orphans section, but check in on that if you notice reordering breaking again.
                //$debug = "";
                if ($ordered_parts[0] != "PortFolioAreas") {
                    if ($ordered_parts[0] == "SectionOrder") {
                        $section = Sections::FindById($ordered_parts[1]);
                        $section->display_order = $order_value;
                        $section->save();
                        //$debug .= $section->display_name." updated";
                    } else {
                        $section = Sections::FindById($ordered_parts[0]);
                        $item = Items::FindById($ordered_parts[1]);
                        $item->updateOrderInSection($section, $order_value);
                        //$debug .= $item->display_name." updated";
                    }
                }
                //setFlash( "<h3>".$debug."</h3>" );
                //setFlash( "<h3>".var_export( $_POST, true )."</h3>" );
            }
            break;
        case "areaspages":
            foreach ($_POST as $ordered_objects => $order_value) {
                // splits up the key to see if we are ordering a section, item or ignoring a portfolio area
                $ordered_parts = explode("_", $ordered_objects);
                //$debug = "";
                if ($ordered_parts[0] == "AreaOrder") {
                    $area = Areas::FindById($ordered_parts[1]);
                    $area->display_order = $order_value;
                    $area->save();
                    //$debug .= "$area->display_name updated";
                } else {
                    if ($ordered_parts[0] == "SubPage") {
                        $page = Pages::FindById($ordered_parts[1]);
                        $page->display_order = $order_value;
                        $page->save();
                        //$debug .= "$page->display_name sub page updated";
                    } else {
                        $area = Areas::FindById($ordered_parts[0]);
                        $page = Pages::FindById($ordered_parts[1]);
                        $page->updateOrderInArea($area, $order_value);
                        //$debug .= "$page->display_name updated in $area->display_name";
                    }
                }
            }
            //setFlash( "<h3>".$debug."</h3>" );
            //setFlash( "<h3>".var_export( $_POST, true )."</h3>" );
            break;
    }
}
开发者ID:highchair,项目名称:hcd-trunk,代码行数:56,代码来源:order_parse.php


示例7: run

 public function run()
 {
     DB::table('sections')->delete();
     $section = array('title' => Lang::get('display.teachers'), 'description' => '', 'file' => false, 'status' => 'publish', 'type' => 'teachers', 'order' => 1);
     Sections::create($section);
     $section = array('title' => Lang::get('display.promotioners'), 'description' => '', 'file' => false, 'status' => 'publish', 'type' => 'promotioners', 'order' => 2);
     Sections::create($section);
     $section = array('title' => Lang::get('display.supporters'), 'description' => '', 'file' => false, 'status' => 'publish', 'type' => 'supporters', 'order' => 3);
     Sections::create($section);
     $section = array('title' => Lang::get('display.inscriptions'), 'description' => '', 'file' => false, 'status' => 'publish', 'type' => 'inscriptions', 'order' => 4);
     Sections::create($section);
     $section = array('title' => Lang::get('display.works'), 'description' => '', 'file' => false, 'status' => 'publish', 'type' => 'works', 'order' => 5);
     Sections::create($section);
 }
开发者ID:nagyist,项目名称:abge,代码行数:14,代码来源:SectionsTableSeeder.php


示例8: FindBySectionName

 function FindBySectionName($section_name = "")
 {
     if ($section_name == "") {
         return array();
     }
     $section = Sections::FindByName($section_name);
     $items = $section->findItems();
     $id_list = "";
     foreach ($items as $item) {
         $id_list .= "{$item->id},";
     }
     $id_list = trim($id_list, ',');
     return MyActiveRecord::FindBySql('Keywords', "SELECT DISTINCT k.* FROM keywords k inner join items_keywords ik ON ik.keywords_id = k.id and ik.items_id in ({$id_list})");
 }
开发者ID:highchair,项目名称:hcd-trunk,代码行数:14,代码来源:keywords.php


示例9: layout

 /**
  * list sections
  *
  * @param resource the SQL result
  * @return string the rendered text
  *
  * @see layouts/layout.php
  **/
 function layout($result)
 {
     global $context;
     // we return some text
     $text = '';
     // empty list
     if (!SQL::count($result)) {
         return $text;
     }
     // process all items in the list
     while ($item = SQL::fetch($result)) {
         // get the related overlay
         $overlay = Overlay::load($item, 'section:' . $item['id']);
         // more text
         $text .= Sections::to_xml($item, $overlay);
     }
     // end of processing
     SQL::free($result);
     return $text;
 }
开发者ID:rair,项目名称:yacs,代码行数:28,代码来源:layout_sections_as_xml.php


示例10: dirname

<?php

/*
 * Print edit folder
 *********************/
/* functions */
require dirname(__FILE__) . '/../../../functions/functions.php';
# initialize user object
$Database = new Database_PDO();
$User = new User($Database);
$Admin = new Admin($Database, false);
$Sections = new Sections($Database);
$Subnets = new Subnets($Database);
$Tools = new Tools($Database);
$Result = new Result();
# verify that user is logged in
$User->check_user_session();
# create csrf token
$csrf = $User->csrf_cookie("create", "folder");
# strip tags - XSS
$_POST = $User->strip_input_tags($_POST);
# validate action
$Admin->validate_action($_POST['action'], true);
# ID must be numeric
if ($_POST['action'] != "add") {
    if (!is_numeric($_POST['subnetId'])) {
        $Result->show("danger", _("Invalid ID"), true, true);
    }
}
# verify that user has permissions to add subnet
if ($_POST['action'] == "add") {
开发者ID:routenull0,项目名称:phpipam,代码行数:31,代码来源:edit-folder.php


示例11: transform_reference

 /**
  * reference another page at this site
  *
  * The function transforms a local reference (e.g;, [code][user=2][/code])
  * to an actual link relative to the YACS directory (e.g., [code]users/view.php/2[/code]),
  * adds a title and, sometimes, set a description as well.
  *
  * @param string any string, maybe with a local reference in it
  * @return an array($url, $title, $description) or NULL
  *
  * @see images/view.php
  * @see links/edit.php
  * @see shared/codes.php
  */
 public static function transform_reference($text)
 {
     global $context;
     // translate this reference to an internal link
     if (preg_match("/^\\[(article|section|file|image|category|user)=(.+?)\\]/i", $text, $matches)) {
         switch ($matches[1]) {
             // article link
             case 'article':
                 if ($item = Articles::get($matches[2])) {
                     return array(Articles::get_permalink($item), $item['title'], $item['introduction']);
                 }
                 return array('', $text, '');
                 // section link
             // section link
             case 'section':
                 if ($item = Sections::get($matches[2])) {
                     return array(Sections::get_permalink($item), $item['title'], $item['introduction']);
                 }
                 return array('', $text, '');
                 // file link
             // file link
             case 'file':
                 if ($item = Files::get($matches[2])) {
                     return array(Files::get_url($matches[2]), $item['title'] ? $item['title'] : str_replace('_', ' ', ucfirst($item['file_name'])));
                 }
                 return array('', $text, '');
                 // image link
             // image link
             case 'image':
                 include_once $context['path_to_root'] . 'images/images.php';
                 if ($item = Images::get($matches[2])) {
                     return array(Images::get_url($matches[2]), $item['title'] ? $item['title'] : str_replace('_', ' ', ucfirst($item['image_name'])));
                 }
                 return array('', $text, '');
                 // category link
             // category link
             case 'category':
                 if ($item = Categories::get($matches[2])) {
                     return array(Categories::get_permalink($item), $item['title'], $item['introduction']);
                 }
                 return array('', $text, '');
                 // user link
             // user link
             case 'user':
                 if ($item = Users::get($matches[2])) {
                     return array(Users::get_permalink($item), $item['full_name'] ? $item['full_name'] : $item['nick_name']);
                 }
                 return array('', $text, '');
         }
     }
     return array('', $text, '');
 }
开发者ID:rair,项目名称:yacs,代码行数:66,代码来源:links.php


示例12: addDocumentToBinder

    /**
     * Add document to binder
     * @param $docId
     */
    public static function addDocumentToBinder($docId)
    {
        $document = Documents::model()->findByPk($docId);
        if ($document) {
            $year = substr($document->Created, 0, 4);
            Storages::createProjectStorages($document->Project_ID, $year);
            $subsectionId = 0;
            if ($document->Document_Type == Documents::PM) {
                $payment = Payments::model()->findByAttributes(array(
                    'Document_ID' => $docId,
                ));
                $year = substr($payment->Payment_Check_Date, 0, 4);
                $subsectionId = Sections::createLogBinder($document->Project_ID, $document->Document_Type, $year);
            } elseif ($document->Document_Type == Documents::PO) {
                $po = Pos::model()->findByAttributes(array(
                    'Document_ID' => $docId,
                ));
                $year = substr($po->PO_Date, 0, 4);
                $subsectionId = Sections::createLogBinder($document->Project_ID, $document->Document_Type, $year);
                if ($po->PO_Backup_Document_ID != 0) {
                    $bu = LibraryDocs::model()->findByAttributes(array(
                        'Document_ID' => $po->PO_Backup_Document_ID,
                        'Subsection_ID' => $subsectionId,
                    ));
                    if (!$bu) {
                        $libDoc = new LibraryDocs();
                        $libDoc->Document_ID = $po->PO_Backup_Document_ID;
                        $libDoc->Subsection_ID = $subsectionId;
                        $libDoc->Access_Type = Storages::HAS_ACCESS;
                        $libDoc->Sort_Numb = 0;
                        if ($libDoc->validate()) {
                            $libDoc->save();
                        }
                    }
                }
            }

            $libDoc = LibraryDocs::model()->findByAttributes(array(
                'Document_ID' => $docId,
                'Subsection_ID' => $subsectionId,
            ));

            if (!$libDoc) {
                $libDoc = new LibraryDocs();
                $libDoc->Document_ID = $docId;
                $libDoc->Subsection_ID = $subsectionId;
                $libDoc->Access_Type = Storages::HAS_ACCESS;
                $libDoc->Sort_Numb = 0;
                if ($libDoc->validate()) {
                    $libDoc->save();
                }
            }

            LibraryDocs::sortDocumentsInSubsection($subsectionId);
        }
    }
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:60,代码来源:LibraryDocs.php


示例13: elseif

 // flag sections that are dead, or created or updated very recently
 if ($section['expiry_date'] > NULL_DATE && $section['expiry_date'] <= $context['now']) {
     $prefix .= EXPIRED_FLAG;
 } elseif ($section['create_date'] >= $context['fresh']) {
     $suffix .= NEW_FLAG;
 } elseif ($section['edit_date'] >= $context['fresh']) {
     $suffix .= UPDATED_FLAG;
 }
 // info on related comments
 if ($count = Comments::count_for_anchor('section:' . $section['id'], TRUE)) {
     $suffix .= ' (' . $count . ')';
 }
 // details
 $details = array();
 // info on related sections
 if ($count = Sections::count_for_anchor('section:' . $section['id'])) {
     $details[] = sprintf(i18n::ns('%d section', '%d sections', $count), $count);
 }
 // info on related articles
 if ($count = Articles::count_for_anchor('section:' . $section['id'])) {
     $details[] = sprintf(i18n::ns('%d page', '%d pages', $count), $count);
 }
 // info on related files
 if ($count = Files::count_for_anchor('section:' . $section['id'], TRUE)) {
     $details[] = sprintf(i18n::ns('%d file', '%d files', $count), $count);
 }
 // info on related links
 if ($count = Links::count_for_anchor('section:' . $section['id'], TRUE)) {
     $details[] = sprintf(i18n::ns('%d link', '%d links', $count), $count);
 }
 // the parent link
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:select.php


示例14: dirname

require_once dirname(__FILE__) . '/../../../functions/functions.php';
# initialize user object, if not already set
if (!isset($Database)) {
    $Database = new Database_PDO();
}
if (!isset($User)) {
    $User = new User($Database);
}
if (!isset($Admin)) {
    $Admin = new Admin($Database);
}
if (!isset($Tools)) {
    $Tools = new Tools($Database);
}
if (!isset($Sections)) {
    $Sections = new Sections($Database);
}
if (!isset($Subnets)) {
    $Subnets = new Subnets($Database);
}
# verify that user is logged in, to guard against direct access of page and possible exploits
$User->check_user_session();
# Get mask check
#automated $cidrformat = isset($_GET['cidrformat']) ? $_GET['cidrformat'] : "off";
#separate option $rebuildmnr = isset($_GET['rebuildmnr']) ? $_GET['rebuildmnr'] : "off";
# read again the custom fields, if any
if (!isset($custom_fields)) {
    $custom_fields = $Tools->fetch_custom_fields("subnets");
}
# fetch all l2 domains
$vlan_domains = $Admin->fetch_all_objects("vlanDomains", "id");
开发者ID:martinsv,项目名称:phpipam,代码行数:31,代码来源:import-subnets-check.php


示例15: array_merge

            $menu = array_merge($menu, Skin::navigate($home, $prefix, $count, $items_per_page, $page));
            // add a menu at the bottom
            $text .= Skin::build_list($menu, 'menu_bar');
        }
        // make a box
        if ($items) {
            $text .= Skin::build_box('', $items, 'header1', 'sections');
        }
        // associates may list specific sections as well
        if ($page == 1 && Surfer::is_associate()) {
            // load the layout to use
            $layout = Layouts::new_('yahoo', 'section');
            $layout->set_variant(20);
            // show more elements at the site map
            // query the database and layout that stuff
            if ($items = Sections::list_inactive_by_title_for_anchor(NULL, 0, 50, $layout)) {
                // we have an array to format
                if (is_array($items)) {
                    $items = Skin::build_list($items, '2-columns');
                }
                // displayed as another page section
                $text .= Skin::build_box(i18n::s('Other sections'), $items, 'header1', 'other_sections');
            }
        }
        // cache this to speed subsequent queries
        Cache::put($cache_id, $text, 'sections');
    }
    $context['text'] .= $text;
}
// the suffix hook for the site map page
if (is_callable(array('Hooks', 'include_scripts'))) {
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:index.php


示例16: check_permission

 /**
  * Checks permission for specified subnet
  *
  *	we provide user details and subnetId
  *
  * @access public
  * @param object $user
  * @param int $subnetid
  * @return void
  */
 public function check_permission($user, $subnetId)
 {
     # get all user groups
     $groups = json_decode($user->groups, true);
     # if user is admin then return 3, otherwise check
     if ($user->role == "Administrator") {
         return 3;
     }
     # set subnet permissions
     $subnet = $this->fetch_subnet("id", $subnetId);
     if ($subnet === false) {
         return 0;
     }
     //null?
     if (is_null($subnet->permissions) || $subnet->permissions == "null") {
         return 0;
     }
     $subnetP = json_decode(@$subnet->permissions);
     # set section permissions
     $Section = new Sections($this->Database);
     $section = $Section->fetch_section("id", $subnet->sectionId);
     $sectionP = json_decode($section->permissions);
     # default permission
     $out = 0;
     # for each group check permissions, save highest to $out
     if (sizeof($sectionP) > 0) {
         foreach ($sectionP as $sk => $sp) {
             # check each group if user is in it and if so check for permissions for that group
             if (is_array($groups)) {
                 foreach ($groups as $uk => $up) {
                     if ($uk == $sk) {
                         if ($sp > $out) {
                             $out = $sp;
                         }
                     }
                 }
             }
         }
     } else {
         return 0;
     }
     # if section permission == 0 then return 0
     if ($out == 0) {
         return 0;
     } else {
         $out = 0;
         # ok, user has section access, check also for any higher access from subnet
         if (sizeof($subnetP) > 0) {
             foreach ($subnetP as $sk => $sp) {
                 # check each group if user is in it and if so check for permissions for that group
                 foreach ($groups as $uk => $up) {
                     if ($uk == $sk) {
                         if ($sp > $out) {
                             $out = $sp;
                         }
                     }
                 }
             }
         }
     }
     # return result
     return $out;
 }
开发者ID:seisen,项目名称:phpipam,代码行数:73,代码来源:class.Subnets.php


示例17: dirname

<?php

/*
 * Script to print some stats on home page....
 *********************************************/
# required functions if requested via AJAX
if (!is_object(@$User)) {
    require dirname(__FILE__) . '/../../../functions/functions.php';
    # classes
    $Database = new Database_PDO();
    $User = new User($Database);
    $Tools = new Tools($Database);
    $Subnets = new Subnets($Database);
    $Sections = new Sections($Database);
    $Log = new Logging($Database);
    $Result = new Result();
}
# user must be authenticated
$User->check_user_session();
# if direct request that redirect to tools page
if ($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") {
    header("Location: " . create_link("tools", "changelog"));
}
# changelog to syslog
if ($User->settings->log != "syslog") {
    /* get logs */
    $clogs = $Log->fetch_all_changelogs(false, "", 50);
}
# syslog
if ($User->settings->log == "syslog") {
    $Result->show("warning", _("Changelog files are sent to syslog"), false);
开发者ID:routenull0,项目名称:phpipam,代码行数:31,代码来源:changelog.php


示例18: layout

 /**
  * list sections
  *
  * @param resource the SQL result
  * @return string the rendered text
  *
  * @see layouts/layout.php
  **/
 function layout($result)
 {
     global $context;
     // we return some text
     $text = '';
     // empty list
     if (!($delta = SQL::count($result))) {
         return $text;
     }
     // process all items in the list
     $count = 0;
     $items = array();
     while ($item = SQL::fetch($result)) {
         // the url to view this item
         $url = Sections::get_permalink($item);
         // initialize variables
         $prefix = $label = $suffix = '';
         // flag sections that are draft or dead
         if ($item['activation_date'] >= $context['now']) {
             $prefix .= DRAFT_FLAG;
         } elseif ($item['expiry_date'] > NULL_DATE && $item['expiry_date'] <= $context['now']) {
             $prefix .= EXPIRED_FLAG;
         }
         // signal restricted and private sections
         if ($item['active'] == 'N') {
             $prefix .= PRIVATE_FLAG;
         } elseif ($item['active'] == 'R') {
             $prefix .= RESTRICTED_FLAG;
         }
         // flag items updated recently
         if ($item['create_date'] >= $context['fresh']) {
             $suffix .= NEW_FLAG;
         } elseif ($item['edit_date'] >= $context['fresh']) {
             $suffix .= UPDATED_FLAG;
         }
         //			// start the label with family, if any
         //			if($item['family'])
         //				$label = ucfirst(Skin::strip($item['family'], 30)).' - ';
         // use the title to label the link
         $label .= ucfirst(Skin::strip($item['title'], 30));
         // the hovering title
         if ($item['introduction'] && $context['skins_with_details'] == 'Y') {
             $hover = strip_tags(Codes::beautify_introduction($item['introduction']));
         } else {
             $hover = i18n::s('View the section');
         }
         // help members to reference this page
         if (Surfer::is_member()) {
             $hover .= ' [section=' . $item['id'] . ']';
         }
         // list all components for this item
         $items[$url] = array($prefix, $label, $suffix, 'basic', NULL, $hover);
         // limit to one page of results
         if (++$count >= COMPACT_LIST_SIZE - 1) {
             break;
         }
     }
     // end of processing
     SQL::free($result);
     // turn this to some text
     $text .= Skin::build_list($items, 'comma');
     // some indications on the number of connections
     if (($delta -= $count) > 0) {
         $text .= ', ...';
     }
     return $text;
 }
开发者ID:rair,项目名称:yacs,代码行数:75,代码来源:layout_sections_as_comma.php


示例19: dirname

<?php

/**
 *	Export search results
 ****************************/
# include required scripts
require dirname(__FILE__) . '/../../../functions/functions.php';
require dirname(__FILE__) . '/../../../functions/PEAR/Spreadsheet/Excel/Writer.php';
# initialize required objects
$Database = new Database_PDO();
$Result = new Result();
$User = new User($Database);
$Subnets = new Subnets($Database);
$Sections = new Sections($Database);
$Tools = new Tools($Database);
$Addresses = new Addresses($Database);
# verify that user is logged in
$User->check_user_session();
# fetch search term
$search_term = $_REQUEST['search_term'];
//initialize Pear IPv6 object
require_once dirname(__FILE__) . '/../../../functions/PEAR/Net/IPv6.php';
$Net_IPv6 = new Net_IPv6();
// ipv6 ?
if ($Net_IPv6->checkIPv6($search_term) != false) {
    $type = "IPv6";
} elseif (strlen($search_term) == 17 && substr_count($search_term, ":") == 5) {
    $type = "mac";
    //count : -> must be 5
} else {
    if (strlen($search_term) == 12 && substr_count($search_term, ":") == 0 && substr_count($search_term, ".") == 0) {
开发者ID:martinsv,项目名称:phpipam,代码行数:31,代码来源:search-results-export.php


示例20: session_start

<?php

session_start();
include '../class/config.php';
include '../class/class_sections.php';
$section = new Sections();
if (!isset($_SESSION['username'])) {
    header("Location: login.php");
}
//echo $_SESSION['admin_login'];
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $name = mysql_escape_string($_POST['name']);
    $course_id = mysql_escape_string($_POST['course_id']);
    $section->name = $name;
    $section->course_id = $course_id;
    $section->sectionAdd();
}
?>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>E-Blast</title>
开发者ID:honeynatividad,项目名称:onlinegrade,代码行数:30,代码来源:add.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Secure_area类代码示例发布时间:2022-05-23
下一篇:
PHP SectionManager类代码示例发布时间: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