コード例 #1
0
 /**
  * 返回时间select的HTML
  * @param string $selected 选中的option的value
  * @param bool $withEmptySelection 是否包含'时间不限'的option
  * @param string $selectTagName select的name的值,如无,返回的HTML不包含select这个Tag(只有option Tag)
  * @return HTML
  */
 function getTimeSelectHtml($selected, $withEmptySelection = 1, $selectTagName = 'time')
 {
     $options = array();
     if ($withEmptySelection) {
         $options[''] = '时间不限';
     }
     $options += $this->getTimeOptions();
     return getSelectHtml($options, $selected, $selectTagName);
 }
コード例 #2
0
 /**
  * 返回活动子分类select的HTML
  * @param int $selectedActmid 选中的活动分类
  * @param bool $withEmptySelection 是否包含“所有分类”选项
  * @param string $selectName select的name的值,如无,返回的HTML不包含select这个Tag
  * @return HTML
  */
 function getActmidSelectHtml($selectedActmid = 0, $withEmptySelection = 1, $selectTagName = 'actmid')
 {
     $options = array();
     if ($withEmptySelection) {
         $options['0'] = getLangInfo('other', 'act_activity_class');
     }
     $activityCateDb = $this->getActivityCateDb();
     $activityModelDb = $this->getActivityModelDb();
     $newModelDb = array();
     foreach ($activityModelDb as $value) {
         $newModelDb[$value['actid']][] = $value;
     }
     foreach ($activityCateDb as $value) {
         foreach ($newModelDb[$value['actid']] as $val) {
             $options[$value['name']][$val['actmid']] = $val['name'];
         }
     }
     $return = getSelectHtml($options, $selectedActmid, $selectTagName);
     return $return;
 }
コード例 #3
0
                        <td><?php 
echo getInputTextHtml('scale', $scale, array('type' => 'number', 'min' => 1, 'max' => 3, 'required' => 'required'));
?>
</td>
                    </tr>
                    <tr>
                        <td><label for="rotation">Rotation</label></td>
                        <td><?php 
echo getSelectHtml('rotation', $rotation, array(0 => 'No rotation', 90 => '90&deg; clockwise', 180 => '180&deg; clockwise', 270 => '270&deg; clockwise'));
?>
</td>
                    </tr>
                    <tr>
                        <td><label for="font_family">Font</label></td>
                        <td><?php 
echo getSelectHtml('font_family', $font_family, listfonts('../class'));
?>
 <?php 
echo getInputTextHtml('font_size', $font_size, array('type' => 'number', 'min' => 1, 'max' => 30));
?>
</td>
                    </tr>
                    <tr>
                        <td><label for="text">Data</label></td>
                        <td>
                            <div class="generate" style="float: left"><?php 
echo getInputTextHtml('text', $text, array('type' => 'text', 'required' => 'required'));
?>
 <input type="submit" value="Generate" /></div>
                            <div class="possiblechars" style="float: right; position: relative;"><a href="#" class="info characters"><img src="info.gif" alt="Help" /></a></div>
                        </td>
