function adminEditUsers($userid = 0, $action = 'list', $active = '', $perms = '')
{
    mp3act_connect();
    if ($userid != 0) {
        if ($action == 'user') {
            $query = "SELECT * FROM mp3act_users WHERE user_id={$userid}";
            $result = mysql_query($query);
            $row = mysql_fetch_array($result);
            $output = "<div class=\"head\">";
            $output .= "<h2>Edit User - {$row['username']}</h2></div>";
            $output .= "<form onsubmit=\"return adminEditUsers({$userid},'mod',this)\" method='get' action=''>\n";
            $output .= "<p>\n";
            $output .= "<strong>User Status</strong><br/><select name='active'><option value='1' " . ($row['active'] == '1' ? "selected" : "") . ">Active</option><option value='0' " . ($row['active'] == '0' ? "selected" : "") . ">Disabled</option></select><br/><br/>\n";
            $output .= "<strong>User Permission Level</strong><br/><select name='perms'><option value='1' " . ($row['accesslevel'] == '1' ? "selected" : "") . ">1 - Normal User</option><option value='5' " . ($row['accesslevel'] == '5' ? "selected" : "") . ">5 - Downloading Allowed</option><option value='10' " . ($row['accesslevel'] == '10' ? "selected" : "") . ">10 - Administrator</option></select><br/><br/>\n";
            $output .= "<input type='submit' value='submit changes' class='btn' /> <input type='button' value='cancel' onclick=\"adminEditUsers(0); return false;\" class='redbtn' />\n";
            $output .= "</p></form>";
        } elseif ($action == 'mod') {
            $query = "UPDATE mp3act_users SET active={$active}, accesslevel={$perms} WHERE user_id={$userid}";
            $result = mysql_query($query);
            return 2;
        } elseif ($action == 'del') {
            $query = "DELETE FROM mp3act_users WHERE user_id={$userid}";
            $result = mysql_query($query);
            return 1;
        }
    } else {
        $query = "SELECT * FROM mp3act_users WHERE username!=\"Admin\"";
        $result = mysql_query($query);
        $output = "<div class=\"head\">";
        $output .= "<div class=\"right\"><a href=\"#\" onclick=\"switchPage('admin'); return false;\" title=\"Return to Admin Menu\">return to admin</a></div>";
        $output .= "<h2>Edit mp3act Users</h2></div><ul>";
        $count = 1;
        while ($row = mysql_fetch_array($result)) {
            $alt = getAlt($count);
            $output .= "<li {$alt}><span class='user'><strong>{$row['username']}</strong> - ({$row['firstname']} {$row['lastname']})</span> <span class='links'><a href='#' title='Edit User Settings' onclick=\"adminEditUsers({$row['user_id']},'user'); return false;\" >edit user</a> | <a href='#' title='Delete the User' onclick=\"adminEditUsers({$row['user_id']},'del'); return false;\" >delete user</a></span></li>";
            $count++;
        }
        $output .= "</ul>";
    }
    return $output;
}
Example #2
0
    <?foreach ($arResult["ITEMS"] as $key => $arItems) :?>
    	<div class="item js-item mainBlock" data-id="<?=$arItems["ID"]?>">
			<div class="shadowBlockBottom" style="display:none;">
				<input class="item-count js-item-count" value="1" type="text" name="item1-count" id="item1-count" style="display:none;" />			
				<div class="item-actions-cnt common_list">
					<a class="btn important js-add-to-cart" href="#" onclick="ga('send', 'event', 'adtocart', '<?=$arItems["PROPERTIES"]["ARTIKUL"]["VALUE"]?>'); return true;">Купить</a>
				</div>
			</div>
    		<a href="<?=$arItems["DETAIL_PAGE_URL"]?>">
                <?
                    //$waterImage = waterImage($arItems["~PREVIEW_PICTURE"]);
                    // $waterImage["src"]
                    $waterImage["src"] = CFIle::GetPath($arItems["~PREVIEW_PICTURE"]);
                ?>
    	        <div class="img-cnt">
                    <img src="<?=$waterImage["src"]?>" alt="<?=getAlt($arItems)?>" title="<?=getTitle($arItems)?>"/>
                </div>
    	        <div class="item-info">
    	            <p class="item-name">Артикул <?=$arItems["PROPERTIES"]["ARTIKUL"]["VALUE"]?></p>
    	            <p class="item-desc"><?=$arItems["NAME"]?></p>    	         
                    <?if ($arItems["PRICES"]["BASE"]["DISCOUNT_VALUE"] < $arItems["PRICES"]["BASE"]["VALUE"]){?>
                        <div class="item-price oneline"><span><?=number_format($arItems["PRICES"]["BASE"]["DISCOUNT_VALUE"], 0, 0, " ")?></span> <span class="rub">a</span> | </div>
						<div class="old-price oneline"><span><?=number_format($arItems["PRICES"]["BASE"]["VALUE"], 0, 0, " ")?></span> <span class="rub">a</span></div>
                    <?} else {?>
						<div class="item-price"><span><?=number_format($arItems["PRICES"]["BASE"]["DISCOUNT_VALUE"], 0, 0, " ")?></span> <span class="rub">a</span></div>
					<?}?>
                </div>
                <?if ($arItems["PROPERTIES"]["HIT"]["VALUE"]):?>
                    <div class="item-card-badge hit">Хит продаж</div>
                <?endif?>
                <?if ($arItems["PROPERTIES"]["NEW"]["VALUE"]):?>
