示例#1
0
function insert_into_shows($showname, $description, $logoimage, $showdir)
{
    if (check_show($showname)) {
        $sql = "insert into shows (showname,showdesc,logoimg,show_dir) values ('{$showname}','{$description}','{$logoimage}','{$showdir}')";
        if (!mysql_query($sql)) {
            print mysql_error();
        } else {
            return 1;
        }
    }
    return 0;
}
            ?>
</div></td>
                        <td>
                        	<a href="admin.php?p=item&action=edit_item&item_id=<?php 
            echo $_obj['item_id'];
            ?>
"> 编辑</a>&nbsp;
                            <a href="javascript:;" onclick="if (confirm(' 确定要删除吗?')) delete_item(<?php 
            echo $_obj['item_id'];
            ?>
,this);"> 删除</a>&nbsp;
                            	<?php 
            if ($_obj['status'] == "0") {
                ?>
								<?php 
                if (check_show('update')) {
                    ?>
									<a href="index.php?p=item&item_id=<?php 
                    echo $_obj['item_id'];
                    ?>
&preview=true" >审核</a>
								<?php 
                }
                ?>
								<?php 
            } else {
                ?>
									<a href="index.php?p=item&item_id=<?php 
                echo $_obj['item_id'];
                ?>
&preview=true" target="_blank">预览</a>			
            echo $_obj['type'];
        }
        ?>
"
                	admin_para="m=update&table=config&column=value&id=<?php 
        echo $_obj['config_id'];
        ?>
"  
                    admin_trigger="click" ><?php 
        echo $_obj['value'];
        ?>
</div>
				</td>
				<td valign="top">
					<?php 
        if (check_show('delete')) {
            ?>
					<a href="javascript:;" onclick="if (confirm(' 确定要删除这条设置吗?')) delete_config(<?php 
            echo $_obj['config_id'];
            ?>
,this)"> 删除</a>
					<?php 
        }
        ?>
				</td>
			</tr>
			<?php 
    }
    $_obj = $_stack[--$_stack_cnt];
}
?>
    display: none;
}
#live a{
	margin-left:480px;
	color:#000;
    font-size: 20px;
}
    .aname{
        position: relative;
        left: 0px;
    }
    </style>
</head>
<body style="text-align:left">
<?php 
if (check_show('add')) {
    ?>
<form style="border:0" action="admin.php?p=upload&m=upload" method="post" ENCTYPE="multipart/form-data" >
	<input type="file" style="width:150px;" size="10" name="upfile" /> <input type="submit" value="上传" /> <span style="color:orange" id="msg"><?php 
    echo $_obj['msg'];
    ?>
</span>
	&nbsp;&nbsp;选择最近上传的附件:
	<select style="height:20px;width:400px;" onchange="insert_file(this)">
		<option value=''> </option>
		<?php 
    if (!empty($_obj['recent'])) {
        if (!is_array($_obj['recent'])) {
            $_obj['recent'] = array(array('recent' => $_obj['recent']));
        }
        $_stack[$_stack_cnt++] = $_obj;
示例#5
0
        $level++;
        $title = langtransstr($menuItem['title']);
        $show = check_show($menuItem['show']);
        if ($show != '') {
            $level_show = false;
        }
        $string = '<li class="withImg" style="' . $show . '"> <a href="#" title="' . $title . '">' . $title . $img . '</a>' . PHP_EOL . '<ul style="' . $show . '">' . PHP_EOL;
        $menuArray[$n]['html'] = $string;
        $DropdownMenuText .= $string;
        #echo $DropdownMenuText; print_r($menuArray); exit;
        continue;
    }
    # same level generate li
    # <li><a href="index.php?p=01&amp;lang=en#data-area" title="Airplane radar">Airplane radar</a></li>
    $title = langtransstr($menuItem['title']);
    $show = check_show($menuItem['show']);
    $string = '<li><a href="index.php?p=' . $menuItem['choice'] . '&amp;lang=' . $lang . $extraP . $top . '" title="' . $title . '">' . $title . $img . '</a></li>' . PHP_EOL;
    $menuArray[$n]['html'] = $string;
    $DropdownMenuText .= $string;
    #if ($n > 15) { echo 'menu'.$DropdownMenuText; print_r($menuArray); exit;}
}
// eo for
echo $pathString . PHP_EOL . $DropdownMenuText;
print_r($menuArray);
exit;
#
$menuArray['ullist'] = $DropdownMenuText;
# save to chache
$result = file_put_contents($cache_file, serialize($menuArray));
if (!$result) {
    echo 'Save to cache failed for menu file ' . $cache_file . PHP_EOL . 'Make sure your cache folder ' . $SITE['cacheDir'] . ' is writable, program aborted.' . PHP_EOL;