コード例 #4
0
ファイル: my.php プロジェクト: jechiy/PHPWind
            $rt['starttime'] = $rt['begintime'];
            $rt['location'] = $rt['address'];
            $rt['authorid'] = $rt['uid'];
            $rt['author'] = $rt['username'];
            $rt['actionButton'] = $postActForO->getGroupSignupHtml($rt);
            foreach (array('starttime', 'endtime') as $timeType) {
                $rt[$timeType] = $postActForO->getTimeFromTimestamp($rt[$timeType], 'minute');
            }
            $activities[] = $rt;
        }
    }
} elseif ('feeslog' == $see) {
    //费用流通日志
    $db_perpage = 30;
    S::gp(array('feeslogstatus', 'activityname', 'otherpartyname'), GP);
    $feesLogStatusSelectHtml = getSelectHtml($postActForO->getFeesLogStatus(), $feeslogstatus, 'feeslogstatus');
    $uidDb = $authoridDb = $fromuidDb = $actpidDB = array();
    $query = $db->query("SELECT actpid FROM pw_activitypaylog WHERE uid = " . S::sqlEscape($winduid));
    while ($rt = $db->fetch_array($query)) {
        $uidDb[] = $rt['actpid'];
    }
    $query = $db->query("SELECT actpid FROM pw_activitypaylog WHERE authorid = " . S::sqlEscape($winduid));
    while ($rt = $db->fetch_array($query)) {
        $authoridDb[] = $rt['actpid'];
    }
    $query = $db->query("SELECT actpid FROM pw_activitypaylog WHERE fromuid = " . S::sqlEscape($winduid));
    while ($rt = $db->fetch_array($query)) {
        $fromuidDb[] = $rt['actpid'];
    }
    $where = 'WHERE 1';
    $actpidDB = array_merge($uidDb, $authoridDb, $fromuidDb);
コード例 #5
0
ファイル: BCGcode128.php プロジェクト: sea129/kbay
registerImageKey('code', 'BCGcode128');
$vals = array();
for ($i = 0; $i <= 127; $i++) {
    $vals[] = '%' . sprintf('%02X', $i);
}
$characters = array('NUL', 'SOH', 'STX', 'ETX', 'EOT', 'ENQ', 'ACK', 'BEL', 'BS', 'TAB', 'LF', 'VT', 'FF', 'CR', 'SO', 'SI', 'DLE', 'DC1', 'DC2', 'DC3', 'DC4', 'NAK', 'SYN', 'ETB', 'CAN', 'EM', 'SUB', 'ESC', 'FS', 'GS', 'RS', 'US', '&nbsp;', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', 'DEL');
?>

<ul id="specificOptions">
    <li class="option">
        <div class="title">
            <label for="start">Starts with</label>
        </div>
        <div class="value">
            <?php 
echo getSelectHtml('start', $start, array('NULL' => 'Auto', 'A' => 'Code 128-A', 'B' => 'Code 128-B', 'C' => 'Code 128-C'));
?>
        </div>
    </li>
</ul>

<div id="validCharacters">
    <h3>Valid Characters</h3>
    <?php 
$c = count($characters);
for ($i = 0; $i < $c; $i++) {
    echo getButton($characters[$i], $vals[$i]);
}
?>
</div>
コード例 #6
0
        <div class="title">
            <label for="start">Starts with</label>
        </div>
        <div class="value">
            <?php 
echo getSelectHtml('start', $start, array('NULL' => 'Auto', 'A' => 'Code 128-A', 'B' => 'Code 128-B', 'C' => 'Code 128-C'));
?>
        </div>
    </li>
    <li class="option">
        <div class="title">
            <label for="identifier">Identifiers</label>
        </div>
        <div class="value">
            <?php 
echo getSelectHtml('identifier', null, $identifiers);
?>
            <div id="identifierContainer"></div>
        </div>
    </li>
</ul>

<div id="validCharacters">
    <h3>Valid Characters</h3>
    <?php 
$c = count($characters);
for ($i = 0; $i < $c; $i++) {
    echo getButton($characters[$i], $vals[$i]);
}
?>
</div>
コード例 #7
0
 /** 
  * 获取发帖活动子分类选择HTML
  * @param int $actmid 模板(子分类)id
  * @param int $fid 版块id
  * @return string 活动分类选择菜单HTML
  */
 function getActSelHtml($actmid, $fid)
 {
     $fid = (int) $fid;
     $actmid = (int) $actmid;
     $actmiddb = explode(",", $this->forum->foruminfo['actmids']);
     //$selectmodelhtml = '<div class="w_title_ip pr" style="margin-left: 5px;">';
     $selectmodelhtml = '<div style="margin-left: 5px;">';
     $selectmodelhtml .= "<select name=\"actmid\" onchange=\"window.onbeforeunload = function(){};window.location.href='post.php?fid='+'{$fid}'+'&actmid='+this.value\">";
     $newactcatedb = array();
     $activityModelDb = $this->getActivityModelDb();
     $activityCateDb = $this->getActivityCateDb();
     foreach ($actmiddb as $value) {
         $newactcatedb[$activityModelDb[$value]['actid']] = 1;
     }
     $options = array();
     foreach ($activityCateDb as $key => $value) {
         if ($value['ifable'] && $newactcatedb[$key]) {
             $label = $activityCateDb[$key]['name'];
             foreach ($actmiddb as $val) {
                 if ($activityModelDb[$val]['actid'] == $key && $activityModelDb[$val]['ifable']) {
                     $options[$label][$val] = $activityModelDb[$val]['name'];
                 }
             }
         }
     }
     $selectmodelhtml .= getSelectHtml($options, $actmid, '');
     $selectmodelhtml .= "</select></div>";
     return $selectmodelhtml;
 }
コード例 #8
0
ファイル: ymarket.php プロジェクト: DarneoStudio/bitrix
			<tr class="heading"><td colspan="2"><?php 
        echo GetMessage("SALE_YM_ORDER_PROPS_MAP");
        ?>
</td></tr>
			<?php 
        foreach ($requiredOrderProperties as $orderPropertyId) {
            ?>
				<tr>
					<td width="40%"><?php 
            echo GetMessage("SALE_YM_ORDER_PROPS_" . $orderPropertyId);
            ?>
:</td>
					<td width="60%">
						<?php 
            echo getSelectHtml("YMSETTINGS[" . htmlspecialcharsbx($arTab["SITE_ID"]) . "][ORDER_PROPS][" . $orderPropertyId . "]", $orderPropsList, isset($siteSetts["ORDER_PROPS"][$orderPropertyId]) ? $siteSetts["ORDER_PROPS"][$orderPropertyId] : $orderPropertyId, false);
            ?>
					</td>
				</tr>
			<?php 
        }
        ?>
	<?php 
    }
    $tabControl->Buttons(array("btnSave" => true, "btnApply" => false));
    echo '<input type="submit" name="YANDEX_MARKET_OFF" value="' . GetMessage("SALE_YM_OFF") . '" title="' . GetMessage("SALE_YM_OFF_TITLE") . '" onclick="return confirm(\'' . GetMessage("SALE_YM_OFF_CONFIRM") . '\')"/>';
    ?>
	<?php 
    echo bitrix_sessid_post();
    ?>
	<?php 
コード例 #9
0
ファイル: functions.php プロジェクト: jechiy/PHPWind
/**
 * 返回select的HTML Tag
 * @param array $options option选项,可以是array('value1' => 'text1', 'value2' => 'text2'), array ('optgrouplabel1' => array ('value1' => 'text1', 'value2' => 'text2'), 'value3' => 'text3')
 * @param mix $selected 选中的option的value
 * @param select的name的值,如无,返回的HTML不包含select这个Tag(只有option Tag)
 * @return HTML
 */
function getSelectHtml($options, $selected = '', $selectTagName = '')
{
    $return = '';
    if (is_array($options)) {
        foreach ($options as $value => $text) {
            if (is_array($text)) {
                $return .= "<optgroup label=\"{$value}\">";
                $return .= getSelectHtml($text, $selected);
                $return .= "</optgroup>";
            } else {
                $selectedHtml = (string) $value == (string) $selected ? ' selected="selected"' : '';
                $return .= "<option value=\"{$value}\"{$selectedHtml}>{$text}</option>";
            }
        }
    }
    if ($selectTagName) {
        $return = "<select name=\"{$selectTagName}\">{$return}</select>";
    }
    return $return;
}