]]jkjjgdjffksdkdfdkasdashjgjdsadsadsadsadskdfgjdskfgj
במ12[aspddfasdasddsadsadadasdasdghjghjghjsadasbvxcvxcv;'
/
home2
/
kediapaper
/
www
/
wknadmin
/
Upload FileeE
HOME
<?php require_once("../includes/dbsmain.inc.php"); if(isset($_REQUEST['arr_ids'])){ $arr_ids = $_REQUEST['arr_ids']; if(is_array($arr_ids)) { $str_ids = implode(',', $arr_ids); if(isset($_REQUEST['Activate']) || isset($_REQUEST['Activate_x'])){ $sql = "update tbl_video set video_status = 'Active' where video_id in ($str_ids)"; db_query($sql); set_session_msg("Selected Video have been activated successfully !"); }else if(isset($_REQUEST['Deactivate']) || isset($_REQUEST['Deactivate_x'])){ $sql = "update tbl_video set video_status = 'Inactive' where video_id in ($str_ids)"; db_query($sql); set_session_msg("Selected Video have been deactivated successfully !"); }else if(isset($_REQUEST['Delete']) || isset($_REQUEST['Delete_x'])){ $sql = "delete from tbl_video where video_id in ($str_ids)"; db_query($sql); set_session_msg("Selected Video have been deleted successfully !"); } } header("Location: manage_video.php"); exit; } $start = intval($start); $pagesize = intval($pagesize)==0?$pagesize=DEF_PAGE_SIZE:$pagesize; $columns = "select * "; $sql=" from tbl_video where 1"; $sql .= " order by video_id "; $sql_count = "select count(*) ".$sql; $sql .= " limit $start, $pagesize "; $sql = $columns.$sql; $result = db_query($sql); $reccnt = db_scalar($sql_count); ?> <link href="styles.css" rel="stylesheet" type="text/css"> <script language="JavaScript" type="text/javascript" src="../includes/general.js"></script> <?php include("top.inc.php");?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td id="pageHead"><div id="txtPageHead">Manage Video</div></td> </tr> </table> <div style="padding-top:10px;"><b class="msg" style="margin-left:450px;"><?=display_sess_msg()?></b></div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td id="content" align="left"> <div align="right"> <a href="addedit-video.php" style="font-size:13px; font-weight:bold; margin-right:10px;">Add Video</a> </div> <?php if(mysqli_num_rows($result)==0){?> <div class="msg">Sorry, no records found.</div> <? }else{ ?> <div align="right"> Showing Records: <?= $start+1?> to <?=($reccnt<$start+$pagesize)?($reccnt-$start):($start+$pagesize)?> of <?= $reccnt?> </div> <div align="left">Records Per Page: <?=pagesize_dropdown('pagesize', $pagesize);?> </div> <form method="post" name="form1" id="form1" onSubmit="confirm_submit(this)"> <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tableList"> <tr> <th width="35%" nowrap="nowrap" style="font-size:12px; padding:9px;">Title</th> <th width="35%" nowrap="nowrap">Video</th> <th width="10%">Status</th> <th width="5%">Edit</th> <th width="6%"><input name="check_all" type="checkbox" id="check_all" value="1" onclick="checkall(this.form)" /></th> </tr> <?php if($start==0){ $cnt=0; }else{ $cnt=$start; } while ($line_raw = mysqli_fetch_array($result)){ $cnt++; $css = ($css=='trOdd')?'trEven':'trOdd'; ?> <tr class="<?=$css?>"> </td> <td align="center" valign="middle" style="font-size:12px;"><?=$line_raw['video_title'];?></td> <td align="center" valign="top"> <iframe width="100" height="100" src="http://www.youtube.com/embed/<?=$line_raw['video_clip']?>" frameborder="0" allowfullscreen></iframe> </td> <td align="center" valign="middle"><b style="font-size:13px;"><?=$line_raw['video_status'];?></b></td> <td align="center" valign="middle"><a href="addedit-video.php?video_id=<?=$line_raw['video_id']?>&set_flag=update"> <img src="images/icons/edit.png" alt="Edit" width="19" height="19" border="0" /> </a> <td align="center" valign="middle"><input name="arr_ids[]" type="checkbox" id="arr_ids[]" value="<?=$line_raw['video_id'];?>" /> </td> </tr> <? }?> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="right" style="padding:2px"><input type="submit" name="Activate" value="Activate" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#1F3E00; border-radius:4px; cursor:pointer; width:100px;"/> <input type="submit" name="Deactivate" value="Deactivate" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#FF6F6F; border-radius:4px; cursor:pointer; width:100px;" /> <input type="submit" name="Delete" value="Delete" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#CA0000; border-radius:4px; cursor:pointer; width:100px;"/> </td> </tr> </table> </form> <? } ?> <?php include("paging.inc.php");?> </td> </tr> </table> <script language="javascript"> function select_chk(){ var chks = document.getElementsByName('arr_ids[]'); var hasChecked = false; for (var i = 0; i < chks.length; i++){ if (chks[i].checked){ hasChecked = true; break; } } if (hasChecked == false){ alert("Please Select At Least One."); return false; } } </script> <?php include("bottom.inc.php");?>