Example #3
0
			<?if(isset($_COOKIE["bigbuzzy"]) && $_COOKIE["bigbuzzy"] == "Y" && $arResult["PROPERTIES"]["SALE"]["VALUE"] != 1) {?>
					<p class="price" itemprop="priceCurrency" ><span itemprop="price" ><?=number_format($arResult["PRICES"]["BASE"]["DISCOUNT_VALUE"] * 0.9, 0, 0, " ")?></span> руб.</p>
					<p class="old-price"><span><?=number_format($arResult["PRICES"]["BASE"]["VALUE"], 0, 0, " ")?></span> руб.</p>
			<?} else {?>
                <p class="price"  itemprop="price"><?=number_format($arResult["PRICES"]["BASE"]["DISCOUNT_VALUE"], 0, 0, " ")?> <span itemprop="priceCurrency">руб.</span></p>
                <?if ($arResult["PRICES"]["BASE"]["DISCOUNT_VALUE"] < $arResult["PRICES"]["BASE"]["VALUE"]):?>
                    <p class="old-price"><?=number_format($arResult["PRICES"]["BASE"]["VALUE"], 0, 0, " ")?> <span>руб.</span></p>
                <?endif?>
			<?}?>

                <?
                $brand = $arResult["PROPERTIES"]["BRAND"]["VALUE"][0];
                $brand_name = str_replace(" ", "_", $brand);
                ?>
                <a href="/brands/<?=$brand_name?>/" class="item-brand-logo">
                    <img alt='<?=getAlt($arResult["BRAND_PREVIEW"])?>' title='<?=getTitle($arResult["BRAND_PREVIEW"])?>' src='<?=$arResult['BRAND_LOGO']?>'/>
                </a>
            </div>


        </div>
        <div class="badge-cnt">
            <?if ($arResult["PROPERTIES"]["HIT"]["VALUE"]):?>
                <div class="item-card-inner-badge hit">Хит продаж</div>
            <?endif?>
            <?if ($arResult["PROPERTIES"]["NEW"]["VALUE"]):?>
                <div class="item-card-inner-badge new">Новинка</div>
            <?endif?>
            <?
                $salePersent = 100-($arResult["PRICES"]["BASE"]["DISCOUNT_VALUE"]*100)/$arResult["PRICES"]["BASE"]["VALUE"];
                $salePersent = number_format($salePersent, 0, 0, "");
Example #4
0
    ?>
    <div class="item-cards-list-cnt">
        <ul class="item-cards-list matrix">
        	<?foreach ($arResult["ITEMS"] as $key => $arItems) :?>
            <?
                //AddMessage2Log($arItems["PRICES"]["BASE"]["VALUE"], "/log/");
            ?>
    	        <li class="item-card-item js-item" data-id="<?=$arItems["ID"]?>">
    	            <a href="<?=$arItems["DETAIL_PAGE_URL"]?>">
                        <?
                            //$waterImage = waterImage($arItems["~PREVIEW_PICTURE"]);
                            // $waterImage["src"]
                            $waterImage["src"] = CFIle::GetPath($arItems["~PREVIEW_PICTURE"]);
                        ?>
    	                <div class="img-cnt">
    	                	<img src="/img/img_dummy.png" data-src="<?=$waterImage["src"]?>" alt="<?=getAlt($arItems)?>" title="<?=getTitle($arItems)?>"/>
    	                </div>
    	                <div class="item-info">						
    	                    <p class="item-brand"><?=$arItems["NAME"]?></p>
    	                    <p class="item-desc">Артикул <?=$arItems["PROPERTIES"]["ARTIKUL"]["VALUE"]?></p>
                            <?if ($arItems["PRICES"]["BASE"]["DISCOUNT_VALUE"] < $arItems["PRICES"]["BASE"]["VALUE"]){?>
							<div class="item-price">
								<div class="twoline"><span><?=number_format($arItems["PRICES"]["BASE"]["DISCOUNT_VALUE"], 0, 0, " ")?></span> <span class="rub">a</span> | </div>
                                <div class="old-price twoline"><span><?=number_format($arItems["PRICES"]["BASE"]["VALUE"], 0, 0, " ")?></span> <span class="rub">a</span></div>
							</div>
                            <?} elseif(isset($_COOKIE["bigbuzzy"]) && $_COOKIE["bigbuzzy"] == "Y" && $arItems["PROPERTIES"]["SALE"]["VALUE"] != 1) {?>
								<div class="item-price">
									<div class="twoline"><span><?=number_format($arItems["PRICES"]["BASE"]["DISCOUNT_VALUE"] * 0.9, 0, 0, " ")?></span> <span class="rub">a</span> | </div>
									<div class="old-price twoline"><span><?=number_format($arItems["PRICES"]["BASE"]["VALUE"], 0, 0, " ")?></span> <span class="rub">a</span></div>
								</div>
							<?} else {?>						
Example #5
0
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<? include_once($_SERVER["DOCUMENT_ROOT"]."/include/getTitle_and_getAlt.php"); ?>
<?if ($arResult["ITEMS"]):?>
	<?foreach ($arResult["ITEMS"] as $key => $arItems) :?>
		<h2><?=$arItems["NAME"]?></h2>
		<?if ($arItems["~DETAIL_PICTURE"]):?>
			<?if ($arItems["PROPERTIES"]["LINK"]["~VALUE"]):?>
				<a href="<?=$arItems["PROPERTIES"]["LINK"]["~VALUE"]?>" style="float:right;">
	        		<img src="<?=CFIle::GetPath($arItems["~DETAIL_PICTURE"])?>" alt="<?=getAlt($arItems)?>" title="<?=getTitle($arItems)?>"/>
	        	</a>
	        <?else:?>
				<img src="<?=CFIle::GetPath($arItems["~DETAIL_PICTURE"])?>" alt="<?=getAlt($arItems)?>" title="<?=getTitle($arItems)?>"/>
	        <?endif?>
        <?endif?>
        <?=$arItems["DETAIL_TEXT"]?>
	<?endforeach?>
<?endif?>