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


PHP Dropdown::display方法代码示例

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


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

示例1: displayHTMLForm

    /**
     * sp_LinkChecker::displayHTMLForm() - display link checker form depending on type
     *
     * @param string $lstrType
     * @return void
     */
    public function displayHTMLForm($lstrType = "")
    {
        if ($lstrType == "") {
            return;
        }
        global $AssetPath;
        if (isset($_GET['wintype']) && $_GET['wintype'] == 'pop') {
            ?>
			<div id="maincontent">
			<?php 
        }
        ?>

		<div class="pure-g">
  			<div class="pure-u-2-3">

  			    <div class="pluslet">
			      <div class="titlebar">
			        <div class="titlebar_text"><?php 
        print _("Link Checker");
        ?>
</div>
			        <div class="titlebar_options"></div>
			      </div>
			      <div class="pluslet_body">
		<?php 
        if ($lstrType == 'record') {
            ?>
			<span class="record_label"><?php 
            print _("Records");
            ?>
: (<em style="font-style: italic; font-size: smaller;"><?php 
            echo _("This may take a while. Be patient.");
            ?>
</em>)</span><br />
				<form method="post">
					<input type="submit" class="button" name="LinkCheckRecords" value="<?php 
            print _("Check Links In Records");
            ?>
" />
			<?php 
        }
        if ($lstrType == 'subject') {
            ?>
			<span class="record_label"><?php 
            print _("Select Guide");
            ?>
:</span><br />
				<form method="post">
			<?php 
            if ($_SESSION['admin'] == 1) {
                $from = 'subject';
                $where = '';
            } else {
                $from = 'subject, staff_subject';
                $where = "WHERE subject.subject_id = staff_subject.subject_id " . "AND staff_subject.staff_id = {$_SESSION['staff_id']}";
            }
            $guide_select = "SELECT subject, subject.subject_id FROM {$from} {$where} ORDER BY subject ASC";
            $db = new Querier();
            $guide_result = $db->query($guide_select);
            $guide_list = array();
            foreach ($guide_result as $guide_data) {
                $guide_list[] = array($guide_data['subject_id'], $guide_data['subject']);
            }
            $lintCurrentSubjectID = isset($_REQUEST['subject_id']) ? $_REQUEST['subject_id'] : '';
            $lobjDropDown = new Dropdown('subject_id', $guide_list, $lintCurrentSubjectID, "50");
            echo $lobjDropDown->display();
            ?>
					
					<input type="submit" class="button pure-button pure-button-primary" value="<?php 
            print _("Check Links In Guide");
            ?>
" />
			<?php 
        }
        ?>
				</form>
      </div>
    </div>
  </div>


  <div class="pure-u-1-3">
    <div class="pluslet">
      <div class="titlebar">
        <div class="titlebar_text"><?php 
        print _("Legend");
        ?>
</div>
        <div class="titlebar_options"></div>
      </div>
      <div class="pluslet_body">
				<i class="fa fa-check" title="<?php 
        print _("Image: OK");
//.........这里部分代码省略.........
开发者ID:johnwinsor,项目名称:SubjectsPlus,代码行数:101,代码来源:LinkChecker.php

示例2: outputForm

 public function outputForm($wintype = "")
 {
     global $wysiwyg_desc;
     global $CKPath;
     global $CKBasePath;
     global $IconPath;
     global $all_ptags;
     global $tel_prefix;
     global $omit_user_columns;
     global $require_user_columns;
     global $use_shibboleth;
     ///////////////
     // Departments
     ///////////////
     $querierDept = new Querier();
     $qDept = "select department_id, name from department order by name";
     $deptArray = $querierDept->query($qDept);
     // create department dropdown
     $deptMe = new Dropdown("department_id[]", $deptArray, $this->_department_id, "", "", "", "multi");
     $this->_departments = $deptMe->display();
     ///////////////
     // User Types
     ///////////////
     $querierUserType = new Querier();
     $qUserType = "select user_type_id, user_type from user_type order by user_type_id";
     $userTypeArray = $querierUserType->query($qUserType);
     // create type dropdown
     $typeMe = new Dropdown("user_type_id", $userTypeArray, $this->_user_type_id);
     $this->_user_types = $typeMe->display();
     ///////////////
     // Supervisor
     ///////////////
     $querierSupervisor = new Querier();
     $qSupervisor = "select staff_id, CONCAT( fname, ' ', lname ) AS fullname FROM staff WHERE ptags LIKE '%supervisor%' AND active = '1' ORDER BY lname";
     $supervisorArray = $querierSupervisor->query($qSupervisor);
     // create type dropdown
     $superviseMe = new Dropdown("supervisor_id", $supervisorArray, $this->_supervisor_id, '', '* External Supervisor');
     $this->_supervisors = $superviseMe->display();
     ///////////////
     // Active User?
     ///////////////
     $activeArray = array('0' => array('0', 'No'), '1' => array('1', 'Yes'));
     // create type dropdown
     $activateMe = new Dropdown("active", $activeArray, $this->_active);
     $this->_active_or_not = $activateMe->display();
     //////////////
     // Telephone setup
     /////////////
     if ($tel_prefix != "") {
         $tel_line = "<input type=\"text\" readonly=\"readonly\" size=\"4\" value=\"{$tel_prefix}\" name=\"unedit_tel_prefix\" /><input type=\"text\" name=\"tel\" id=\"tel\" size=\"10\" class=\"";
         if (in_array(_('tel'), $require_user_columns)) {
             $tel_line .= 'required_field';
         }
         $tel_line .= "\" value=\"" . $this->_tel . "\" />";
     } else {
         $tel_line = "<input type=\"text\" name=\"tel\" id=\"tel\" size=\"15\" class=\"";
         if (in_array(_('tel'), $require_user_columns)) {
             $tel_line .= 'required_field';
         }
         $tel_line .= "\" value=\"" . $this->_tel . "\" />";
     }
     //////////////////
     // Photo
     ////////////
     $headshot = self::getHeadshot($this->_email, "medium");
     if ($this->_staff_id != "") {
         $headshot .= "<div class=\"setStaffPhotoWarning\">" . _("Note: Save changes before updating photo!") . "</div><div><p>&nbsp;&nbsp;<a href=\"../includes/set_picture.php?staff_id={$this->_staff_id}\" id=\"load_photo\">" . _("Click to update photo") . "</a></p></div>";
     } else {
         $headshot .= "<div class=\"setStaffPhotoWarning\"><p>" . _("You can change the photo after saving.") . "</p></div>";
     }
     //////////////////
     // Social Media //
     //////////////////
     //$socialMedia  = self::outputSocialMediaForm();
     /////////////
     // Start the form
     /////////////
     $action = htmlentities($_SERVER['PHP_SELF']) . "?staff_id=" . $this->_staff_id;
     if ($wintype != "") {
         $action .= "&wintype=pop";
     }
     // set up
     print "<div class=\"pure-g\">";
     //see which"Staff Member" columns and whether "Personal Information" section or "Emergency Contact" section are omitted
     // added by dgonzalez
     $isFnameOmitted = in_array(_("fname"), $omit_user_columns);
     $isLnameOmitted = in_array(_("lname"), $omit_user_columns);
     $isTitleOmitted = in_array(_("title"), $omit_user_columns);
     $isPositionNumOmitted = in_array(_("position_number"), $omit_user_columns);
     $isClassificationOmitted = in_array(_("classification"), $omit_user_columns);
     $isDepartmentOmitted = in_array(_("department"), $omit_user_columns);
     $isPriorityOmitted = in_array(_("priority"), $omit_user_columns);
     $isSupervisorOmitted = in_array(_("supervisor"), $omit_user_columns);
     $isTelephoneOmitted = in_array(_("tel"), $omit_user_columns);
     $isdFaxOmitted = in_array(_("fax"), $omit_user_columns);
     $isIntercomOmitted = in_array(_("intercom"), $omit_user_columns);
     $isUserTypeOmitted = in_array(_("user_type"), $omit_user_columns);
     $isRoomNumOmitted = in_array(_("room_number"), $omit_user_columns);
     $isPersonalOmitted = in_array(_("personal_information"), $omit_user_columns);
     $isEmergencyContactOmitted = in_array(_("emergency_contact"), $omit_user_columns);
//.........这里部分代码省略.........
开发者ID:johnwinsor,项目名称:SubjectsPlus,代码行数:101,代码来源:Staff.php

示例3: outputForm

 public function outputForm($wintype = "")
 {
     global $wysiwyg_desc;
     global $CKPath;
     global $CKBasePath;
     global $IconPath;
     global $guide_types;
     global $all_tbtags;
     global $all_cattags;
     //print "<pre>";print_r($this->_staffers); print "</pre>";
     $action = htmlentities($_SERVER['PHP_SELF']) . "?talkback_id=" . $this->_talkback_id;
     if ($wintype != "") {
         $action .= "&wintype=pop";
     }
     $tb_title_line = _("Edit TalkBack");
     echo "\n<form action=\"" . $action . "\" method=\"post\" id=\"new_record\" class=\"pure-form pure-form-stacked\" accept-charset=\"UTF-8\">\n<input type=\"hidden\" name=\"talkback_id\" value=\"" . $this->_talkback_id . "\" />\n<div class=\"pure-g\">\n  <div class=\"pure-u-2-3\">\n    <div class=\"pluslet\">\n      <div class=\"titlebar\">\n        <div class=\"titlebar_text\">{$tb_title_line}</div>\n        <div class=\"titlebar_options\"></div>\n      </div>\n      <div class=\"pluslet_body\">\n\n<label for=\"question\">" . _("Question") . "</label>\n<textarea name=\"question\" rows=\"4\" cols=\"50\" class=\"required_field\">" . stripslashes($this->_question) . "</textarea>\n\n<label for=\"a_from\">" . _("Question By") . "</label>\n<input type=\"text\" name=\"q_from\" size=\"20\" class=\"required_field\" value=\"" . $this->_q_from . "\">\n\n<label for=\"answer\">" . _("Answer") . "</label>";
     if ($wysiwyg_desc == 1) {
         include $CKPath;
         global $BaseURL;
         $oCKeditor = new CKEditor($CKBasePath);
         $oCKeditor->timestamp = time();
         $config['toolbar'] = 'SubsPlus_Narrow';
         // Default shows a much larger set of toolbar options
         $config['height'] = '200';
         $config['filebrowserUploadUrl'] = $BaseURL . "ckeditor/php/uploader.php";
         echo $oCKeditor->editor('answer', $this->_answer, $config);
         echo "<br />";
     } else {
         echo "<textarea name=\"answer\" rows=\"3\" cols=\"70\">" . stripslashes($this->_answer) . "</textarea>";
     }
     /////////////////////
     // Answer By
     /////////////////////
     $qStaff = "select staff_id, CONCAT(fname, ' ', lname) as fullname FROM staff WHERE ptags LIKE '%talkback%' ORDER BY lname, fname";
     $querierStaff = new Querier();
     $staffArray = $querierStaff->query($qStaff);
     // put in a default user
     if ($this->_a_from == "") {
         $selected_user = $_SESSION["staff_id"];
     } else {
         $selected_user = $this->_a_from;
     }
     $staffMe = new Dropdown("a_from", $staffArray, $selected_user, "50", "--Select--");
     $staff_string = $staffMe->display();
     $answerer = "<label=\"record_label\"></label>\n            {$staff_string}\n        ";
     /////////////////////
     // Is Live
     ////////////////////
     $is_live = "<label=\"display\"></label>\n<input name=\"display\" type=\"radio\" value=\"1\"";
     if ($this->_display == 1) {
         $is_live .= " checked=\"checked\"";
     }
     $is_live .= " /> " . _("Yes") . " &nbsp;&nbsp;&nbsp; <input name=\"display\" type=\"radio\" value=\"0\"";
     if ($this->_display == 0) {
         $is_live .= " checked=\"checked\"";
     }
     $is_live .= " /> " . _("No") . "\n<br class=\"clear-both\" /><br />";
     /////////////////////
     // tbtags
     ////////////////////
     $tb_tags = "<input type=\"hidden\" name=\"tbtags\" value=\"" . $this->_tbtags . "\" />\n\t\t\t<label=\"record_label\"></label>";
     $current_tbtags = explode("|", $this->_tbtags);
     $tag_count = 0;
     // added because if you have a lot of ctags, it just stretches the div forever
     foreach ($all_tbtags as $key => $value) {
         if ($tag_count == 3) {
             $tb_tags .= "<br />";
             $tag_count = 0;
         }
         if (in_array($key, $current_tbtags)) {
             $tb_tags .= "<span class=\"ctag-on\">{$key}</span>";
         } else {
             $tb_tags .= "<span class=\"ctag-off\">{$key}</span>";
         }
         $tag_count++;
     }
     /////////////////////
     // cattags
     ////////////////////
     $cat_tags = "<input type=\"hidden\" class=\"cattag-data\" name=\"cattags\" value=\"" . $this->_cattags . "\" />\n\t\t\t<label=\"record_label\"></label>";
     $current_cattags = explode("|", $this->_cattags);
     $tag_count = 0;
     // added because if you have a lot of ctags, it just stretches the div forever
     foreach ($all_cattags as $key => $value) {
         if ($tag_count == 3) {
             $cat_tags .= "<br />";
             $tag_count = 0;
         }
         if (in_array($value, $current_cattags)) {
             $cat_tags .= "<span class=\"ctag-on\">{$value}</span>";
         } else {
             $cat_tags .= "<span class=\"ctag-off\">{$value}</span>";
         }
         $tag_count++;
     }
     echo "\n\n</div>\n</div>\n</div>\n<!-- right hand column -->";
     $last_mod = _("Last modified: ") . lastModded("talkback", $this->_talkback_id);
     $title_save_box = "<div id=\"last_edited\">{$last_mod}</div>";
     echo "<div class=\"pure-u-1-3\">\n    <div class=\"pluslet\">\n      <div class=\"titlebar\">\n        <div class=\"titlebar_text\">{$title_save_box}</div>\n        <div class=\"titlebar_options\"></div>\n      </div>\n      <div class=\"pluslet_body\">\n    <input type=\"submit\" name=\"submit_record\" class=\"button pure-button pure-button-primary\" value=\"" . _("Save Now") . "\" />";
     // if a) it's not a new record, and  b) we're an admin or c) we are listed as a librarian for this guide, show delete button
//.........这里部分代码省略.........
开发者ID:johnwinsor,项目名称:SubjectsPlus,代码行数:101,代码来源:Talkback.php

示例4: outputForm

 public function outputForm($wintype = "")
 {
     global $wysiwyg_desc;
     global $CKPath;
     global $CKBasePath;
     global $IconPath;
     global $all_ptags;
     global $tel_prefix;
     ///////////////
     // Departments
     ///////////////
     $querierDept = new Querier();
     $qDept = "select department_id, name from department order by name";
     $deptArray = $querierDept->query($qDept);
     // create department dropdown
     $deptMe = new Dropdown("department_id", $deptArray, $this->_department_id);
     $this->_departments = $deptMe->display();
     ///////////////
     // User Types
     ///////////////
     $querierUserType = new Querier();
     $qUserType = "select user_type_id, user_type from user_type order by user_type_id";
     $userTypeArray = $querierUserType->query($qUserType);
     // create type dropdown
     $typeMe = new Dropdown("user_type_id", $userTypeArray, $this->_user_type_id);
     $this->_user_types = $typeMe->display();
     ///////////////
     // Active User?
     ///////////////
     $activeArray = array('0' => array('0', 'No'), '1' => array('1', 'Yes'));
     // create type dropdown
     $activateMe = new Dropdown("active", $activeArray, $this->_active);
     $this->_active_or_not = $activateMe->display();
     //////////////
     // Telephone setup
     /////////////
     if ($tel_prefix != "") {
         $tel_line = "<input type=\"text\" readonly=\"readonly\" size=\"8\" value=\"{$tel_prefix}\" name=\"unedit_tel_prefix\" /><input type=\"text\" name=\"tel\" id=\"tel\" size=\"5\" class=\"required_field\" value=\"" . $this->_tel . "\" />";
     } else {
         $tel_line = "<input type=\"text\" name=\"tel\" id=\"tel\" size=\"10\" class=\"required_field\" value=\"" . $this->_tel . "\" />";
     }
     //////////////////
     // Photo
     ////////////
     $headshot = self::getHeadshot($this->_email, "medium");
     if ($this->_staff_id != "") {
         $headshot .= "<p><a href=\"../includes/set_picture.php?staff_id={$this->_staff_id}\" id=\"load_photo\">" . _("Click to update photo") . "</a></p>";
     } else {
         $headshot .= "<p>" . _("You can change the photo after saving.") . "</p>";
     }
     /////////////
     // Start the form
     /////////////
     $action = htmlentities($_SERVER['PHP_SELF']) . "?staff_id=" . $this->_staff_id;
     if ($wintype != "") {
         $action .= "&wintype=pop";
     }
     echo "\n<form action=\"" . $action . "\" method=\"post\" id=\"new_record\" accept-charset=\"UTF-8\">\n<input type=\"hidden\" name=\"staff_id\" value=\"" . $this->_staff_id . "\" />\n<div style=\"float: left; margin-right: 20px;\">\n<div class=\"box\">\n        <h2 class=\"bw_head\">" . _("Staff Member") . "</h2>\n\n<div class=\"float-left\">\n<span class=\"record_label\">" . _("First Name ") . "</span><br />\n<input type=\"text\" name=\"fname\" id=\"fname\" size=\"30\" class=\"required_field\" value=\"" . $this->_fname . "\" />\n</div>\n<div class=\"float-left\">\n<span class=\"record_label\">" . _("Last Name ") . "</span><br />\n<input type=\"text\" name=\"lname\" id=\"lname\" size=\"30\" class=\"required_field\" value=\"" . $this->_lname . "\" />\n</div>\n<br class=\"clear-both\"/><br />\n<span class=\"record_label\">" . _("Title") . "</span><br />\n<input type=\"text\" name=\"title\" id=\"title\" size=\"50\" class=\"required_field\" value=\"" . $this->_title . "\" />\n<br /><br />\n<div class=\"float-left\">\n<span class=\"record_label\">" . _("Department") . "</span><br />\n{$this->_departments}\n</div>\n<div style=\"float: left;margin-left: 10px;\">\n<span class=\"record_label\">" . _("Show First in Dept List?") . "</span><br />\n<input type=\"text\" name=\"staff_sort\" id=\"staff_sort\" size=\"2\" class=\"required_field\" value=\"" . $this->_staff_sort . "\" />\n</div>\n<br class=\"clear-both\" /><br />\n<span class=\"record_label\">" . _("Telephone") . "</span><br />\n{$tel_line}\n<br /><br />\n<span class=\"record_label\">" . _("Email (This is the username for logging in to SubjectsPlus)") . "</span><br />\n<input type=\"text\" name=\"email\" id=\"email\" size=\"40\" class=\"required_field\" value=\"" . $this->_email . "\" />\n<br /><br />\n<div class=\"float-left\">\n<span class=\"record_label\">" . _("User Type") . "</span><br />\n{$this->_user_types}\n</div>\n<div style=\"float: left;margin-left: 20px;\">\n<span class=\"record_label\">" . _("Active User?") . "</span><br />\n{$this->_active_or_not}\n</div>\n<br /><br />\n</div>\n        <div class=\"box no_overflow\">\n<h2 class=\"bw_head\">" . _("Photo") . "</h2>\n\n{$headshot}\n</div>\n        <div class=\"box no_overflow\">\n<h2 class=\"bw_head\">" . _("Biographical Details") . "</h2>\n\n<p>" . _("Please only include professional details.") . "</p><br />";
     self::outputBioForm();
     echo "\n<br />\n</div>\n</div>\n<!-- right hand column -->\n<div style=\"float: left; max-width: 400px;\">\n        <div class=\"box\">\n<h2 class=\"bw_head\">" . _("Permissions") . "</h2>\n\n";
     // Get our permission tags, or ptags
     $current_ptags = explode("|", $this->_ptags);
     foreach ($all_ptags as $value) {
         if (in_array($value, $current_ptags)) {
             echo "<span class=\"ctag-on\">{$value}</span>";
         } else {
             echo " <span class=\"ctag-off\">{$value}</span>";
         }
     }
     echo "<input type=\"hidden\" name=\"ptags\" value=\"{$this->_ptags}\" /><br class=\"clear-both\" /><p style=\"font-size: smaller\">Select which parts of SubjectsPlus this user may access.\n                <br /><strong>records</strong> allows access to both the Record and Guide tabs.\n                <br /><strong>eresource_mgr</strong> allows the user to see all the information about a Record (and delete it), and quickly see all guides.\n                <br /><strong>admin</strong> allows access to the overall admin of the site.\n                <br /><strong>NOFUN</strong> means user can't modify other peoples' guides, or view records</p>\n</div>\n        \t<div class=\"box\">\n\t<h2 class=\"bw_head\">" . _("Password") . "</h2>";
     if ($this->_staff_id != "") {
         echo "<p  ><a href=\"../includes/set_password.php?staff_id=" . $this->_staff_id . "\" id=\"reset_password\">" . _("The password is hidden.  Reset?") . "</a></p>";
     } else {
         echo "<input type=\"password\" name=\"password\" size=\"20\" class=\"required_field\" /><br />\n\t\t<p style=\"font-size: smaller\">The password is stored as a hash in the database, but unless you have SSL travels clear text across the internet.</p>";
     }
     echo "\n\t</div>\n        <div id=\"record_buttons\" class=\"box\">\n\t<h2 class=\"bw_head\">" . _("Save") . "</h2>\n\t\n\t\t<input type=\"submit\" name=\"submit_record\" class=\"button save_button\" value=\"" . _("Save Record Now") . "\" />";
     // if it's not a new record, and we're authorized, show delete button
     if ($this->_staff_id != "") {
         echo "<input type=\"submit\" name=\"delete_record\" class=\"delete_button\" value=\"" . _("Delete Forever!") . "\" />";
     }
     // get edit history
     $last_mod = _("Last modified: ") . lastModded("staff", $this->_staff_id);
     echo "<div id=\"last_edited\">{$last_mod}</div>\n\n</div>\n</form>";
 }
开发者ID:kenirwin,项目名称:SubjectsPlus,代码行数:84,代码来源:StaffBrief.php

示例5: outputForm

 public function outputForm($wintype = "")
 {
     global $wysiwyg_desc;
     global $CKPath;
     global $CKBasePath;
     global $IconPath;
     global $AssetPath;
     global $guide_types;
     global $video_storage_types;
     global $all_vtags;
     //print "<pre>";print_r($this->_staffers); print "</pre>";
     $action = htmlentities($_SERVER['PHP_SELF']) . "?video_id=" . $this->_video_id;
     if ($wintype != "") {
         $action .= "&wintype=pop";
     }
     $vid_title_line = _("Edit Video Info");
     echo "\n<form action=\"" . $action . "\" method=\"post\" id=\"new_record\" accept-charset=\"UTF-8\">\n<input type=\"hidden\" name=\"video_id\" value=\"" . $this->_video_id . "\" />\n<div style=\"float: left; margin-right: 20px;\">\n      <div class=\"box\">\n<h2 class=\"bw_head\">{$vid_title_line}</h2>\n\n<span class=\"record_label\">" . _("title") . "</span><br />\n<textarea name=\"title\" rows=\"2\" cols=\"50\">" . stripslashes($this->_title) . "</textarea>\n<br /><br />\n<span class=\"record_label\">" . _("description") . "</span><br />";
     if ($wysiwyg_desc == 1) {
         include $CKPath;
         global $BaseURL;
         $oCKeditor = new CKEditor($CKBasePath);
         $oCKeditor->timestamp = time();
         $config['toolbar'] = 'Basic';
         // Default shows a much larger set of toolbar options
         $config['height'] = '100';
         $config['filebrowserUploadUrl'] = $BaseURL . "ckeditor/php/uploader.php";
         echo $oCKeditor->editor('description', $this->_description, $config);
         echo "<br />";
     } else {
         echo "<textarea name=\"description\" rows=\"4\" cols=\"70\">" . stripslashes($this->_description) . "</textarea>";
     }
     // Generate our dropdown
     $guideMe = new Dropdown("source", $video_storage_types, $this->_source, "50");
     $guide_string = $guideMe->display();
     echo "<br /><br />\n<span class=\"record_label\">" . _("video file storage location") . "</span><br />\n{$guide_string}\n  <br /><br />\n<span class=\"record_label\">" . _("foreign ID") . "</span><br />\n<input name=\"foreign_id\" value=\"" . stripslashes($this->_foreign_id) . "\" size=\"15\" />\n  <br />\n  <span class=\"smaller\">* " . "Enter the embed code id for youtube or vimeo" . "</span><br /><br />\n  <span class=\"record_label\">" . _("duration in seconds") . "</span><br />\n<input name=\"duration\" value=\"" . stripslashes($this->_duration) . "\" size=\"5\" />\n  <br /><br />";
     /////////////////////
     // Tags
     ////////////////////
     echo "<input type=\"hidden\" name=\"vtags\" value=\"" . $this->_vtags . "\" />\n\t\t\t<span class=\"record_label\">vtags: </span> ";
     $current_vtags = explode("|", $this->_vtags);
     $tag_count = 0;
     // added because if you have a lot of ctags, it just stretches the div forever
     $vid_tags = "";
     foreach ($all_vtags as $value) {
         if ($tag_count == 5) {
             $vid_tags .= "<br />";
             $tag_count = 0;
         }
         if (in_array($value, $current_vtags)) {
             $vid_tags .= "<span class=\"ctag-on\">{$value}</span>";
         } else {
             $vid_tags .= "<span class=\"ctag-off\">{$value}</span>";
         }
         $tag_count++;
     }
     print $vid_tags;
     /////////////////////
     // Is Live
     ////////////////////
     $is_live = "<span class=\"record_label\">" . _("Live?") . "</span><br />\n<input name=\"display\" type=\"radio\" value=\"1\"";
     if ($this->_display == 1) {
         $is_live .= " checked=\"checked\"";
     }
     $is_live .= " /> " . _("Yes") . " &nbsp;&nbsp;&nbsp; <input name=\"display\" type=\"radio\" value=\"0\"";
     if ($this->_display == 0) {
         $is_live .= " checked=\"checked\"";
     }
     $is_live .= " /> " . _("No") . "\n<br class=\"clear-both\" /><br />";
     /////////////////////
     // Thumbnail
     ////////////////////
     $this->_vid_loc = $AssetPath . "images/video_thumbs/" . $this->_video_id . "_medium.jpg";
     $thumbnail = "<img src=\"" . $this->_vid_loc . "\" alt=\"" . _("Thumbnail") . "\" />";
     if ($this->_video_id != "") {
         $thumbnail .= "<p><a href=\"../includes/set_image.php?video_id={$this->_video_id}\" id=\"load_photo\">" . _("Click to update thumbnail") . "</a></p>";
     } else {
         $thumbnail .= "<p>" . _("You can change the thumbnail after saving.") . "</p>";
     }
     echo "\n\n</div>\n      <div class=\"box no_overflow\">\n<h2 class=\"bw_head\">" . _("Thumbnail (Medium)") . "</h2>\n\n{$thumbnail}\n</div>\n</div>\n<!-- right hand column -->\n<div style=\"float: left;min-width: 50px;\">\n\t<div id=\"record_buttons\" class=\"box\">\n\t\t<input type=\"submit\" name=\"submit_record\" class=\"button save_button\" value=\"" . _("Save Now") . "\">";
     // if a) it's not a new record, and  b) we're an admin or c) we are listed as a librarian for this guide, show delete button
     if ($this->_video_id != "") {
         if ($_SESSION["admin"] == "1" || $_SESSION["eresource_mgr"] == "1") {
             echo "<input type=\"submit\" name=\"delete_record\" class=\"delete_button\" value=\"" . _("Delete Forever!") . "\">";
         }
         // get edit history
         $last_mod = _("Last modified: ") . lastModded("video", $this->_video_id);
         echo "<div id=\"last_edited\">{$last_mod}</div>\n";
     }
     echo "</div>\n            <div class=\"box\">\n            <span class=\"record_label\">" . _("create date") . "</span><br />\n            <input type=\"text\" name=\"date\" value=\"" . $this->_date . "\" /> <br />\n            <span class=\"smaller\">" . "YYYY-MM-DD" . "</span>\n            <br /><br />\n            {$is_live}\n            </div>\n            </form>";
 }
开发者ID:kenirwin,项目名称:SubjectsPlus,代码行数:90,代码来源:Video.php

示例6: outputMetadataForm

    public function outputMetadataForm($wintype = "")
    {
        global $wysiwyg_desc;
        global $IconPath;
        global $guide_types;
        global $guide_headers;
        global $use_disciplines;
        //print "<pre>";print_r($this->_staffers); print "</pre>";
        $action = htmlentities($_SERVER['PHP_SELF']) . "?subject_id=" . $this->_subject_id;
        if ($wintype != "") {
            $action .= "&wintype=pop";
        }
        if ($this->_subject_id) {
            $guide_title_line = _("Edit Existing Guide Metadata");
        } else {
            $guide_title_line = _("Create New Guide");
        }
        echo "\n            <form action=\"" . $action . "\" method=\"post\" id=\"new_record\" class=\"pure-form pure-form-stacked\" accept-charset=\"UTF-8\">\n            <input type=\"hidden\" name=\"subject_id\" value=\"" . $this->_subject_id . "\" />\n            <div class=\"pure-g\">\n              <div class=\"pure-u-1-2\">\n                <div class=\"pluslet\">\n                    <div class=\"titlebar\">\n                      <div class=\"titlebar_text\">{$guide_title_line}</div>\n                      <div class=\"titlebar_options\"></div>\n                    </div>\n                <div class=\"pluslet_body\">\n\n            <label for=\"record_title\">" . _("Guide") . "</label>\n            <input type=\"text\" name=\"subject\" id=\"record_title\" class=\"pure-input-1-2 required_field\" value=\"" . $this->_subject . "\">\n\n            <label for=\"record_shortform\">" . _("Short Form") . "</label>\n            <input type=\"text\" name=\"shortform\" id=\"record_shortform\" size=\"20\" class=\"pure-input-1-4 required_field\" value=\"" . $this->_shortform . "\">\n\n            <span class=\"smaller\">* " . _("Short label that shows up in URL--don't use spaces, ampersands, etc.") . "</span>\n\n            <label for=\"type\">" . _("Type of Guide") . "</label>\n            ";
        /////////////////////
        // Guide types dropdown
        /////////////////////
        $guideMe = new Dropdown("type", $guide_types, $this->_type, "50");
        $guide_string = $guideMe->display();
        echo $guide_string;
        echo "<label for=\"header\">" . _("Header Type") . "</label>";
        /////////////////////
        // Header switcher dropdown
        /////////////////////
        $headerMe = new Dropdown("header", $guide_headers, $this->_header, "50");
        $header_string = $headerMe->display();
        echo $header_string;
        echo "<span class=\"smaller\">* " . _("If you're not sure, stick with default") . "</span>";
        /////////////////////
        // Is Live
        ////////////////////
        $is_live = "<label for=\"active\">" . _("Visibility") . "</label>\n    <input name=\"active\" type=\"radio\" value=\"1\"";
        if ($this->_active == 1) {
            $is_live .= " checked=\"checked\"";
        }
        $is_live .= " /> " . _("Public:  Everyone can see") . " <br />\n        <input name=\"active\" type=\"radio\" value=\"0\"";
        if ($this->_active == 0) {
            $is_live .= " checked=\"checked\"";
        }
        $is_live .= " /> " . _("Hidden:  Not listed, but visible if you have the URL") . " <br />\n        <input name=\"active\" type=\"radio\" value=\"2\"";
        if ($this->_active == 2) {
            $is_live .= " checked=\"checked\"";
        }
        $is_live .= " /> " . _("Suppressed:  Must be logged in to SP to view");
        print $is_live;
        /////////
        // Department dropdown
        ////////
        $querier = new Querier();
        $dept_query = "SELECT department_id, name FROM department;";
        $deptArray = $querier->query($dept_query);
        $current_dept = new Querier();
        $current_dept_query = "SELECT DISTINCT subject.subject, subject.subject_id, department.name, department.department_id, subject_department.date\n            FROM subject_department\n            JOIN subject ON subject.subject_id = subject_department.id_subject\n            JOIN department ON department.department_id = subject_department.id_department\n            WHERE subject.subject_id = '{$this->_subject_id}'\n            ORDER BY date DESC\n            LIMIT 1";
        $current_dept_array = $current_dept->query($current_dept_query);
        print "\n        </div>\n        </div>\n        <div class=\"pluslet\">\n        \n                    <div class=\"titlebar\">\n                      <div class=\"titlebar_text\">" . _("Associations/Listings (optional)") . "</div>\n                      <div class=\"titlebar_options\"></div>\n                    </div>\n                <div class=\"pluslet_body\">\n                <span class=\"smaller\"> " . _("<strong>Department</strong> lets you group guides to provide a separate listing for a group of guides, say, Special Collections.  \n                <br /><strong>Parent Guide</strong> allows you to build a hierarchy for display.") . "</span>";
        ?>

            <label for="department"> Department </label>


            <select name="department">

<?php 
        if ($current_dept_array) {
            foreach ($current_dept_array as $dept) {
                echo "<option value='" . $dept["department_id"] . "'>" . $dept["name"] . "</option>";
            }
        } else {
            print "<option value='0'>--none--</option>";
            foreach ($deptArray as $dept) {
                echo "<option value='" . $dept["department_id"] . "'>" . $dept["name"] . "</option>";
            }
        }
        ?>

            </select>
            
        <?php 
        ////////////////////////////
        // Parenthood
        ///////////////////////////
        $parents_list = "";
        if ($this->_parents == FALSE) {
            // No results
            $parents_list = "";
        } else {
            // loop through results
            foreach ($this->_parents as $value) {
                $parents_list .= self::outputParents($value);
            }
        }
        ////////
        // Parent dropdown
        ////////
        $querier = new Querier();
        $subject_query = "SELECT subject_id, subject FROM subject WHERE subject_id != '{$this->_subject_id}'";
//.........这里部分代码省略.........
开发者ID:kenirwin,项目名称:SubjectsPlus,代码行数:101,代码来源:Guide.php

示例7: output

 public function output($action = "", $view = "public")
 {
     // public vs. admin
     parent::establishView($view);
     if ($this->_extra != "") {
         $jobj = json_decode($this->_extra);
         $feed_type = $jobj->{'feed_type'};
         $num_items = $jobj->{'num_items'};
         $show_desc = $jobj->{'show_desc'};
         $show_feed = $jobj->{'show_feed'};
         if ($num_items == "") {
             $num_items = 5;
         }
         // need to pass something along
     } else {
         $feed_type = "";
         $num_items = 5;
         $show_desc = "";
         $show_feed = "";
     }
     if ($action == "edit") {
         global $title_input_size;
         // alter size based on column
         //////////////////////
         // New or Existing?
         //////////////////////
         if ($this->_pluslet_id) {
             $current_id = $this->_pluslet_id;
             $this->_pluslet_id_field = "pluslet-" . $this->_pluslet_id;
             $this->_pluslet_name_field = "";
             $this->_title = "<input type=\"text\" class=\"\" id=\"pluslet-update-title-{$this->_pluslet_id}\" value=\"{$this->_title}\" size=\"{$title_input_size}\" />";
             $this_instance = "pluslet-update-body-{$this->_pluslet_id}";
         } else {
             $new_id = rand(10000, 100000);
             $current_id = $new_id;
             $this->_pluslet_bonus_classes = "unsortable";
             $this->_pluslet_id_field = $new_id;
             $this->_pluslet_name_field = "new-pluslet-Feed";
             $this->_title = "<input type=\"text\" class=\"\" id=\"pluslet-new-title-{$new_id}\" name=\"new_pluslet_title\" value=\"{$this->_title}\" size=\"{$title_input_size}\" />";
             $this_instance = "pluslet-new-body-{$new_id}";
         }
         // some translations . . .
         $vYes = _("Yes");
         $vNo = _("No");
         $vRss1 = _("Display");
         $vRss2 = _("items<br />Show descriptions?");
         // Generate our dropdown
         $dd_name = "feed_type-{$current_id}";
         $dd_array = array("RSS", "Delicious", "Tumblr");
         $typeMe = new Dropdown($dd_name, $dd_array, $feed_type);
         $feed_type_dd = $typeMe->display();
         $this->_body = "<br /><input type=\"text\" name=\"{$this_instance}\" class=\"required_field\" value=\"{$this->_body}\" size=\"{$title_input_size}\" />\n            {$feed_type_dd}\n            <br />\n            " . _("You can enter a URL to an RSS feed or use your username for Delicious or Tumblr.");
         $this->_body .= "\n\n            <p style=\"font-size: 11px;padding-top: 3px;\">\n            {$vRss1} <input type=\"text\" name=\"displaynum-{$current_id}\" value=\"{$num_items}\" size=\"1\" />\n            {$vRss2} <input name=\"showdesc-{$current_id}\" type=\"radio\" value=\"1\"";
         if ($show_desc == 1) {
             $this->_body .= " checked=\"checked\"";
         }
         $this->_body .= "> {$vYes} <input name=\"showdesc-{$current_id}\" type=\"radio\" value=\"0\" ";
         if ($show_desc == 0) {
             $this->_body .= " checked=\"checked\"";
         }
         $this->_body .= " /> {$vNo}<br />\n    Show feed source? <input name=\"showfeed-{$current_id}\" type=\"radio\" value=\"1\"";
         if ($show_feed == 1) {
             $this->_body .= " checked=\"checked\"";
         }
         $this->_body .= "> {$vYes} <input name=\"showfeed-{$current_id}\" type=\"radio\" value=\"0\" ";
         if ($show_feed == 0) {
             $this->_body .= " checked=\"checked\"";
         }
         $this->_body .= " /> {$vNo}</p>\n<div>\n";
         parent::startPluslet();
         print $this->_body;
         parent::finishPluslet();
         return;
     } else {
         // Note we hide the Feed parameters in the name field
         $vRSSLoading = _("Loading ...");
         $feed = trim($this->_body);
         $this->_body = "<p class=\"find_feed\" name=\"{$feed}|{$num_items}|{$show_desc}|{$show_feed}|{$feed_type}\">{$vRSSLoading}</p>";
         // notitle hack
         if (!isset($this->_hide_titlebar)) {
             if (trim($this->_title) == "notitle") {
                 $this->_hide_titlebar = 1;
             } else {
                 $this->_hide_titlebar = 0;
             }
         }
         parent::assemblePluslet($this->_hide_titlebar);
         return $this->_pluslet;
     }
 }
开发者ID:kenirwin,项目名称:SubjectsPlus,代码行数:90,代码来源:Feed.php


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