Esempio n. 1
0
function addQuerySection($Form, $p)
{
    /* ================= BEGIN QUERY ===================== */
    $span = new SpanElement(_T("Query", "pkgs"), "pkgs-title");
    $Form->add(new TrFormElement("", $span), array());
    $check = '';
    $style = 'display:none';
    if ($p['associateinventory'] == 1) {
        $check = 'checked';
        $style = '';
    }
    $Form->add(new TrFormElement(_T('Associate inventory', 'pkgs'), new CheckboxTpl('associateinventory')), array("value" => $check));
    $Qfields = getQFields();
    addQuery($Form, array('Qvendor', _T('Vendor', 'pkgs')), $p, $Qfields['Qvendor'], 3, '', $style);
    addQuery($Form, array('Qsoftware', _T('Software', 'pkgs')), $p, $Qfields['Qsoftware'], 3, 'Qvendor', $style);
    addQuery($Form, array('Qversion', _T('Version', 'pkgs')), $p, $Qfields['Qversion'], 2, 'Qsoftware', $style);
    $Bool = new TrFormElement(_T('Bool', 'pkgs'), new InputTpl('boolcnd'));
    $Bool->setStyle("display:none");
    $Form->add($Bool, array("value" => $p['boolcnd']));
    /* ================= END QUERY ===================== */
    /* =================   BEGIN LICENSE   ===================== */
    $Form->add(new TrFormElement(_T('Number of licenses', 'pkgs'), new InputTpl('licenses'), array('class' => 'associateinventory', 'style' => $style)), array("value" => $p['licenses']));
    /* ==================   END LICENSE   ====================== */
}
Esempio n. 2
0
                ?>
);" src="iconos/eliminar.png"></li>
			  			</ul>	
			  			
			  		</li>
			  	<?php 
            }
            ?>
			  
			  </ul>     
			<?php 
        } else {
            echo "No hay favoritos.";
        }
    } elseif ($_REQUEST['tipo'] == 12) {
        addQuery($_REQUEST['q']);
    } elseif ($_REQUEST['tipo'] == 13) {
        $banners = getBanner();
        if (count($banners) > 0) {
            ?>
			<script>
				//alert("busco");
			 	
				 	swfobject.embedSWF("<?php 
            echo $banners[5];
            ?>
", "swf_div", "332", "80", "9.0.0", "js/expressInstall.swf",var1,var2,var3);
				</script>
			<?php 
        }
    } elseif ($_REQUEST['tipo'] == 14) {
Esempio n. 3
0
/**
 * @Desc: 为字符串中的URL地址添加GET参数
 * @User: Njs
 * @param String $str
 * @param Array $addQueryArr 参数数组
 * @return String $newStr 为字符串中地址添加了参数的数组
 */
function strAddQuery($str, $addQueryArr = array())
{
    $preg = '~href=(?:[\'"])?(.*?)(?:[\'"])~i';
    preg_match_all($preg, $str, $rst);
    $urls = $rst[1];
    $rurl = array();
    foreach ($urls as $url) {
        if (empty($url)) {
            continue;
        }
        $rurl[] = addQuery($url, $addQueryArr);
    }
    $str = str_replace($urls, $rurl, $str);
    return $str;
}