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


PHP dropbox::add_sql_data方法代码示例

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


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

示例1: users

$dropbox->add_value('3', 'three');
$dropbox->print_dropbox('dropdown', $dropdown);
echo '<br /><br />';
//or direct database link:
//this is how you should load a class:
require_once $GO_CONFIG->class_path . 'users.class.inc';
//create a users object:
$users = new users();
//this function gets all users
$users->get_users();
//we can now pass the users object to the dropdown box and add all the users to it
//declare the user var
$user = isset($user) ? $user : '0';
$dropbox = new dropbox();
//add the users class, use 'id' for value and 'name' for text
$dropbox->add_sql_data('users', 'id', 'name');
//print the dropbox
$dropbox->print_dropbox('user', $user);
echo '<br /><br />';
//statusbar control
$statusbar = new statusbar();
$statusbar->info_text = 'Group-Office usage';
$statusbar->turn_red_point = 90;
$statusbar->print_bar(75, 100);
//how do you get user info
//the current user is stored in:
echo 'Your user ID is "' . $GO_SECURITY->user_id . '"<br />';
$user = $users->get_user($GO_SECURITY->user_id);
echo 'Your name is "' . $user['name'] . '"<br /><br />';
//now for some permission management.
//You can secure an object by giving it an ACL (Access Control List). When the user
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:oldindex.php

示例2: dropbox

     $dropbox = new dropbox();
     $dropbox->add_value('1', 'one');
     $dropbox->add_value('2', 'two');
     $dropbox->add_value('3', 'three');
     $dropbox->print_dropbox('dropdown', $dropdown);
     echo '<br /><br />';
     //or direct database link:
     //this is how you should load a class:
     //this function gets all users
     $GO_USERS->get_users();
     //we can now pass the users object to the dropdown box and add all the users to it
     //declare the user var
     $user = isset($_POST['user']) ? $_POST['user'] : '0';
     $dropbox = new dropbox();
     //add the users class, use 'id' for value and 'name' for text
     $dropbox->add_sql_data('GO_USERS', 'id', 'first_name');
     //print the dropbox
     $dropbox->print_dropbox('user', $user);
     echo '<br /><br />';
     //statusbar control
     $statusbar = new statusbar();
     $statusbar->info_text = 'Group-Office usage';
     $statusbar->turn_red_point = 90;
     $statusbar->print_bar(75, 100);
     break;
 case 'acl_demo':
     //You can secure an object by giving it an ACL (Access Control List). When the user
     //you logged in with was created it also got an ACL. This acl is used to protect your personal profile.
     //We already got the user information in the above example so the user acl = stored in $user['acl_id'].
     //So if we want to set the permissions this can be done really easily with the acl control
     echo '<p>You are visible to:</p>';
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:index.php

示例3: isset

 //echo '<input type="hidden" name="seperator" value="'.$seperator.'">';
 echo '<input type="hidden" name="import_type" value="' . $_POST['import_type'] . '">';
 if (isset($feedback)) {
     echo $feedback;
 }
 echo $contacts_import_feedback . '<br /><br />';
 if ($_POST['import_type'] == 'contacts') {
     echo '<table border="0" cellpadding="2" cellspacing="0">';
     $group_mode = isset($_POST['group_mode']) ? $_POST['group_mode'] : 'group_name';
     if ($ab->get_groups($addressbook_id) > 0) {
         $check = $group_mode == 'group_name' ? 'checked' : '';
         echo '<tr><td><input type="radio" name="group_mode" value="group_name" ' . $check . ' />' . $contacts_import_to_group . ': </td><td>';
         $group_id = isset($_POST['group_id']) ? $_POST['group_id'] : 0;
         $dropbox = new dropbox();
         $dropbox->add_value('0', $contacts_other);
         $dropbox->add_sql_data('ab', 'id', 'name');
         $dropbox->print_dropbox('group_id', $group_id);
         echo '</td></tr>';
         $check = $group_mode == 'file' ? 'checked' : '';
         echo '<tr><td><input type="radio" name="group_mode" value="file" ' . $check . '  />' . $contacts_auto_group . ': </td><td>';
     } else {
         $check = $group_mode == 'file' ? true : false;
         echo '<tr><td><input type="hidden" name="group_id" value="0" />';
         $checkbox = new checkbox('group_mode', 'file', $ab_group_on_file, $check);
         echo ':</td><td>';
     }
     $dropbox = new dropbox();
     for ($n = 0; $n < sizeof($record); $n++) {
         $dropbox->add_value($n, $record[$n]);
     }
     $group_record = isset($_POST['group_record']) ? $_POST['group_record'] : 0;
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:import.php


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