function html_show_theme($rows, $pageNav, $sort) { global $wpdb; ?> <script language="javascript"> function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if( keyCode == 13 ) { if(!e) var e = window.event; e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } </script> <script language="JavaScript"> </script> <form method="post" onkeypress="doNothing()" action="admin.php?page=Spider_Video_Player_Themes" id="admin_form" name="admin_form"> <?php $sp_vid_nonce = wp_create_nonce('nonce_sp_vid'); ?> <table cellspacing="10" width="100%"> <tr> <td width="100%" style="font-size:14px; font-weight:bold"><a href="https://web-dorado.com/spider-video-player-wordpress-guide-step-5/spider-video-player-wordpress-guide-step-5-1.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br /> This section allows you to create themes to customize the design of the player. <a href="https://web-dorado.com/spider-video-player-wordpress-guide-step-5/spider-video-player-wordpress-guide-step-5-1.html" target="_blank" style="color:blue; text-decoration:none;">More...</a></td> </tr> <tr> <td style="width:80px"> <?php echo "<h2 style=\"float:left\">" . 'Themes' . "</h2>"; ?> <input type="button" style="float:left; position:relative; top:10px; margin-left:20px" class="button-secondary action" value="Add a Theme" name="custom_parametrs" onclick="window.location.href='admin.php?page=Spider_Video_Player_Themes&task=add_theme'" /> </td> <td colspan="7" align="right" style="font-size:16px;"> <a href="https://web-dorado.com/files/fromSVP.php" target="_blank" style="color:red; text-decoration:none;"> <img src="<?php echo plugins_url("images/header.png", __FILE__); ?> " border="0" alt="https://web-dorado.com/files/fromSVP.php" width="215"> </a> </td> </tr> </table> <label for="search_events_by_title" style="font-size:14px">Title: </label> <?php $serch_value = ''; if (isset($_POST['serch_or_not'])) { if ($_POST['serch_or_not'] == "search") { $serch_value = esc_js(esc_html(stripslashes($_POST['search_events_by_title']))); } else { $serch_value = ""; } } $serch_fields = '<div class="alignleft actions" style="width:180px;"> <input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()"> </div> <div class="alignleft actions"> <input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action"> <input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=Spider_Video_Player_Themes\'" class="button-secondary action"> </div>'; print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields); ?> <table class="wp-list-table widefat fixed pages" style="width:95%"> <thead> <TR> <th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:120px" ><a href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>ID</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "title") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('title',<?php if ($sort["sortid_by"] == "title") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Title</span><span class="sorting-indicator"></span></a></th> <th>Default</th> <th style="width:80px">Edit</th> <th style="width:80px">Delete</th> </TR> </thead> <tbody> <?php for ($i = 0; $i < count($rows); $i++) { ?> <tr> <td><?php echo $rows[$i]->id; ?> </td> <td><a href="admin.php?page=Spider_Video_Player_Themes&task=edit_theme&id=<?php echo $rows[$i]->id; ?> "><?php echo $rows[$i]->title; ?> </a></td> <td><a <?php if (!$rows[$i]->default) { echo 'style="color:#C00"'; } ?> href="admin.php?page=Spider_Video_Player_Themes&task=default&id=<?php echo $rows[$i]->id; ?> &_wpnonce=<?php echo $sp_vid_nonce; ?> "><?php if ($rows[$i]->default) { echo "Default"; } else { echo "Not Default"; } ?> </a></td> <td><a href="admin.php?page=Spider_Video_Player_Themes&task=edit_theme&id=<?php echo $rows[$i]->id; ?> ">Edit</a></td> <td><a href="#" href-data="admin.php?page=Spider_Video_Player_Themes&task=remove_theme&id=<?php echo $rows[$i]->id; ?> &_wpnonce=<?php echo $sp_vid_nonce; ?> ">Delete</a></td> </tr> <?php } ?> </tbody> </table> <?php wp_nonce_field('nonce_sp_vid', 'nonce_sp_vid'); ?> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo esc_js(esc_html(stripslashes($_POST['asc_or_desc']))); } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo esc_js(esc_html(stripslashes($_POST['order_by']))); } ?> " /> <?php ?> </form> <?php }
function html_show_spider_event($rows, $pageNav, $sort, $calendar_id, $cal_name) { global $wpdb; ?> <style> .calendar .button { display:table-cell !important; } </style> <script language="javascript"> function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if( keyCode == 13 ) { if(!e) var e = window.event; e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } </script> <form method="post" onkeypress="doNothing()" action="admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=<?php echo $calendar_id; ?> " id="admin_form" name="admin_form"> <table cellspacing="10" width="95%"> <tr> <td width="100%" style="font-size:14px; font-weight:bold"><a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br> This section allows you to create/edit the events of a particular calendar.<br /> You can add unlimited number of events for each calendar. <a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">More...</a></td> <td colspan="7" align="right" style="font-size:16px;"> <a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;"> <img src="<?php echo plugins_url('images/header.png', __FILE__); ?> " border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br> Get the full version </a> </td> </tr> <tr> <td width="100%" > <?php echo "<h2>" . 'Event Manager for calendar <font style="color:red">' . $cal_name . "</font></h2>"; ?> </td> <td ><p class="submit" style="padding:0px; text-align:left"><input class="button-primary" type="button" value="Add a Event" name="custom_parametrs" onclick="window.location.href='admin.php?page=SpiderCalendar&task=add_event&calendar_id=<?php echo $calendar_id; ?> '" /> </p></td> <td > <p class="submit" style="padding:0px; text-align:left"><input type="button" class="button-primary" value="Back" name="custom_parametrs" onclick="window.location.href='admin.php?page=SpiderCalendar'" /></p> </td> </tr> </table> <?php if (isset($_POST['serch_or_not'])) { if ($_POST['serch_or_not'] == "search") { $serch_value = $_POST['search_events_by_title']; } else { $serch_value = ""; } } $serch_fields = '<div class="alignleft actions" style="width:180px;"> <label for="search_events_by_title" style="font-size:14px">Title: </label> <input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()"> </div> <div class="alignleft actions"> From:<input style="width: 90px;" class="inputbox" type="text" name="startdate" id="startdate" size="10" maxlength="10" value="' . $_POST["startdate"] . '"> <input type="reset" class="button" value="..." onclick="return showCalendar(\'startdate\',\'%Y-%m-%d\');"> To: <input style="width: 90px;" class="inputbox" type="text" name="enddate" id="enddate" size="10" maxlength="10" value="' . $_POST["enddate"] . '"> <input type="reset" class="button" value="..." onclick="return showCalendar(\'enddate\',\'%Y-%m-%d\');"> </div> <div class="alignleft actions"> <input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\';document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action"><input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=' . $calendar_id . '\'" class="button-secondary action"> </div>'; print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields); ?> <table class="wp-list-table widefat fixed pages" style="width:95%"> <thead> <TR> <th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:50px" ><a href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>ID</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "title") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " ><a href="javascript:ordering('title',<?php if ($sort["sortid_by"] == "title") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Title</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="date" class="<?php if ($sort["sortid_by"] == "date") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " ><a href="javascript:ordering('date',<?php if ($sort["sortid_by"] == "date") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Date</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="time" class="<?php if ($sort["sortid_by"] == "time") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " ><a href="javascript:ordering('time',<?php if ($sort["sortid_by"] == "time") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Time</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="published" class="<?php if ($sort["sortid_by"] == "published") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:100px" ><a href="javascript:ordering('published',<?php if ($sort["sortid_by"] == "published") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Published</span><span class="sorting-indicator"></span></a></th> <th style="width:80px">Edit</th> <th style="width:80px">Delete</th> </TR> </thead> <tbody> <?php for ($i = 0; $i < count($rows); $i++) { ?> <tr> <td><?php echo $rows[$i]->id; ?> </td> <td><a href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?> &task=edit_event&id=<?php echo $rows[$i]->id; ?> "><?php echo $rows[$i]->title; ?> </a></td> <td><?php if ($rows[$i]->date_end != '0000-00-00') { echo $rows[$i]->date . ' - ' . $rows[$i]->date_end; } else { echo $rows[$i]->date; } ?> </td> <td><?php echo $rows[$i]->time; ?> </td> <td><a <?php if (!$rows[$i]->published) { echo 'style="color:#C00"'; } ?> href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?> &task=published_event&id=<?php echo $rows[$i]->id; ?> "><?php if ($rows[$i]->published) { echo "Yes"; } else { echo "No"; } ?> </a></td> <td><a href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?> &task=edit_event&id=<?php echo $rows[$i]->id; ?> ">Edit</a></td> <td><a href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?> &task=remove_event&id=<?php echo $rows[$i]->id; ?> ">Delete</a></td> </tr> <?php } ?> </tbody> </table> <input type="hidden" name="id_for_playlist" id="id_for_playlist" value="<?php if (isset($_POST['id_for_playlist'])) { echo $_POST['id_for_playlist']; } ?> " /> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo $_POST['asc_or_desc']; } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo $_POST['order_by']; } ?> " /> <?php ?> </form> <?php }
function html_showsliders($rows, $pageNav, $sort, $cat_row) { global $wpdb; ?> <script language="javascript"> function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function saveorder() { document.getElementById('saveorder').value="save"; document.getElementById('admin_form').submit(); } function listItemTask(this_id,replace_id) { document.getElementById('oreder_move').value=this_id+","+replace_id; document.getElementById('admin_form').submit(); } function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if( keyCode == 13 ) { if(!e) var e = window.event; e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } </script> <div class="wrap"> <?php $path_site2 = plugins_url("images", __FILE__); ?> <div class="slider-options-head"> <div style="float: left;"> <div><a href="http://huge-it.com/wordpress-plugins-slider-user-manual/" target="_blank">User Manual</a></div> <div>This section allows you to configure the Slider options. <a href="http://huge-it.com/wordpress-plugins-slider-user-manual/" target="_blank">More...</a></div> </div> <div style="float: right;"> <a class="header-logo-text" href="http://huge-it.com/slider/" target="_blank"> <div><img width="250px" src="<?php echo $path_site2; ?> /huge-it1.png" /></div> <div>Get the full version</div> </a> </div> </div> <div style="clear:both;"></div> <div id="poststuff"> <div id="sliders-list-page"> <form method="post" onkeypress="doNothing()" action="admin.php?page=sliders_huge_it_slider" id="admin_form" name="admin_form"> <h2>Huge IT Sliders <a onclick="window.location.href='admin.php?page=sliders_huge_it_slider&task=add_cat'" class="add-new-h2" >Add New Slider</a> </h2> <?php $serch_value = ''; if (isset($_POST['serch_or_not'])) { if ($_POST['serch_or_not'] == "search") { $serch_value = esc_html(stripslashes($_POST['search_events_by_title'])); } else { $serch_value = ""; } } $serch_fields = '<div class="alignleft actions""> <label for="search_events_by_title" style="font-size:14px">Filter: </label> <input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()"> </div> <div class="alignleft actions"> <input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action"> <input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=sliders_huge_it_slider\'" class="button-secondary action"> </div>'; print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields); ?> <table class="wp-list-table widefat fixed pages" style="width:95%"> <thead> <tr> <th scope="col" id="id" style="width:30px" ><span>ID</span><span class="sorting-indicator"></span></th> <th scope="col" id="name" style="width:85px" ><span>Name</span><span class="sorting-indicator"></span></th> <th scope="col" id="prod_count" style="width:75px;" ><span>Images</span><span class="sorting-indicator"></span></th> <th style="width:40px">Delete</th> </tr> </thead> <tbody> <?php $trcount = 1; for ($i = 0; $i < count($rows); $i++) { $trcount++; $ka0 = 0; $ka1 = 0; if (isset($rows[$i - 1]->id)) { if ($rows[$i]->sl_width == $rows[$i - 1]->sl_width) { $x1 = $rows[$i]->id; $x2 = $rows[$i - 1]->id; $ka0 = 1; } else { $jj = 2; while (isset($rows[$i - $jj])) { if ($rows[$i]->sl_width == $rows[$i - $jj]->sl_width) { $ka0 = 1; $x1 = $rows[$i]->id; $x2 = $rows[$i - $jj]->id; break; } $jj++; } } if ($ka0) { $move_up = '<span><a href="#reorder" onclick="return listItemTask(\'' . $x1 . '\',\'' . $x2 . '\')" title="Move Up"> <img src="' . plugins_url('images/uparrow.png', __FILE__) . '" width="16" height="16" border="0" alt="Move Up"></a></span>'; } else { $move_up = ""; } } else { $move_up = ""; } if (isset($rows[$i + 1]->id)) { if ($rows[$i]->sl_width == $rows[$i + 1]->sl_width) { $x1 = $rows[$i]->id; $x2 = $rows[$i + 1]->id; $ka1 = 1; } else { $jj = 2; while (isset($rows[$i + $jj])) { if ($rows[$i]->sl_width == $rows[$i + $jj]->sl_width) { $ka1 = 1; $x1 = $rows[$i]->id; $x2 = $rows[$i + $jj]->id; break; } $jj++; } } if ($ka1) { $move_down = '<span><a href="#reorder" onclick="return listItemTask(\'' . $x1 . '\',\'' . $x2 . '\')" title="Move Down"> <img src="' . plugins_url('images/downarrow.png', __FILE__) . '" width="16" height="16" border="0" alt="Move Down"></a></span>'; } else { $move_down = ""; } } $uncat = $rows[$i]->par_name; if (isset($rows[$i]->prod_count)) { $pr_count = $rows[$i]->prod_count; } else { $pr_count = 0; } ?> <tr <?php if ($trcount % 2 == 0) { echo 'class="has-background"'; } ?> > <td><?php echo $rows[$i]->id; ?> </td> <td><a href="admin.php?page=sliders_huge_it_slider&task=edit_cat&id=<?php echo esc_html($rows[$i]->id); ?> "><?php echo esc_html(stripslashes($rows[$i]->name)); ?> </a></td> <td>(<?php if (!$pr_count) { echo '0'; } else { echo $rows[$i]->prod_count; } ?> )</td> <td><a href="admin.php?page=sliders_huge_it_slider&task=remove_cat&id=<?php echo esc_html($rows[$i]->id); ?> ">Delete</a></td> </tr> <?php } ?> </tbody> </table> <input type="hidden" name="oreder_move" id="oreder_move" value="" /> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo esc_html($_POST['asc_or_desc']); } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo esc_html($_POST['order_by']); } ?> " /> <input type="hidden" name="saveorder" id="saveorder" value="" /> <input type="hidden" name="csrf_token_hugeit_1752" value="csrf_token_hugeit_1752" /> <?php $_SESSION['csrf_token_hugeit_1752'] = 'csrf_token_hugeit_1752'; ?> </form> </div> </div> </div> <?php }
function html_spider_facebook_show($rows, $pageNav, $sort) { ?> <script language="javascript"> function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if( keyCode == 13 ) { if(!e) var e = window.event; e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } </script> <form method="post" action="admin.php?page=Spider_Facebook_manage" onkeypress="doNothing()" id="admin_form" name="admin_form" > <table cellspacing="10" width="100%"> <tr><td><a href="http://web-dorado.com/wordpress-facebook-guide-step-1.html" target="_blank" style="color:blue; text-decoration:none;font-size:16px; font-weight:bold">User Manual</a></td></tr> <tr> <td style="width:210px"> <?php echo "<h2 style=\"float:left\">" . 'Spider Facebook' . "</h2>"; ?> <input type="button" style="float:left; position:relative; top:10px; margin-left:20px" class="button-secondary action" value="Add a Facebook" name="custom_parametrs" onclick="window.location.href='admin.php?page=Spider_Facebook_manage&task=add'" /> </td> <td colspan="11"><div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:100%"> <a href=" http://web-dorado.com/products/wordpress-facebook.html " target="_blank" style="color:red; text-decoration:none;"> <img src="<?php echo plugins_url('images/header.png', __FILE__); ?> " border="0" alt="www.web-dorado.com" width="215"><br> Get the full version </a> </td> </tr> </table> <?php if (isset($_POST['serch_or_not'])) { if ($_POST['serch_or_not'] == "search") { $serch_value = esc_attr($_POST['search_events_by_title']); } else { $serch_value = ""; } } $serch_fields = '<div class="alignleft actions" style="width:180px;"> <label for="search_events_by_title" style="font-size:14px">Title: </label> <input type="text" name="search_events_by_title" value="' . (isset($serch_value) ? esc_attr($serch_value) : '') . '" id="search_events_by_title" onchange="clear_serch_texts()"> </div> <div class="alignleft actions"> <input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action"> <input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=Spider_Facebook_manage\'" class="button-secondary action"> </div>'; print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields); ?> <table class="wp-list-table widefat fixed pages" style="width:95%"> <thead> <tr> <th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:110px" ><a href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>ID</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "title") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('title',<?php if ($sort["sortid_by"] == "title") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Title</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "type") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('type',<?php if ($sort["sortid_by"] == "title") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Type</span><span class="sorting-indicator"></span></a></th> <th scope="col" ><span>Published</span></th> <th style="width:80px">Edit</th> <th style="width:80px">Delete</th> </tr> </thead> <tbody> <?php for ($i = 0; $i < count($rows); $i++) { ?> <tr> <td><?php echo $rows[$i]->id; ?> </td> <td><a href="admin.php?page=Spider_Facebook_manage&task=Spider_Facebook_edit&id=<?php echo $rows[$i]->id; ?> "><?php echo $rows[$i]->title; ?> </a></td> <td><?php echo $rows[$i]->type; ?> </td> <td><a href="admin.php?page=Spider_Facebook_manage&task=publiah_spider_facebook&id=<?php echo $rows[$i]->id; ?> "<?php if (!$rows[$i]->published) { ?> style="color:#C00;" <?php } ?> ><?php if ($rows[$i]->published) { echo "Yes"; } else { echo "No"; } ?> </a></td> <td><a href="admin.php?page=Spider_Facebook_manage&task=Spider_Facebook_edit&id=<?php echo $rows[$i]->id; ?> ">Edit</a></td> <td><a href="admin.php?page=Spider_Facebook_manage&task=remove_Spider_Facebook&id=<?php echo $rows[$i]->id; ?> ">Delete</a></td> </tr> <?php } ?> </tbody> </table> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo sanitize_text_field($_POST['asc_or_desc']); } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo sanitize_text_field($_POST['order_by']); } ?> " /> <?php ?> </form> <?php }
function html_show_tag($rows, $pageNav, $sort) { global $wpdb; ?> <script language="javascript"> function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function saveorder() { document.getElementById('saveorder').value="save"; document.getElementById('admin_form').submit(); } function listItemTask(this_id,replace_id) { document.getElementById('oreder_move').value=this_id+","+replace_id; document.getElementById('admin_form').submit(); } function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if( keyCode == 13 ) { if(!e) var e = window.event; e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } </script> <style type="text/css"> .admintable { border-right:1px solid #cccccc; border-top:1px solid #cccccc; } .admintable td { padding:15px; border-left:1px solid #cccccc; border-bottom:1px solid #cccccc; } </style> <form method="post" onkeypress="doNothing()" action="admin.php?page=Tags_Spider_Video_Player" id="admin_form" name="admin_form"> <?php $sp_vid_nonce = wp_create_nonce('nonce_sp_vid'); ?> <table cellspacing="10" width="100%"> <thead> <tr> <td width="100%" style="font-size:14px; font-weight:bold"><a href="https://web-dorado.com/spider-video-player-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br /> This section allows you to create tags. <br /> A tag is a keyword or term that is assigned to the video, helping to describe it and making it easier to find it by browsing or searching.<br /> Examples of tags: Year, Date, Artist, Album, Genre, etc. <a href="https://web-dorado.com/spider-video-player-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">More...</a> </td> </tr> </thead> <tr> <td style="width:80px"> <?php echo "<h2 style=\"float:left\">" . 'Tags' . "</h2>"; ?> <input type="button" value="Add a Tag" style="float:left; position:relative; top:10px; margin-left:20px" class="button-secondary action" name="custom_parametrs" onclick="window.location.href='admin.php?page=Tags_Spider_Video_Player&task=add_tag'" /> </td> </td> <td colspan="7" align="right" style="font-size:16px;"> <a href="https://web-dorado.com/files/fromSVP.php" target="_blank" style="color:red; text-decoration:none;"> <img src="<?php echo plugins_url("images/header.png", __FILE__); ?> " border="0" alt="https://web-dorado.com/files/fromSVP.php" width="215"> </a> </td> </tr> </table> <label for="search_events_by_title" style="font-size:14px">Title: </label> <?php $serch_value = ''; if (isset($_POST['serch_or_not'])) { if ($_POST['serch_or_not'] == "search") { $serch_value = esc_js(esc_html(stripslashes($_POST['search_events_by_title']))); } else { $serch_value = ""; } } $serch_fields = '<div class="alignleft actions" style="width:180px;"> <input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()"> </div> <div class="alignleft actions"> <input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action"> <input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=Tags_Spider_Video_Player\'" class="button-secondary action"> </div>'; print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields); ?> <table class="wp-list-table widefat fixed pages" style="width:95%"> <thead> <TR> <th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:120px" ><a href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>ID</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "name") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('name',<?php if ($sort["sortid_by"] == "name") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Name</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="ordering" class="<?php if ($sort["sortid_by"] == "ordering") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:95px;padding-left: 15px;" ><a style="display:inline" href="javascript:ordering('ordering',<?php if ($sort["sortid_by"] == "ordering") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Order</span><span class="sorting-indicator"></span></a><div><a style="display:inline" href="javascript:saveorder(1, 'saveorder')" title="Save Order"><img onclick="saveorder(1, 'saveorder')" src="<?php echo plugins_url("images/filesave.png", __FILE__); ?> " style="border:none;" alt="Save Order"></a></div></th> <th scope="col" id="required" class="<?php if ($sort["sortid_by"] == "required") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('required',<?php if ($sort["sortid_by"] == "required") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Required</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="published" class="<?php if ($sort["sortid_by"] == "published") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('published',<?php if ($sort["sortid_by"] == "published") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Published</span><span class="sorting-indicator"></span></a></th> <th style="width:80px">Edit</th> <th style="width:80px">Delete</th> </TR> </thead> <tbody> <?php for ($i = 0; $i < count($rows); $i++) { if (isset($rows[$i - 1]->id)) { $move_up = '<span><a href="#reorder" onclick="return listItemTask(\'' . $rows[$i]->id . '\',\'' . $rows[$i - 1]->id . '\')" title="Move Up"> <img src="' . plugins_url('images/uparrow.png', __FILE__) . '" width="16" height="16" border="0" alt="Move Up" style="border:none;"></a></span>'; } else { $move_up = ""; } if (isset($rows[$i + 1]->id)) { $move_down = '<span><a href="#reorder" onclick="return listItemTask(\'' . $rows[$i]->id . '\',\'' . $rows[$i + 1]->id . '\')" title="Move Down"> <img src="' . plugins_url('images/downarrow.png', __FILE__) . '" width="16" height="16" border="0" alt="Move Down" style="border:none;"></a></span>'; } else { $move_down = ""; } ?> <tr> <td><?php echo $rows[$i]->id; ?> </td> <td><a href="admin.php?page=Tags_Spider_Video_Player&task=edit_tag&id=<?php echo $rows[$i]->id; ?> "><?php echo $rows[$i]->name; ?> </a></td> <td style="padding-left:0px;" ><?php echo $move_up . $move_down; ?> <input type="text" name="order_<?php echo $rows[$i]->id; ?> " style="width:40px" value="<?php echo $rows[$i]->ordering; ?> " /></td> <td><a href="admin.php?page=Tags_Spider_Video_Player&task=required_tag&id=<?php echo $rows[$i]->id; ?> &_wpnonce=<?php echo $sp_vid_nonce; ?> "<?php if (!$rows[$i]->required) { ?> style="color:#C00;" <?php } ?> ><?php if ($rows[$i]->required) { echo "Required "; } else { echo "NOT Required"; } ?> </a></td> <td><a href="admin.php?page=Tags_Spider_Video_Player&task=unpublish_tag&id=<?php echo $rows[$i]->id; ?> &_wpnonce=<?php echo $sp_vid_nonce; ?> "<?php if (!$rows[$i]->published) { ?> style="color:#C00;" <?php } ?> ><?php if ($rows[$i]->published) { echo "Yes"; } else { echo "No"; } ?> </a></td> <td><a href="admin.php?page=Tags_Spider_Video_Player&task=edit_tag&id=<?php echo $rows[$i]->id; ?> ">Edit</a></td> <td><a href="#" href-data="admin.php?page=Tags_Spider_Video_Player&task=remove_tag&id=<?php echo $rows[$i]->id; ?> &_wpnonce=<?php echo $sp_vid_nonce; ?> ">Delete</a></td> </tr> <?php } ?> </tbody> </table> <?php wp_nonce_field('nonce_sp_vid', 'nonce_sp_vid'); ?> <input type="hidden" name="oreder_move" id="oreder_move" value="" /> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo esc_js(esc_html(stripslashes($_POST['asc_or_desc']))); } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo esc_js(esc_html(stripslashes($_POST['order_by']))); } ?> " /> <input type="hidden" name="saveorder" id="saveorder" value="" /> <?php ?> </form> <?php }
function html_showcatalogs($rows, $pageNav, $sort, $cat_row) { global $wpdb; ?> <script language="javascript"> function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function saveorder() { document.getElementById('saveorder').value="save"; document.getElementById('admin_form').submit(); } function listItemTask(this_id,replace_id) { document.getElementById('oreder_move').value=this_id+","+replace_id; document.getElementById('admin_form').submit(); function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if( keyCode == 13 ) { if(!e) var e = window.event; e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } } </script> <div class=""> <?php $path_site2 = plugins_url("../images", __FILE__); ?> <style> .free_version_banner { position:relative; display:block; background-image:url(<?php echo $path_site2; ?> /wp_banner_bg.jpg); background-position:top left; backround-repeat:repeat; overflow:hidden; } .free_version_banner .manual_icon { position:absolute; display:block; top:15px; left:15px; } .free_version_banner .usermanual_text { font-weight: bold !important; display:block; float:left; width:270px; margin-left:75px; font-family:'Open Sans',sans-serif; font-size:12px; font-weight:300; font-style:italic; color:#ffffff; line-height:10px; margin-top: 0; padding-top: 15px; } .free_version_banner .usermanual_text a, .free_version_banner .usermanual_text a:link, .free_version_banner .usermanual_text a:visited { display:inline-block; font-family:'Open Sans',sans-serif; font-size:17px; font-weight:600; font-style:italic; color:#ffffff; line-height:30.5px; text-decoration:underline; } .free_version_banner .usermanual_text a:hover, .free_version_banner .usermanual_text a:focus, .free_version_banner .usermanual_text a:active { text-decoration:underline; } .free_version_banner .get_full_version, .free_version_banner .get_full_version:link, .free_version_banner .get_full_version:visited { padding-left: 60px; padding-right: 4px; display: inline-block; position: absolute; top: 15px; right: calc(50% - 167px); height: 38px; width: 268px; border: 1px solid rgba(255,255,255,.6); font-family: 'Open Sans',sans-serif; font-size: 23px; color: #ffffff; line-height: 43px; text-decoration: none; border-radius: 2px; } .free_version_banner .get_full_version:hover { background:#ffffff; color:#bf1e2e; text-decoration:none; outline:none; } .free_version_banner .get_full_version:focus, .free_version_banner .get_full_version:active { } .free_version_banner .get_full_version:before { content:''; display:block; position:absolute; width:33px; height:23px; left:25px; top:9px; background-image:url(<?php echo $path_site2; ?> /wp_shop.png); background-position:0px 0px; background-repeat:repeat; } .free_version_banner .get_full_version:hover:before { background-position:0px -27px; } .free_version_banner .huge_it_logo { float:right; margin:15px 15px; } .free_version_banner .description_text { padding:0 0 13px 0; position:relative; display:block; width:100%; text-align:center; float:left; font-family:'Open Sans',sans-serif; color:#fffefe; line-height:inherit; } .free_version_banner .description_text p{ margin:0; padding:0; font-size: 14px; } </style> <div class="free_version_banner"> <img class="manual_icon" src="<?php echo $path_site2; ?> /icon-user-manual.png" alt="user manual" /> <p class="usermanual_text">If you have any difficulties in using the options, Follow the link to <a href="http://huge-it.com/wordpress-product-catalog-user-manual/" target="_blank">User Manual</a></p> <a class="get_full_version" href="http://huge-it.com/product-catalog/" target="_blank">GET THE FULL VERSION</a> <a href="http://huge-it.com" target="_blank"><img class="huge_it_logo" src="<?php echo $path_site2; ?> /Huge-It-logo.png"/></a> <div style="clear: both;"></div> <div class="description_text"><p>This is the free version of the plugin. Click "GET THE FULL VERSION" for more advanced options. We appreciate every customer.</p></div> </div> <div style="clear:both;"></div> <div id="poststuff"> <div id="catalogs-list-page"> <form method="post" onkeypress="doNothing()" action="admin.php?page=catalogs_huge_it_catalog" id="admin_form" name="admin_form"> <h2><?php echo __("Huge-IT Catalogs", "product-catalog"); ?> <a onclick="window.location.href='admin.php?page=catalogs_huge_it_catalog&task=add_cat'" class="add-new-h2" ><?php echo __("Add New Catalog", "product-catalog"); ?> </a> </h2> <?php $serch_value = ''; if (isset($_POST['serch_or_not'])) { if ($_POST['serch_or_not'] == "search") { $serch_value = esc_html(stripslashes($_POST['search_events_by_title'])); } else { $serch_value = ""; } } $serch_fields = '<div class="alignleft actions""> <label for="search_events_by_title" style="font-size:14px">' . __("Filter", "product-catalog") . ': </label> <input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()"> </div> <div class="alignleft actions"> <input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action"> <input type="button" value="' . __("Reset", "product-catalog") . '" onclick="window.location.href=\'admin.php?page=catalogs_huge_it_catalog\'" class="button-secondary action"> </div>'; print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields); ?> <table class="wp-list-table widefat fixed pages" style="width:95%"> <thead> <tr> <th scope="col" id="id" style="width:30px" ><span>ID</span><span class="sorting-indicator"></span></th> <th scope="col" id="name" style="width:85px" ><span><?php echo __("Name", "product-catalog"); ?> </span><span class="sorting-indicator"></span></th> <th scope="col" id="prod_count" style="width:75px;" ><span><?php echo __("Images", "product-catalog"); ?> </span><span class="sorting-indicator"></span></th> <th style="width:40px"><?php echo __("Delete", "product-catalog"); ?> </th> </tr> </thead> <tbody> <?php $trcount = 1; for ($i = 0; $i < count($rows); $i++) { $trcount++; $ka0 = 0; $ka1 = 0; if (isset($rows[$i - 1]->id)) { if ($rows[$i]->sl_width == $rows[$i - 1]->sl_width) { $x1 = $rows[$i]->id; $x2 = $rows[$i - 1]->id; $ka0 = 1; } else { $jj = 2; while (isset($rows[$i - $jj])) { if ($rows[$i]->sl_width == $rows[$i - $jj]->sl_width) { $ka0 = 1; $x1 = $rows[$i]->id; $x2 = $rows[$i - $jj]->id; break; } $jj++; } } if ($ka0) { $move_up = '<span><a href="#reorder" onclick="return listItemTask(\'' . $x1 . '\',\'' . $x2 . '\')" title="Move Up"> <img src="' . plugins_url('images/uparrow.png', __FILE__) . '" width="16" height="16" border="0" alt="Move Up"></a></span>'; } else { $move_up = ""; } } else { $move_up = ""; } if (isset($rows[$i + 1]->id)) { if ($rows[$i]->sl_width == $rows[$i + 1]->sl_width) { $x1 = $rows[$i]->id; $x2 = $rows[$i + 1]->id; $ka1 = 1; } else { $jj = 2; while (isset($rows[$i + $jj])) { if ($rows[$i]->sl_width == $rows[$i + $jj]->sl_width) { $ka1 = 1; $x1 = $rows[$i]->id; $x2 = $rows[$i + $jj]->id; break; } $jj++; } } if ($ka1) { $move_down = '<span><a href="#reorder" onclick="return listItemTask(\'' . $x1 . '\',\'' . $x2 . '\')" title="Move Down"> <img src="' . plugins_url('images/downarrow.png', __FILE__) . '" width="16" height="16" border="0" alt="Move Down"></a></span>'; } else { $move_down = ""; } } $uncat = $rows[$i]->par_name; if (isset($rows[$i]->prod_count)) { $pr_count = $rows[$i]->prod_count; } else { $pr_count = 0; } ?> <tr <?php if ($trcount % 2 == 0) { echo 'class="has-background"'; } ?> > <td><?php echo $rows[$i]->id; ?> </td> <td><a href="admin.php?page=catalogs_huge_it_catalog&task=edit_cat&id=<?php echo $rows[$i]->id; ?> "><?php echo esc_html(stripslashes($rows[$i]->name)); ?> </a></td> <td>(<?php if (!$pr_count) { echo '0'; } else { echo $rows[$i]->prod_count; } ?> )</td> <td><a href="admin.php?page=catalogs_huge_it_catalog&task=remove_cat&id=<?php echo $rows[$i]->id; ?> ">Delete</a></td> </tr> <?php } ?> </tbody> </table> <input type="hidden" name="oreder_move" id="oreder_move" value="" /> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo $_POST['asc_or_desc']; } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo $_POST['order_by']; } ?> " /> <input type="hidden" name="saveorder" id="saveorder" value="" /> <?php ?> </form> </div> </div> </div> <?php }
function html_select_video_admin($rows, $pageNav, $sort, $tags) { ?> <script type="text/javascript"> function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function submitbutton(pressbutton) { var form = document.admin_form; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } submitform( pressbutton ); } function tableOrdering( order, dir, task ) { var form = document.admin_form; form.filter_order_video.value = order; form.filter_order_Dir_video.value = dir; submitform( task ); } function xxx() { var VIDS =[]; var title =[]; var type =[]; var url =[]; var thumb =[]; var trackid =[]; for(i=0; i<<?php echo count($rows); ?> ; i++) if(document.getElementById("v"+i)) if(document.getElementById("v"+i).checked) { VIDS.push(document.getElementById("v"+i).value); title.push(document.getElementById("title_"+i).value); type.push(document.getElementById("type_"+i).value); url.push(document.getElementById("url_"+i).value); thumb.push(document.getElementById("thumb_"+i).value); trackid.push(document.getElementById("trackId_"+i).value); } window.parent.jSelectVideoS(VIDS, title, type, url, thumb, trackid); } function reset_all() { document.getElementById('search_video').value=''; <?php if ($tags) { foreach ($tags as $tag) { ?> document.getElementById('param_<?php echo $tag->id; ?> ').value=''; <?php } } ?> this.form.submit(); } function checkAll( n, fldName ) { if (!fldName) { fldName = 'cb'; } var f = document.admin_form; var c = f.toggle.checked; var n2 = 0; for (i=0; i < n; i++) { cb = eval( 'f.' + fldName + '' + i ); if (cb) { cb.checked = c; n2++; } } if (c) { document.adminForm.boxchecked.value = n2; } else { document.adminForm.boxchecked.value = 0; } } </script> <form action="<?php echo admin_url('admin-ajax.php?action=spiderVeideoPlayerselectvideo'); ?> " method="post" name="admin_form" id="admin_form"> <table> <tr> <td align="left"> <?php echo 'Title'; ?> : </td> <td> <input type="text" name="search_video" id="search_video" value="<?php if (isset($_POST["search_video"])) { echo esc_js(esc_html(stripslashes($_POST["search_video"]))); } ?> " class="text_area" /> </td> <td rowspan="50"> <button ><?php echo 'Go'; ?> </button> </td> <td rowspan="50"> <button onclick="reset_all()"><?php echo 'Reset'; ?> </button> </td> <td align="right" width="100%"> <button onclick="xxx();">+ Add VIDEO +</button> </td> </tr> <?php if ($tags) { foreach ($tags as $tag) { ?> <tr> <td align="left"> <?php echo $tag->name; ?> : </td> <td align="left"> <input type="text" name="param_<?php echo $tag->id; ?> " id="param_<?php echo $tag->id; ?> " value="<?php if (isset($_POST["param_" . $tag->id])) { echo esc_js(esc_html(stripslashes($_POST["param_" . $tag->id]))); } ?> " class="text_area" /> </td> </tr> <?php } } ?> </table> <?php print_html_nav($pageNav['total'], $pageNav['limit']); ?> <table class="wp-list-table widefat fixed pages" style="width:95% !important" align="center"> <thead> <tr> <th width="50px"><?php echo '#'; ?> </th> <th scope="col" name="toggle" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?> , 'v')"></th> <th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:50px" ><a href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>ID</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "title") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:120px" ><a href="javascript:ordering('title',<?php if ($sort["sortid_by"] == "title") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Title</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="type" class="<?php if ($sort["sortid_by"] == "type") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:80px" ><a href="javascript:ordering('type',<?php if ($sort["sortid_by"] == "type") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Type</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="URL" class="<?php if ($sort["sortid_by"] == "url") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('url',<?php if ($sort["sortid_by"] == "url") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>URL</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="UrlHD" class="<?php if ($sort["sortid_by"] == "urlHD") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('urlHD',<?php if ($sort["sortid_by"] == "urlHD") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>UrlHD</span><span class="sorting-indicator"></span></a></th><th scope="col" id="thumb" class="<?php if ($sort["sortid_by"] == "thumb") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:120px" ><a href="javascript:ordering('thumb',<?php if ($sort["sortid_by"] == "thumb") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Thumb</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="published" class="<?php if ($sort["sortid_by"] == "published") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:120px" ><a href="javascript:ordering('published',<?php if ($sort["sortid_by"] == "published") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Published</span><span class="sorting-indicator"></span></a></th> </tr> </thead> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row = $rows[$i]; ?> <tr class="<?php echo "row{$k}"; ?> "> <td class="check-column" align="center"><?php echo $i + 1; ?> </td> <th class="check-column"> <input type="checkbox" name="post[]" class="checkbox" id="v<?php echo $i; ?> " value="<?php echo $row->id; ?> " /> <input type="hidden" id="title_<?php echo $i; ?> " value="<?php echo htmlspecialchars($row->title); ?> " /> <input type="hidden" id="type_<?php echo $i; ?> " value="<?php echo $row->type; ?> " /> <input type="hidden" id="url_<?php echo $i; ?> " value="<?php echo htmlspecialchars($row->url); ?> " /> <input type="hidden" id="thumb_<?php echo $i; ?> " value="<?php echo htmlspecialchars($row->thumb); ?> " /> <input type="hidden" id="trackId_<?php echo $i; ?> " value="<?php echo $row->id; ?> " /> </th> <td align="center"><?php echo $row->id; ?> </td> <td><a style="cursor: pointer;" onclick="window.parent.jSelectVideoS(['<?php echo $row->id; ?> '],['<?php echo htmlspecialchars(addslashes($row->title)); ?> '],['<?php echo $row->type; ?> '],['<?php echo htmlspecialchars(addslashes($row->url)); ?> '],['<?php echo htmlspecialchars(addslashes($row->thumb)); ?> '],['<?php echo $row->id; ?> '])"><?php echo $row->title; ?> </a></td> <td><?php echo $row->type; ?> </td> <td><?php echo $row->url; ?> </td> <td><?php echo $row->urlHD; ?> </td> <td><img style="max-height:60px; max-width:60px" src="<?php echo $row->thumb; ?> " /></td> <td align="center"><?php echo $row->published; ?> </td> </tr> <?php $k = 1 - $k; } ?> </table> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo esc_js(esc_html(stripslashes($_POST['asc_or_desc']))); } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo esc_js(esc_html(stripslashes($_POST['order_by']))); } ?> " /> <input type="hidden" name="option" value="com_Spider_Video_Player"> <input type="hidden" name="task" value="select_video"> <input type="hidden" name="boxchecked" value="0"> </form> <?php }
function html_show_video($rows, $pageNav, $sort, $playlists) { global $wpdb; ?> <script language="javascript"> function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function submit_form_id(x) { var val=x.options[x.selectedIndex].value; document.getElementById("id_for_playlist").value=val; document.getElementById("admin_form").submit(); } function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if( keyCode == 13 ) { if(!e) var e = window.event; e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } </script> <form method="post" onkeypress="doNothing()" action="admin.php?page=Spider_Video_Player_Videos" id="admin_form" name="admin_form"> <?php $sp_vid_nonce = wp_create_nonce('nonce_sp_vid'); ?> <table cellspacing="10" width="100%"> <tr> <td width="100%" style="font-size:14px; font-weight:bold"><a href="https://web-dorado.com/spider-video-player-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br /> This section allows you to upload videos or add videos from the Internet. <a href="https://web-dorado.com/spider-video-player-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">More...</a></td> </tr> <tr> <td style="width:80px"> <?php echo "<h2 style=\"float:left\">" . 'Videos' . "</h2>"; ?> <input type="button" style="float:left; position:relative; top:10px; margin-left:20px" class="button-secondary action" value="Add a Video" name="custom_parametrs" onclick="window.location.href='admin.php?page=Spider_Video_Player_Videos&task=add_video'" /> </td> <td colspan="7" align="right" style="font-size:16px;"> <a href="https://web-dorado.com/files/fromSVP.php" target="_blank" style="color:red; text-decoration:none;"> <img src="<?php echo plugins_url("images/header.png", __FILE__); ?> " border="0" alt="https://web-dorado.com/files/fromSVP.php" width="215"> </a> </td> </tr> </table> <div class="tablenav top" style="width:95%"> <div class="alignleft actions" style="width:150px;"> <label for="form_id" style="font-size:14px">Filter by a playlist: </label> </div> <div class="alignleft actions"> <select name="form_id" id="form_id" onchange="submit_form_id(this)" style="width:130px"> <option value="0" <?php $zxc = 'selected="selected"'; if (isset($_POST["id_for_playlist"])) { if ($_POST["id_for_playlist"] > 0) { $zxc = ""; } } echo $zxc; ?> > Select a Playlist </option> <?php foreach ($playlists as $playlist) { ?> <option value="<?php echo $playlist->id; ?> " <?php if (isset($_POST["id_for_playlist"])) { if ($_POST["id_for_playlist"] == $playlist->id) { echo 'selected="selected"'; } } ?> ><?php echo $playlist->title; ?> </option> <?php } ?> </select> </div> </div> <label for="search_events_by_title" style="font-size:14px">Title: </label> <?php $serch_value = ''; if (isset($_POST['serch_or_not'])) { if ($_POST['serch_or_not'] == "search") { $serch_value = esc_js(esc_html(stripslashes($_POST['search_events_by_title']))); } else { $serch_value = ""; } } $serch_fields = '<div class="alignleft actions" style="width:180px;"> <input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()"> </div> <div class="alignleft actions"> <input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action"> <input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=Spider_Video_Player_Videos\'" class="button-secondary action"> </div>'; print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields); ?> <table class="wp-list-table widefat fixed pages" style="width:95%"> <thead> <TR style="background:#E8E8E8"> <th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:50px" ><a href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>ID</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "title") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:150px" ><a href="javascript:ordering('title',<?php if ($sort["sortid_by"] == "title") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Title</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="type" class="<?php if ($sort["sortid_by"] == "type") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:80px" ><a href="javascript:ordering('type',<?php if ($sort["sortid_by"] == "type") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Type</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="URL" class="<?php if ($sort["sortid_by"] == "url") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('url',<?php if ($sort["sortid_by"] == "url") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>URL</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="URL_html5" class="<?php if ($sort["sortid_by"] == "urlHtml5") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('urlHtml5',<?php if ($sort["sortid_by"] == "urlHtml5") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>URL html5</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="UrlHD" class="<?php if ($sort["sortid_by"] == "urlHD") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('urlHD',<?php if ($sort["sortid_by"] == "urlHD") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>UrlHD</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="UrlHD_html5" class="<?php if ($sort["sortid_by"] == "urlhdHtml5") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('urlhdHtml5',<?php if ($sort["sortid_by"] == "urlhdHtml5") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>UrlHD html5</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="thumb" class="<?php if ($sort["sortid_by"] == "thumb") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:80px" ><a href="javascript:ordering('thumb',<?php if ($sort["sortid_by"] == "thumb") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Thumb</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="published" class="<?php if ($sort["sortid_by"] == "published") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:120px" ><a href="javascript:ordering('published',<?php if ($sort["sortid_by"] == "published") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Published</span><span class="sorting-indicator"></span></a></th> <th style="width:80px">Edit</th> <th style="width:80px">Delete</th> </TR> </thead> <tbody> <?php for ($i = 0; $i < count($rows); $i++) { ?> <tr> <td><?php echo $rows[$i]->id; ?> </td> <td><a href="admin.php?page=Spider_Video_Player_Videos&task=edit_video&id=<?php echo $rows[$i]->id; ?> "><?php echo $rows[$i]->title; ?> </a></td> <td><?php if ($rows[$i]->type == "0") { echo "rtmp"; } else { echo $rows[$i]->type; } ?> </td> <td><?php echo $rows[$i]->url; ?> </td> <td><?php echo $rows[$i]->urlHtml5; ?> </td> <td><?php echo $rows[$i]->urlHD; ?> </td> <td><?php echo $rows[$i]->urlHDHtml5; ?> </td> <td><img width="50" src="<?php echo $rows[$i]->thumb; ?> " title="<?php echo $rows[$i]->thumb; ?> " style="border:none;"></td> <td><a <?php if (!$rows[$i]->published) { echo 'style="color:#C00"'; } ?> href="admin.php?page=Spider_Video_Player_Videos&task=published&id=<?php echo $rows[$i]->id; ?> &_wpnonce=<?php echo $sp_vid_nonce; ?> "><?php if ($rows[$i]->published) { echo "Yes"; } else { echo "No"; } ?> </a></td> <td><a href="admin.php?page=Spider_Video_Player_Videos&task=edit_video&id=<?php echo $rows[$i]->id; ?> ">Edit</a></td> <td><a href="#" href-data="admin.php?page=Spider_Video_Player_Videos&task=remove_video&id=<?php echo $rows[$i]->id; ?> &_wpnonce=<?php echo $sp_vid_nonce; ?> ">Delete</a></td> </tr> <?php } ?> </tbody> </table> <?php wp_nonce_field('nonce_sp_vid', 'nonce_sp_vid'); ?> <input type="hidden" name="id_for_playlist" id="id_for_playlist" value="<?php if (isset($_POST['id_for_playlist'])) { echo esc_js(esc_html(stripslashes($_POST['id_for_playlist']))); } ?> " /> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo esc_js(esc_html(stripslashes($_POST['asc_or_desc']))); } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo esc_js(esc_html(stripslashes($_POST['order_by']))); } ?> " /> <?php ?> </form> <?php }
function html_spider_cat_prod_rating($rows, $pageNav, $sort, $id) { global $wpdb; $title = $wpdb->get_var($wpdb->prepare("SELECT `name` FROM " . $wpdb->prefix . "spidercatalog_products WHERE id=%d", $id)); ?> <script language="javascript"> function ordering(name, as_or_desc) { document.getElementById('asc_or_desc').value = as_or_desc; document.getElementById('order_by').value = name; document.getElementById('admin_form').action = document.getElementById('admin_form').action + '&task=edit_rating'; document.getElementById('admin_form').submit(); } function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if (keyCode == 13) { if (!e) var e = window.event; e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } function delete_rating() { document.getElementById('admin_form').action = document.getElementById('admin_form').action + '&task=delete_ratings' document.getElementById('admin_form').submit(); } function submit_button(presbutton) { document.getElementById('admin_form').action = document.getElementById('admin_form').action + '&task=' + presbutton; document.getElementById('admin_form').submit(); } </script> <form method="post" action="admin.php?page=Products_Spider_Catalog&id=<?php echo $id; ?> " onkeypress="doNothing()" id="admin_form" name="admin_form"> <?php $sp_cat_nonce = wp_create_nonce('nonce_sp_cat'); ?> <table cellspacing="10" width="100%"> <tr></tr> <tr> <td style="width:100%"> <?php echo "<h2>" . 'Review - ' . $title . "</h2>"; ?> </td> <td style="width:90px; text-align:right;"><p class="submit" style="padding:0px; text-align:left"><input type="button" value="Save" name="custom_parametrs" onclick="submit_button('s_p_save_rating')"/></p></td> <td style="width:90px; text-align:right;"><p class="submit" style="padding:0px; text-align:left"><input type="button" value="Apply" name="custom_parametrs" onclick="submit_button('s_p_apply_rating')"/></p></td> <td style="width:90px; text-align:right;"><p class="submit" style="padding:0px; text-align:left"><input type="button" value="Cancel" name="custom_parametrs" onclick="window.location.href='admin.php?page=Products_Spider_Catalog&task=edit_prad&id=<?php echo $id; ?> '"/> </p></td> <td style="text-align:right;font-size:16px;padding:20px; padding-right:50px"> </td> </tr> </table> <?php print_html_nav($pageNav['total'], $pageNav['limit']); ?> <table class="wp-list-table widefat" style="width:95%"> <thead> <tr> <th scope="col" id="cb" class="manage-column column-cb check-column"><input type="checkbox"></th> <th scope="col" id="remote_ip" class="<?php if ($sort["sortid_by"] == "remote_ip") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:110px"><a href="javascript:ordering('remote_ip',<?php if ($sort["sortid_by"] == "remote_ip") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Remote Ip</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="vote_value" class="<?php if ($sort["sortid_by"] == "vote_value") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=""><a href="javascript:ordering('vote_value',<?php if ($sort["sortid_by"] == "vote_value") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Vote Value</span><span class="sorting-indicator"></span></a></th> <th style="width:80px"><a href="javascript:delete_rating()">Delete</a></th> </tr> </thead> <tbody> <?php for ($i = 0; $i < count($rows); $i++) { ?> <tr> <th scope="row" class="check-column"><input type="checkbox" name="post[]" value="<?php echo $rows[$i]->id; ?> "></th> <td><?php echo $rows[$i]->remote_ip; ?> </td> <td><select name="vote_<?php echo $rows[$i]->id; ?> " id="vote_<?php echo $rows[$i]->id; ?> " class="inputbox"> <option <?php if ($rows[$i]->vote_value == 1) { echo 'selected="selected"'; } ?> value="1">1 </option> <option <?php if ($rows[$i]->vote_value == 2) { echo 'selected="selected"'; } ?> value="2">2 </option> <option <?php if ($rows[$i]->vote_value == 3) { echo 'selected="selected"'; } ?> value="3">3 </option> <option <?php if ($rows[$i]->vote_value == 4) { echo 'selected="selected"'; } ?> value="4">4 </option> <option <?php if ($rows[$i]->vote_value == 5) { echo 'selected="selected"'; } ?> value="5">5 </option> </select></td> <td> <a href="admin.php?page=Products_Spider_Catalog&task=delete_rating&id=<?php echo $id; ?> &del_id=<?php echo $rows[$i]->id; ?> &_wpnonce=<?php echo $sp_cat_nonce; ?> ">Delete</a> </td> </tr> <?php } ?> </tbody> </table> <?php wp_nonce_field('nonce_sp_cat', 'nonce_sp_cat'); ?> <input type="hidden" name="asc_or_desc" id="asc_or_desc" <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo esc_js(esc_html(stripslashes($_POST['asc_or_desc']))); } ?> "/> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo esc_js(esc_html(stripslashes($_POST['order_by']))); } ?> "/> <?php ?> </form> <?php }
function html_show_submits($rows, $forms, $lists, $pageNav, $labels, $label_titles, $rows_ord, $filter_order_Dir, $form_id, $labels_id, $sorted_labels_type, $total_entries, $total_views, $where, $where_choices, $sort) { $label_titles_copy = $label_titles; global $wpdb; $n = count($rows); $m = count($labels); $group_id_s = array(); $rows_ord_none = array(); if (count($rows_ord) > 0 and $m) { for ($i = 0; $i < count($rows_ord); $i++) { $row = $rows_ord[$i]; if (!in_array($row->group_id, $group_id_s)) { array_push($group_id_s, $row->group_id); } } } ?> <style> .calendar .button { display: table-cell !important; } </style> <script type="text/javascript"> function tableOrdering(order, dir, task) { var form = document.admin_form; form.filter_order2.value = order; form.filter_order_Dir2.value = dir; submitform(task); } function ordering(name, as_or_desc) { document.getElementById('asc_or_desc').value = as_or_desc; document.getElementById('order_by').value = name; document.getElementById('admin_form').submit(); } function renderColumns() { allTags = document.getElementsByTagName('*'); for (curTag in allTags) { if (typeof(allTags[curTag].className) != "undefined") if (allTags[curTag].className.indexOf('_fc') > 0) { curLabel = allTags[curTag].className.replace('_fc', ''); if (document.forms.admin_form.hide_label_list.value.indexOf('@' + curLabel + '@') >= 0) allTags[curTag].style.display = 'none'; else allTags[curTag].style.display = ''; } if (typeof(allTags[curTag].id) != "undefined") { if (allTags[curTag].id.indexOf('_fc') > 0) { curLabel = allTags[curTag].id.replace('_fc',''); if (document.forms.admin_form.hide_label_list.value.indexOf('@' + curLabel + '@') >= 0) { allTags[curTag].style.display = 'none'; } else { allTags[curTag].style.display = ''; } } } } } function clickLabChB(label, ChB) { document.forms.admin_form.hide_label_list.value = document.forms.admin_form.hide_label_list.value.replace('@' + label + '@', ''); if (document.forms.admin_form.hide_label_list.value == '') { document.getElementById('ChBAll').checked = true; } if (!(ChB.checked)) { document.forms.admin_form.hide_label_list.value += '@' + label + '@'; document.getElementById('ChBAll').checked = false; } renderColumns(); } function toggleChBDiv(b) { if (b) { sizes = window.getSize().size; document.getElementById("sbox-overlay").style.width = sizes.x + "px"; document.getElementById("sbox-overlay").style.height = sizes.y + "px"; document.getElementById("ChBDiv").style.left = Math.floor((sizes.x - 350) / 2) + "px"; document.getElementById("ChBDiv").style.display = "block"; document.getElementById("sbox-overlay").style.display = "block"; } else { document.getElementById("ChBDiv").style.display = "none"; document.getElementById("sbox-overlay").style.display = "none"; } } function clickLabChBAll(ChBAll) { <?php if (isset($labels)) { $templabels = array_merge(array('submitid', 'submitdate', 'submitterip'), $labels_id); $label_titles = array_merge(array('ID', 'Submit date', "Submitter's IP Address"), $label_titles); } ?> if (ChBAll.checked) { document.forms.admin_form.hide_label_list.value = ''; for (i = 0; i <= ChBAll.form.length; i++) if (typeof(ChBAll.form[i]) != "undefined") if (ChBAll.form[i].type == "checkbox") ChBAll.form[i].checked = true; } else { document.forms.admin_form.hide_label_list.value = '@<?php echo implode($templabels, '@@'); ?> @'; for (i = 0; i <= ChBAll.form.length; i++) if (typeof(ChBAll.form[i]) != "undefined") if (ChBAll.form[i].type == "checkbox") ChBAll.form[i].checked = false; } renderColumns(); } function remove_all() { document.getElementById('startdate').value = ''; document.getElementById('enddate').value = ''; document.getElementById('ip_search').value = ''; <?php $n = count($rows); for ($i = 0; $i < count($labels); $i++) { echo "document.getElementById('" . $form_id . '_' . $labels_id[$i] . "_search').value='';\n\t"; } ?> } function show_hide_filter() { if (document.getElementById('fields_filter').style.display == "none") { document.getElementById('fields_filter').style.display = ''; document.getElementById('filter_img').src = '<?php echo plugins_url('images/filter_hide.png', __FILE__); ?> '; } else { document.getElementById('fields_filter').style.display = "none"; document.getElementById('filter_img').src = '<?php echo plugins_url('images/filter_show.png', __FILE__); ?> '; } } function submit_del(href_in) { document.getElementById('admin_form').action = href_in; document.getElementById('admin_form').submit(); } <!-- function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel_theme') { submitform(pressbutton); return; } if (document.getElementById('title').value == '') { alert('The theme must have a title') return; } submitform(pressbutton); } function submitform(pressbutton) { document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton; document.getElementById('adminForm').submit(); } //--> function change_width() { width = parseInt(document.getElementById('width').value) + 45 + parseInt(document.getElementById('border_width').value); height = 550; document.getElementById('spider_calendar_preview').href = "http://localhost/wordpress/wp-content/plugins/spider-calendar/preview.php?TB_iframe=1&tbWidth=" + width + "&tbHeight=" + height; } var thickDims, tbWidth, tbHeight; jQuery(document).ready(function ($) { thickDims = function () { var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h; w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 200; h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 200; if (tbWindow.size()) { tbWindow.width(w).height(h); $('#TB_iframeContent').width(w).height(h - 27); tbWindow.css({'margin-left':'-' + parseInt((w / 2), 10) + 'px'}); if (typeof document.body.style.maxWidth != 'undefined') tbWindow.css({'top':(H - h) / 2, 'margin-top':'0'}); } }; thickDims(); $(window).resize(function () { thickDims() }); $('a.thickbox-preview').click(function () { tb_click.call(this); var alink = $(this).parents('.available-theme').find('.activatelink'), link = '', href = $(this).attr('href'), url, text; if (tbWidth = href.match(/&tbWidth=[0-9]+/)) tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10); else tbWidth = $(window).width() - 90; if (tbHeight = href.match(/&tbHeight=[0-9]+/)) tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10); else tbHeight = $(window).height() - 60; if (alink.length) { url = alink.attr('href') || ''; text = alink.attr('title') || ''; link = ' <a href="' + url + '" target="_top" class="tb-theme-preview-link">' + text + '</a>'; } else { text = $(this).attr('title') || ''; link = ' <span class="tb-theme-preview-link">' + text + '</span>'; } $('#TB_title').css({'background-color':'#222', 'color':'#dfdfdf'}); $('#TB_closeAjaxWindow').css({'float':'left'}); $('#TB_ajaxWindowTitle').css({'float':'right'}).html(link); $('#TB_iframeContent').width('100%'); thickDims(); return false; }); // Theme details $('.theme-detail').click(function () { $(this).siblings('.themedetaildiv').toggle(); return false; }); }); </script> <style> .reports { border: 1px solid #DEDEDE; border-radius: 11px; background-color: #F0F0F0; text-align: center; width: 100px; } .bordered { border-radius: 8px } .simple_table { background-color: transparent; !important } </style> <?php if (isset($labels)) { ?> <div id="sbox-overlay" style="z-index: 65555; position: fixed; top: 0px; left: 0px; visibility: visible; zoom: 1; background-color:#000000; opacity: 0.7; filter: alpha(opacity=70); display:none;" onclick="toggleChBDiv(false)"></div> <div style="background-color:#FFFFFF; width: 350px; height: 350px; overflow-y: scroll; padding: 20px; position: fixed; top: 100px;display:none; border:2px solid #AAAAAA; z-index:65556" id="ChBDiv"> <form action="#"> <p style="font-weight:bold; font-size:18px;margin-top: 0px;"> Select Columns </p> <input type="checkbox" <?php if ($lists['hide_label_list'] === '') { echo 'checked="checked"'; } ?> onclick="clickLabChBAll(this)" id="ChBAll"/>All</br> <?php foreach ($templabels as $key => $curlabel) { if (strpos($lists['hide_label_list'], '@' . $curlabel . '@') === FALSE) { echo '<input type="checkbox" checked="checked" onclick="clickLabChB(\'' . $curlabel . '\', this)" />' . stripslashes($label_titles[$key]) . '<br />'; } else { echo '<input type="checkbox" onclick="clickLabChB(\'' . $curlabel . '\', this)" />' . stripslashes($label_titles[$key]) . '<br />'; } } $ispaypal = FALSE; for ($i = 0; $i < count($labels); $i++) { if ($sorted_labels_type[$i] == 'type_paypal_payment_status') { $ispaypal = TRUE; } } ?> <br/> <div style="text-align:center;"> <input type="button" onclick="toggleChBDiv(false);" value="Done"/> </div> </form> </div> <?php } ?> <div style="font-size:14px; font-weight:bold"> <a href="http://web-dorado.com/wordpress-form-maker-guide-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a> <br /> This section allows you to view and manage form submissions. <a href="http://web-dorado.com/wordpress-form-maker-guide-6.html" target="_blank" style="color:blue; text-decoration:none;">More...</a> </div> <form action="admin.php?page=Form_maker_Submits" method="post" style="" id="admin_form" name="admin_form"> <input type="hidden" name="option" value="com_formmaker"> <input type="hidden" name="task" value="submits"> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo esc_html($_POST['asc_or_desc']); } ?> "> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo esc_html($_POST['order_by']); } ?> "> <br/> <table width="95%"> <tr> <td colspan="11"> <div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:100%"> <a href="http://web-dorado.com/files/fromFormMaker.php" target="_blank" style="color:red; text-decoration:none;"> <img src="<?php echo plugins_url('images/header.png', __FILE__); ?> " border="0" alt="www.web-dorado.com" width="215"><br> Get the full version </a> </div> </td> </tr> <tr style="line-height:inherit !important;"> <td align="left" width="300"> Select a form: <select name="form_id" id="form_id" onchange="if(document.getElementById('startdate'))remove_all();document.admin_form.submit();"> <option value="0" selected="selected"> Select a Form</option> <?php $option = 'com_formmaker'; if ($forms) { for ($i = 0, $n = count($forms); $i < $n; $i++) { $form = $forms[$i]; if ($form_id == $form->id) { echo "<option value='" . $form->id . "' selected='selected'>" . $form->title . "</option>"; $form_title = $form->title; } else { echo "<option value='" . $form->id . "' >" . $form->title . "</option>"; } } } ?> </select> </td> <?php if (isset($form_id) and $form_id > 0) { ?> <td class="reports"><strong>Entries</strong><br/><?php echo $total_entries; ?> </td> <td class="reports"><strong>Views</strong><br/><?php echo $total_views; ?> </td> <td class="reports"><strong>Conversion Rate</strong><br/><?php if ($total_views) { echo round($total_entries / $total_views * 100, 2) . '%'; } else { echo '0%'; } ?> </td> <td style="font-size:36px;text-align:center;line-height: initial;"> <?php echo $form_title; ?> </td> <td style="text-align:right;" width="300"> Export to <input type="button" value="CSV" onclick="window.location='<?php echo admin_url('admin-ajax.php?action=formmakergeneretecsv'); ?> &form_id=<?php echo $form_id; ?> '"/> <input type="button" value="XML" onclick="window.location='<?php echo admin_url('admin-ajax.php?action=formmakergeneretexml'); ?> &form_id=<?php echo $form_id; ?> '"/> </td> </tr> <tr> <td colspan=5> <br/> <input type="hidden" name="hide_label_list" value="<?php echo $lists['hide_label_list']; ?> "/> <img src="<?php echo plugins_url("images/filter_show.png", __FILE__); ?> " width="40" style="vertical-align:bottom; cursor:pointer" onclick="show_hide_filter()" title="Search by fields" id="filter_img"/> <input type="button" onclick="this.form.submit();" value="Go"/> <input type="button" onclick="remove_all();this.form.submit();" value="Reset"/> </td> <td align="right"> <br/><br/> <?php if (isset($labels)) { echo '<input type="button" onclick="toggleChBDiv(true)" value="Add/Remove Columns" />'; } ?> </td> </tr> <?php } else { echo '<td><br /><br /><br /></td></tr>'; } ?> </table> <?php print_html_nav($pageNav['total'], $pageNav['limit']); ?> <div style="border-radius: 3px 3px 3px 3px;border: 1px solid #F0F0F0; overflow-x:auto; width:95%; "> <table class="wp-list-table widefat fixed posts" style="width:95%; table-layout: inherit !important;"> <thead> <tr> <th width="3%"><?php echo '#'; ?> </th> <th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox"></th> <th width="4%" scope="col" id="submitid_fc" class="submitid_fc <?php if ($sort["sortid_by"] == "group_id") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " <?php if (!(strpos($lists['hide_label_list'], '@submitid@') === FALSE)) { echo 'style="display:none;"'; } ?> ><a href="javascript:ordering('group_id',<?php if ($sort["sortid_by"] == "group_id") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>ID</span><span class="sorting-indicator"></span></a></th><?php ?> <th width="210px" scope="col" id="submitdate_fc" class="submitdate_fc <?php if ($sort["sortid_by"] == "date") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " <?php if (!(strpos($lists['hide_label_list'], '@submitdate@') === FALSE)) { echo 'style="display:none;"'; } ?> ><a href="javascript:ordering('date',<?php if ($sort["sortid_by"] == "date") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Submit date</span><span class="sorting-indicator"></span></a></th><?php ?> <th scope="col" id="submitterip_fc" class="submitterip_fc <?php if ($sort["sortid_by"] == "ip") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " <?php if (!(strpos($lists['hide_label_list'], '@submitterip@') === FALSE)) { echo 'style="display:none;"'; } ?> ><a href="javascript:ordering('ip',<?php if ($sort["sortid_by"] == "ip") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Submitter's IP Address</span><span class="sorting-indicator"></span></a></th><?php $n = count($rows); for ($i = 0; $i < count($labels); $i++) { if (strpos($lists['hide_label_list'], '@' . $labels_id[$i] . '@') === FALSE) { $styleStr = ''; } else { $styleStr = 'display:none;'; } if ($sorted_labels_type[$i] == 'type_address') { switch ($label_titles_copy[$i]) { case 'Street Line': $field_title = __('Street Address', 'form_maker'); break; case 'Street Line2': $field_title = __('Street Address Line 2', 'form_maker'); break; case 'City': $field_title = __('City', 'form_maker'); break; case 'State': $field_title = __('State / Province / Region', 'form_maker'); break; case 'Postal': $field_title = __('Postal / Zip Code', 'form_maker'); break; case 'Country': $field_title = __('Country', 'form_maker'); break; default: $field_title = stripslashes($label_titles_copy[$i]); break; } } else { $field_title = stripslashes($label_titles_copy[$i]); } ?> <th style="<?php echo $styleStr; ?> " id="<?php echo $labels_id[$i] . '_fc'; ?> " class="<?php echo $labels_id[$i] . '_fc'; if ($sort["sortid_by"] == $labels_id[$i] . "_field") { echo $sort["custom_style"] . '"'; } else { echo $sort["default_style"] . '"'; } ?> "><a href="javascript:ordering('<?php echo $labels_id[$i] . "_field"; ?> ',<?php if ($sort["sortid_by"] == $labels_id[$i] . "_field") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span><?php echo $field_title; ?> </span><span class="sorting-indicator"></span></a></th> <?php } ?> <th style="width:80px">Edit</th> <th style="width:80px"><a href="javascript:submit_del('admin.php?page=Form_maker_Submits&task=remov_cheched')">Delete</a></th> </tr> <tr id="fields_filter" style="display:none"> <th width="3%"></th> <th width="3%"></th> <th width="4%" class="submitid_fc" <?php if (!(strpos($lists['hide_label_list'], '@submitid@') === FALSE)) { echo 'style="display:none;"'; } ?> ></th> <th width="150" class="submitdate_fc" style="margin:inherit; <?php if (!(strpos($lists['hide_label_list'], '@submitdate@') === FALSE)) { echo 'display:none;'; } ?> "> <table align="center" style="margin:auto" class="simple_table"> <tr class="simple_table"> <td class="simple_table" style="text-align:left">From:</td> <td style="text-align:center" class="simple_table"><input class="inputbox" type="text" name="startdate" id="startdate" size="15" maxlength="15" value="<?php echo $lists['startdate']; ?> "/></td> <td style="text-align:center" class="simple_table"><input type="reset" style="width:22px" class="button" value="..." onclick="return showCalendar('startdate','%Y-%m-%d');"/> </td> </tr> <tr class="simple_table"> <td style="text-align:left" class="simple_table">To:</td> <td style="text-align:center" class="simple_table"><input class="inputbox" type="text" name="enddate" id="enddate" size="15" maxlength="15" value="<?php echo $lists['enddate']; ?> "/></td> <td style="text-align:center" class="simple_table"><input type="reset" style="width:22px" class="button" value="..." onclick="return showCalendar('enddate','%Y-%m-%d');"/> </td> </tr> </table> </th> <th width="100" class="submitterip_fc" <?php if (!(strpos($lists['hide_label_list'], '@submitterip@') === FALSE)) { echo 'style="display:none;"'; } ?> > <input type="text" name="ip_search" id="ip_search" value="<?php echo $lists['ip_search']; ?> " onChange="this.form.submit();"/> </th> <?php $n = count($rows); $ka_fielderov_search = FALSE; if ($lists['ip_search'] || $lists['startdate'] || $lists['enddate']) { $ka_fielderov_search = TRUE; } for ($i = 0; $i < count($labels); $i++) { if (strpos($lists['hide_label_list'], '@' . $labels_id[$i] . '@') === FALSE) { $styleStr = ''; } else { $styleStr = 'style="display:none;"'; } if (!$ka_fielderov_search) { if ($lists[$form_id . '_' . $labels_id[$i] . '_search']) { $ka_fielderov_search = TRUE; } } if ($sorted_labels_type[$i] != 'type_mark_map') { echo '<th class="' . $labels_id[$i] . '_fc" ' . $styleStr . '>' . '<input name="' . $form_id . '_' . $labels_id[$i] . '_search" id="' . $form_id . '_' . $labels_id[$i] . '_search" type="text" value="' . $lists[$form_id . '_' . $labels_id[$i] . '_search'] . '" onChange="this.form.submit();" >' . '</th>'; } else { echo '<th class="' . $labels_id[$i] . '_fc" ' . $styleStr . '>' . '</th>'; } } ?> <th></th> <th></th> </tr> </thead> <?php $k = 0; $m = count($labels); $group_id_s = array(); $l = 0; if (count($rows_ord) > 0 and $m) { for ($i = 0; $i < count($rows_ord); $i++) { $row = $rows_ord[$i]; if (!in_array($row->group_id, $group_id_s)) { array_push($group_id_s, $row->group_id); } } } for ($www = 0, $qqq = count($group_id_s); $www < $qqq; $www++) { $i = $group_id_s[$www]; $temp = array(); for ($j = 0; $j < $n; $j++) { $row = $rows[$j]; if ($row->group_id == $i) { array_push($temp, $row); } } $f = $temp[0]; $date = $f->date; $ip = $f->ip; $link = "admin.php?page=Form_maker_Submits&task=edit_submit&id=" . $f->group_id; ?> <tr class="<?php echo "row{$k}"; ?> "> <td><?php echo $www + 1; ?> </td> <th style="text-align:center" class="check-column"><input type="checkbox" name="post[]" value="<?php echo $f->group_id; ?> "></th> <?php if (strpos($lists['hide_label_list'], '@submitid@') === FALSE) { echo '<td class="submitid_fc"><a href="' . $link . '" >' . $f->group_id . '</a></td>'; } else { echo '<td class="submitid_fc" style="display:none;"><a href="' . $link . '" >' . $f->group_id . '</a></td>'; } if (strpos($lists['hide_label_list'], '@submitdate@') === FALSE) { echo '<td class="submitdate_fc"><a href="' . $link . '" >' . $date . '</a></td>'; } else { echo '<td class="submitdate_fc" style="display:none;"><a href="' . $link . '" >' . $date . '</a></td>'; } if (strpos($lists['hide_label_list'], '@submitterip@') === FALSE) { echo '<td class="submitterip_fc"><a href="' . $link . '" >' . $ip . '</a></td>'; } else { echo '<td class="submitterip_fc" style="display:none;"><a href="' . $link . '" >' . $ip . '</a></td>'; } //print_r($temp); $ttt = count($temp); for ($h = 0; $h < $m; $h++) { $not_label = TRUE; for ($g = 0; $g < $ttt; $g++) { $t = $temp[$g]; if (strpos($lists['hide_label_list'], '@' . $labels_id[$h] . '@') === FALSE) { $styleStr = ''; } else { $styleStr = 'style="display:none;"'; } if ($t->element_label == $labels_id[$h]) { if (strpos($t->element_value, "***map***")) { $map_params = explode('***map***', $t->element_value); $longit = $map_params[0]; $latit = $map_params[1]; echo '<td align="center" class="' . $labels_id[$h] . '_fc" ' . $styleStr . '> <a class="thickbox-preview" href="' . admin_url('admin-ajax.php?action=frommapeditinpopup&long=' . $longit . '&lat=' . $latit) . '&TB_iframe=1&tbWidth=630&tbHeight=650" >' . 'Show on Map' . '</a> </td>'; } else { if (strpos($t->element_value, "*@@url@@*")) { $new_file = str_replace("*@@url@@*", '', str_replace("***br***", '<br>', $t->element_value)); $new_filename = explode('/', $new_file); echo '<td class="' . $labels_id[$h] . '_fc" ' . $styleStr . '><a target="_blank" href="' . $new_file . '">' . $new_filename[count($new_filename) - 1] . "</td>"; } elseif (strpos($t->element_value, "***star_rating***")) { $new_filename = str_replace("***star_rating***", '', $t->element_value); $stars = ""; $new_filename = explode('***', $new_filename); for ($j = 0; $j < $new_filename[1]; $j++) { $stars .= '<img id="' . $t->element_label . '_star_' . $j . '" src="' . plugins_url('images/star_' . $new_filename[2] . '.png', __FILE__) . '" /> '; } for ($k = $new_filename[1]; $k < $new_filename[0]; $k++) { $stars .= '<img id="' . $t->element_label . '_star_' . $k . '" src="' . plugins_url('images/star.png', __FILE__) . '" /> '; } echo '<td align="center" class="' . $labels_id[$h] . '_fc" ' . $styleStr . '>' . $stars . "</td>"; } elseif (strpos($t->element_value, "***matrix***")) { echo '<td align="center" class="' . $labels_id[$h] . '_fc" ' . $styleStr . '> <a class="thickbox-preview" href="' . admin_url('admin-ajax.php?action=show_matrix&matrix_params=' . $t->element_value) . '&TB_iframe=1&tbWidth=630&tbHeight=650">Show Matrix</a> </td>'; } elseif (strpos($t->element_value, "***grading***")) { $new_filename = str_replace("***grading***", '', $t->element_value); $grading = explode(":", $new_filename); $items_count = sizeof($grading) - 1; $items = ""; $total = ""; for ($k = 0; $k < $items_count / 2; $k++) { $items .= $grading[$items_count / 2 + $k] . ": " . $grading[$k] . "</br>"; $total += $grading[$k]; } $items .= "Total: " . $total; echo '<td align="center" class="' . $labels_id[$h] . '_fc" ' . $styleStr . '><pre style="font-family:inherit">' . $items . '</pre></td>'; } else { echo '<td class="' . $labels_id[$h] . '_fc" ' . $styleStr . '><pre style="font-family:inherit">' . str_replace("***br***", '<br>', stripslashes($t->element_value)) . '</pre></td>'; } } $not_label = FALSE; } } if ($not_label) { echo '<td class="' . $labels_id[$h] . '_fc" ' . $styleStr . '></td>'; } } ?> <td> <a href="javascript:submit_del('admin.php?page=Form_maker_Submits&task=edit_submit&id=<?php echo $f->group_id; ?> ')">Edit</a> </td> <td> <a href="javascript:submit_del('admin.php?page=Form_maker_Submits&task=remove_submit&id=<?php echo $f->group_id; ?> ')">Delete</a> </td> </tr> <?php $k = 1 - $k; } ?> </table> </div> <?php foreach ($sorted_labels_type as $key => $label_type) { if ($label_type == "type_checkbox" || $label_type == "type_radio" || $label_type == "type_own_select" || $label_type == "type_country") { ?> <br/> <br/> <strong><?php echo stripslashes($label_titles_copy[$key]); ?> </strong> <br/> <br/> <?php $query = "SELECT element_value FROM " . $wpdb->prefix . "formmaker_submits " . $where_choices . " AND element_label='" . $labels_id[$key] . "'"; $choices = $wpdb->get_results($query); $colors = array('#2CBADE', '#FE6400'); $choices_labels = array(); $choices_count = array(); $all = count($choices); $unanswered = 0; foreach ($choices as $key => $choice) { if ($choice->element_value == '') { $unanswered++; } else { if (!in_array($choice->element_value, $choices_labels)) { array_push($choices_labels, $choice->element_value); array_push($choices_count, 0); } $choices_count[array_search($choice->element_value, $choices_labels)]++; } } array_multisort($choices_count, SORT_DESC, $choices_labels); ?> <table width="95%" style="width:95%" class="wp-list-table widefat fixed posts"> <thead> <tr> <th width="20%">Choices</th> <th>Percentage</th> <th width="10%">Count</th> </tr> </thead> <?php foreach ($choices_labels as $key => $choices_label) { ?> <tr> <td><?php echo str_replace("***br***", '<br>', $choices_label); ?> </td> <td> <div class="bordered" style="width:<?php echo $choices_count[$key] / ($all - $unanswered) * 100; ?> %; height:18px; background-color:<?php echo $colors[$key % 2]; ?> "></div> </td> <td><?php echo $choices_count[$key]; ?> </td> </tr> <?php } if ($unanswered) { ?> <tr> <td colspan="2" align="right">Unanswered</th> <td><strong><?php echo $unanswered; ?> </strong></th> </tr> <?php } ?> <tr> <td colspan="2" align="right"><strong>Total</strong></th> <td><strong><?php echo $all; ?> </strong></th> </tr> </table> <?php } } ?> <input type="hidden" name="boxchecked" value="0"> <input type="hidden" name="filter_order2" value="<?php echo $lists['order']; ?> "/> <input type="hidden" name="filter_order_Dir2" value="<?php echo $lists['order_Dir']; ?> "/> </form> <script> <?php if ($ka_fielderov_search) { ?> document.getElementById('fields_filter').style.display = ''; <?php } ?> </script> <?php }
function html_show_theme($rows, $pageNav, $sort) { global $wpdb; ?> <script language="javascript"> function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if( keyCode == 13 ) { if(!e) var e = window.event; e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } </script> <script language="JavaScript"> </script> <form method="post" onkeypress="doNothing()" action="admin.php?page=contact_form_Themes" id="admin_form" name="admin_form"> <table cellspacing="10" width="95%"> <tr> <td style="width:80px"> <?php echo "<h2>" . 'Themes' . "</h2>"; ?> </td> <td style="width:90px; text-align:right;"><p class="submit" style="padding:0px; text-align:left"><input type="button" value="Add a Theme" name="custom_parametrs" onclick="window.location.href='admin.php?page=contact_form_Themes&task=add_theme'" /></p></td> <td style="text-align:right;font-size:16px;padding:20px; padding-right:50px"> </td> <td colspan="11"><div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:100%"> <a href="http://web-dorado.com/files/fromContactForm.php" target="_blank" style="color:red; text-decoration:none;"> <img src="<?php echo plugins_url('images/header.png', __FILE__); ?> " border="0" alt="www.web-dorado.com" width="215"><br> Get the full version </a> </td> </tr> </table> <?php if (isset($_POST['serch_or_not'])) { if ($_POST['serch_or_not'] == "search") { $serch_value = $_POST['search_events_by_title']; } else { $serch_value = ""; } } else { $serch_value = ""; } $serch_fields = '<div class="alignleft actions" style="width:180px;"> <label for="search_events_by_title" style="font-size:14px">Title: </label> <input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()"> </div> <div class="alignleft actions"> <input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action"> <input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=contact_form_Themes\'" class="button-secondary action"> </div>'; print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields); ?> <table class="wp-list-table widefat fixed pages" style="width:95%"> <thead> <TR> <th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:120px" ><a href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>ID</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "title") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('title',<?php if ($sort["sortid_by"] == "title") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Title</span><span class="sorting-indicator"></span></a></th> <th>Default</th> <th style="width:80px">Edit</th> <th style="width:80px">Delete</th> </TR> </thead> <tbody> <?php for ($i = 0; $i < count($rows); $i++) { ?> <tr> <td><?php echo $rows[$i]->id; ?> </td> <td><a href="admin.php?page=contact_form_Themes&task=edit_theme&id=<?php echo $rows[$i]->id; ?> "><?php echo $rows[$i]->title; ?> </a></td> <td><a <?php if (!$rows[$i]->default) { echo 'style="color:#C00"'; } ?> href="admin.php?page=contact_form_Themes&task=default&id=<?php echo $rows[$i]->id; ?> "><?php if ($rows[$i]->default) { echo "Default"; } else { echo "Not Default"; } ?> </a></td> <td><a href="admin.php?page=contact_form_Themes&task=edit_theme&id=<?php echo $rows[$i]->id; ?> ">Edit</a></td> <td><a href="admin.php?page=contact_form_Themes&task=remove_theme&id=<?php echo $rows[$i]->id; ?> ">Delete</a></td> </tr> <?php } ?> </tbody> </table> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo esc_html($_POST['asc_or_desc']); } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo esc_html($_POST['order_by']); } ?> " /> <?php ?> </form> <?php }
function html_select_pages_for_facebook($rows, $pageNav, $sort) { if (get_bloginfo('version') > 3.3) { ?> <link rel="stylesheet" href="<?php echo bloginfo("url"); ?> /wp-admin/load-styles.php?c=0&dir=ltr&load=admin-bar,wp-admin&ver=7f0753feec257518ac1fec83d5bced6a" type="text/css" media="all"> <?php } else { ?> <link rel="stylesheet" href="<?php echo bloginfo("url"); ?> /wp-admin/load-styles.php?c=1&dir=ltr&load=global,wp-admin&ver=aba7495e395713976b6073d5d07d3b17" type="text/css" media="all"> <?php } ?> <link rel="stylesheet" id="thickbox-css" href="<?php echo bloginfo('url'); ?> /wp-includes/js/thickbox/thickbox.css?ver=20111117" type="text/css" media="all"> <link rel="stylesheet" id="colors-css" href="<?php echo bloginfo('url'); ?> /wp-admin/css/colors-classic.css?ver=20111206" type="text/css" media="all"> <?php global $wpdb; ?> <script type="text/javascript"> function checkAll( n, fldName ) { if (!fldName) { fldName = 'cb'; } var f = document.admin_form; var c = f.toggle.checked; var n2 = 0; for (i=0; i < n; i++) { cb = eval( 'f.' + fldName + '' + i ); if (cb) { cb.checked = c; n2++; } } if (c) { document.admin_form.boxchecked.value = n2; } else { document.admin_form.boxchecked.value = 0; } } function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if( keyCode == 13 ) { if(!e) var e = window.event; e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } function isChecked(isitchecked){ if (isitchecked == true){ document.adminForm.boxchecked.value++; } else { document.adminForm.boxchecked.value--; } } function submitbutton(pressbutton) { var form = document.adminForm; submitform( pressbutton ); } function tableOrdering( order, dir, task ) { var form = document.adminForm; form.filter_order_item.value = order; form.filter_order_Dir_item.value = dir; submitform( task ); } function isChecked(isitchecked){ if (isitchecked == true){ document.adminForm.boxchecked.value++; } else { document.adminForm.boxchecked.value--; } } function item() { var ITEMS =[]; var title =[]; var auto_meta_title =[]; var auto_meta_type =[]; var auto_meta_url =[]; var auto_meta_image =[]; var auto_meta_site_name =[]; var auto_meta_description =[]; var auto_meta_admins =[]; for(i=0; i<<?php echo count($rows); ?> ; i++) if(document.getElementById("p"+i)) if(document.getElementById("p"+i).checked) { ITEMS.push(document.getElementById("p"+i).value); title.push(document.getElementById("title_"+i).value); auto_meta_title.push(document.getElementById("title_"+i).value); auto_meta_type.push(document.getElementById("type_"+i).value); auto_meta_url.push(document.getElementById("url_"+i).value); auto_meta_image.push(document.getElementById("image_"+i).value); auto_meta_site_name.push(document.getElementById("site_name_"+i).value); auto_meta_description.push(document.getElementById("description_"+i).value); auto_meta_admins.push(document.getElementById("admins_"+i).value); } window.parent.jSelectItems(ITEMS, title,1,auto_meta_title,auto_meta_type,auto_meta_url,auto_meta_image,auto_meta_site_name,auto_meta_description,auto_meta_admins); } </script> <form method="post" onkeypress="doNothing()" action="<?php echo admin_url('admin-ajax.php'); ?> ?action=selectpagesforfacebook" id="admin_form" name="admin_form"> <table style="width:95%"> <tbody><tr> <td align="right" </td></td> <td align="right" width="100%"> <button onclick="item();" style="width:98px; height:34px; background:url(<?php echo plugins_url('', __FILE__); ?> /images/add_but.png) no-repeat;border:none;cursor:pointer;"> </button> </td> </tr> </tbody> </table> <?php $serch_value = ''; if (isset($_POST['serch_or_not'])) { if ($_POST['serch_or_not'] == "search") { $serch_value = $_POST['search_events_by_title']; } else { $serch_value = ""; } } $serch_fields = '<div class="alignleft actions" style="width:180px;"> <label for="search_events_by_title" style="font-size:14px">Title: </label> <input type="text" name="search_events_by_title" value="' . sanitize_text_field($serch_value) . '" id="search_events_by_title" onchange="clear_serch_texts()"> </div> <div class="alignleft actions"> <input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action"> <input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=Form_maker_Themes\'" class="button-secondary action"> </div>'; print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields); ?> <table class="wp-list-table widefat fixed pages" style="width:95%"> <thead> <TR> <th width="30" style="text-align: center;"><?php echo '#'; ?> </th> <th width="20" class="manage-column column-cb check-column"> <input type="checkbox" name="toggle" id="toggle" value="" onclick="checkAll(<?php echo count($rows); ?> , 'p')"> </th> <th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=" width:120px;text-align: center; " ><a href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>ID</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "title") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('title',<?php if ($sort["sortid_by"] == "title") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Title</span><span class="sorting-indicator"></span></a></th> </TR> </thead> <tbody> <?php $k = 0; for ($i = 0; $i < count($rows); $i++) { $row = $rows[$i]; if (get_option('page_on_front') && $row->ID == get_option('page_on_front')) { $meta_post_title = get_bloginfo('name'); $meta_post_type = 'website'; $meta_post_url = home_url(); $meta_post_description = get_bloginfo('description'); $meta_post_sitename = get_bloginfo('name'); } else { $meta_post_title = $row->post_title; $meta_post_type = 'article'; $meta_post_url = get_permalink($row->ID); $meta_post_sitename = get_bloginfo('name'); $meta_post_description = ''; } ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="center"><?php echo $i + 1; ?> </td> <td> <input type="checkbox" id="p<?php echo $i; ?> " value="<?php echo $row->ID; ?> " /> <input type="hidden" id="title_<?php echo $i; ?> " value="<?php echo htmlspecialchars($row->post_title); ?> " /> <input type="hidden" id="type_<?php echo $i; ?> " value="<?php echo htmlspecialchars($meta_post_type); ?> " /> <input type="hidden" id="url_<?php echo $i; ?> " value="<?php echo htmlspecialchars($meta_post_url); ?> " /> <input type="hidden" id="image_<?php echo $i; ?> " value="<?php echo htmlspecialchars(''); ?> " /> <input type="hidden" id="site_name_<?php echo $i; ?> " value="<?php echo htmlspecialchars($meta_post_sitename); ?> " /> <input type="hidden" id="description_<?php echo $i; ?> " value="<?php echo htmlspecialchars($meta_post_description); ?> " /> <input type="hidden" id="admins_<?php echo $i; ?> " value="<?php echo htmlspecialchars(''); ?> " /> </td> <td style="text-align: center;"><?php echo $row->ID; ?> </td> <td><a style="cursor: pointer;" onclick="window.parent.jSelectItems(['<?php echo $row->ID; ?> '],['<?php echo htmlspecialchars(addslashes($row->post_title)); ?> '],1,['<?php echo htmlspecialchars(addslashes($meta_post_title)); ?> '],['<?php echo htmlspecialchars(addslashes($meta_post_type)); ?> '],['<?php echo htmlspecialchars(addslashes($meta_post_url)); ?> '],[''],['<?php echo htmlspecialchars(addslashes($meta_post_sitename)); ?> '],['<?php echo htmlspecialchars(addslashes($meta_post_description)); ?> '],[''])"><?php echo $row->post_title; ?> </a></td> </tr> <?php $k = 1 - $k; } ?> </tbody> </table> <input type="hidden" name="boxchecked" value="0"> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo sanitize_text_field($_POST['asc_or_desc']); } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo sanitize_text_field($_POST['order_by']); } ?> " /> </form> <?php die(''); }
function html_showcategories($rows, $pageNav, $sort, $cat_row) { global $wpdb; ?> <script language="javascript"> function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function saveorder() { document.getElementById('saveorder').value="save"; document.getElementById('admin_form').submit(); } function listItemTask(this_id,replace_id) { document.getElementById('oreder_move').value=this_id+","+replace_id; document.getElementById('admin_form').submit(); } function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if( keyCode == 13 ) { if(!e) var e = window.event; e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } </script> <form method="post" onkeypress="doNothing()" action="admin.php?page=Categories_Spider_Catalog" id="admin_form" name="admin_form"> <?php $sp_cat_nonce = wp_create_nonce('nonce_sp_cat'); ?> <table cellspacing="10" width="100%"> <tr> <td width="100%" style="font-size:14px; font-weight:bold"><a href="http://web-dorado.com/spider-catalog-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br /> This section allows you to create categories of products. <a href="http://web-dorado.com/spider-catalog-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">More...</a></td> <td colspan="7" align="right" style="font-size:16px;"> <a href="http://web-dorado.com/files/fromSpiderCatalog.php" target="_blank" style="color:red; text-decoration:none;"> <img src="<?php echo plugins_url("images/header.png", __FILE__); ?> " border="0" alt="http://web-dorado.com/files/fromSpiderCatalog.php" width="215"><br> Get the full version </a> </td> </tr> <tr> <td style="width:80px"> <?php echo "<h2>" . 'Categories' . "</h2>"; ?> </td> <td style="width:90px; text-align:right;"> <p class="submit" style="padding:0px; text-align:left"> <input type="button" value="Add a Category" name="custom_parametrs" onclick="window.location.href='admin.php?page=Categories_Spider_Catalog&task=add_cat'" /> </p> </td> <td style="width:90px; text-align:right;"> <p class="submit" style="padding:0px; text-align:left"> <input type="button" value="Publish" name="custom_parametrs" onclick="document.getElementById('admin_form').action='admin.php?page=Categories_Spider_Catalog&task=publish'; document.getElementById('admin_form').submit();" /> </p> </td> <td style="width:90px; text-align:right;"> <p class="submit" style="padding:0px; text-align:left"> <input type="button" value="Unpublish" name="custom_parametrs" onclick="document.getElementById('admin_form').action='admin.php?page=Categories_Spider_Catalog&task=unpublish'; document.getElementById('admin_form').submit();" /> </p> </td> <td style="width:90px; text-align:right;"> <p class="submit" style="padding:0px; text-align:left"> <input type="button" value="Delete" name="custom_parametrs" onclick="if (confirm('Do you want to delete selected items?')) { document.getElementById('admin_form').action='admin.php?page=Categories_Spider_Catalog&task=delete'; document.getElementById('admin_form').submit(); } else { return false; }" /> </p> </td> <td style="text-align:right;font-size:16px;padding:20px; padding-right:50px"></td> </tr> </table> <?php $serch_value = ''; if (isset($_POST['serch_or_not'])) { if ($_POST['serch_or_not'] == "search") { $serch_value = esc_html(stripslashes($_POST['search_events_by_title'])); } else { $serch_value = ""; } } $serch_fields = '<div class="alignleft actions" style="width:185px;"> <label for="search_events_by_title" style="font-size:14px">Filter: </label> <input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()"> </div> <div class="alignleft actions"> <input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action"> <input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=Categories_Spider_Catalog\'" class="button-secondary action"> </div>'; $serch_fields .= '<select style=" text-align:left;float:right;" name="cat_search" id="cat_search" class="inputbox" onchange="this.form.submit();"> <option value="0"'; if (!isset($_POST['cat_search'])) { $serch_fields .= 'selected="selected"'; } $serch_fields .= '>- Select Parent -</option>'; foreach ($cat_row as $cat_id) { $serch_fields .= '<option value="' . $cat_id->id . '"'; if (isset($_POST['cat_search']) || isset($_GET["catid"]) && $_GET["catid"]) { if (isset($_POST['cat_search']) && $_POST['cat_search'] == $cat_id->id || isset($_GET["catid"]) && $_GET["catid"] == $cat_id->id) { $serch_fields .= 'selected="selected"'; } } $serch_fields .= '>' . esc_html(stripslashes($cat_id->name)) . '</option>'; } $serch_fields .= '</select>'; print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields); ?> <table class="wp-list-table widefat fixed pages" style="width:95%"> <thead> <TR> <th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:30px" ><a href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>ID</span><span class="sorting-indicator"></span></a></th> <th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th> <th scope="col" id="name" class="<?php if ($sort["sortid_by"] == "name") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:85px" ><a href="javascript:ordering('name',<?php if ($sort["sortid_by"] == "name") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Name</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="description" class="<?php if ($sort["sortid_by"] == "description") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="" ><a href="javascript:ordering('description',<?php if ($sort["sortid_by"] == "description") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Description</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="count" class="<?php if ($sort["sortid_by"] == "count") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width: 102px; " ><a href="javascript:ordering('count',<?php if ($sort["sortid_by"] == "count") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Subcategories</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="par_name" class="<?php if ($sort["sortid_by"] == "par_name") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width: 76px;" ><a href="javascript:ordering('par_name',<?php if ($sort["sortid_by"] == "par_name") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Parent</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="prod_count" class="<?php if ($sort["sortid_by"] == "prod_count") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width: 75px;" ><a href="javascript:ordering('prod_count',<?php if ($sort["sortid_by"] == "prod_count") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Products</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="ordering" class="<?php if ($sort["sortid_by"] == "ordering") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:91px" ><a style="display:inline" href="javascript:ordering('ordering',<?php if ($sort["sortid_by"] == "ordering") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Order</span><span class="sorting-indicator"></span></a><div><a style="display:inline" href="javascript:saveorder(1, 'saveorder')" title="Save Order"><img onclick="saveorder(1, 'saveorder')" src="<?php echo plugins_url("images/filesave.png", __FILE__); ?> " alt="Save Order"></a></div></th> <th scope="col" id="published" class="<?php if ($sort["sortid_by"] == "published") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:70px" ><a href="javascript:ordering('published',<?php if ($sort["sortid_by"] == "published") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Published</span><span class="sorting-indicator"></span></a></th> <th style="width:33px">Edit</th> <th style="width:40px">Delete</th> </TR> </thead> <tbody> <?php for ($i = 0; $i < count($rows); $i++) { $ka0 = 0; $ka1 = 0; if (isset($rows[$i - 1]->id)) { if ($rows[$i]->parent == $rows[$i - 1]->parent) { $x1 = $rows[$i]->id; $x2 = $rows[$i - 1]->id; $ka0 = 1; } else { $jj = 2; while (isset($rows[$i - $jj])) { if ($rows[$i]->parent == $rows[$i - $jj]->parent) { $ka0 = 1; $x1 = $rows[$i]->id; $x2 = $rows[$i - $jj]->id; break; } $jj++; } } if ($ka0) { $move_up = '<span><a href="#reorder" onclick="return listItemTask(\'' . $x1 . '\',\'' . $x2 . '\')" title="Move Up"> <img src="' . plugins_url('images/uparrow.png', __FILE__) . '" width="16" height="16" border="0" alt="Move Up"></a></span>'; } else { $move_up = ""; } } else { $move_up = ""; } if (isset($rows[$i + 1]->id)) { if ($rows[$i]->parent == $rows[$i + 1]->parent) { $x1 = $rows[$i]->id; $x2 = $rows[$i + 1]->id; $ka1 = 1; } else { $jj = 2; while (isset($rows[$i + $jj])) { if ($rows[$i]->parent == $rows[$i + $jj]->parent) { $ka1 = 1; $x1 = $rows[$i]->id; $x2 = $rows[$i + $jj]->id; break; } $jj++; } } if ($ka1) { $move_down = '<span><a href="#reorder" onclick="return listItemTask(\'' . $x1 . '\',\'' . $x2 . '\')" title="Move Down"> <img src="' . plugins_url('images/downarrow.png', __FILE__) . '" width="16" height="16" border="0" alt="Move Down"></a></span>'; } else { $move_down = ""; } } else { $move_down = ""; } $uncat = $rows[$i]->par_name; if (isset($rows[$i]->prod_count)) { $pr_count = $rows[$i]->prod_count; } else { $pr_count = 0; } ?> <tr> <td><?php echo $rows[$i]->id; ?> </td> <td class="table_small_col check-column"><input id="check_<?php echo $rows[$i]->id; ?> " name="check_<?php echo $rows[$i]->id; ?> " type="checkbox" /></td> <td><a href="admin.php?page=Categories_Spider_Catalog&task=edit_cat&id=<?php echo $rows[$i]->id; ?> "><?php echo esc_html(stripslashes($rows[$i]->name)); ?> </a></td> <td><?php echo $rows[$i]->description; ?> </td> <td><a href="admin.php?page=Categories_Spider_Catalog&catid=<?php echo $rows[$i]->id; ?> " alt="Subcategories">(<?php echo $rows[$i]->count; ?> )</a></td> <td><?php if (!$uncat) { echo 'Uncategory'; } else { echo $rows[$i]->par_name; } ?> </td> <td><a href="admin.php?page=Products_Spider_Catalog&categoryid=<?php echo $rows[$i]->id; ?> " alt="">(<?php if (!$pr_count) { echo '0'; } else { echo $rows[$i]->prod_count; } ?> )</a></td> <td ><?php echo $move_up . $move_down; ?> <input type="text" name="order_<?php echo $rows[$i]->id; ?> " style="width:40px" value="<?php echo $rows[$i]->ordering; ?> " /></td> <td><a href="admin.php?page=Categories_Spider_Catalog&task=unpublish_cat&id=<?php echo $rows[$i]->id; ?> &_wpnonce=<?php echo $sp_cat_nonce; ?> "<?php if (!$rows[$i]->published) { ?> style="color:#C00;" <?php } ?> ><?php if ($rows[$i]->published) { echo "Yes"; } else { echo "No"; } ?> </a></td> <td ><a href="admin.php?page=Categories_Spider_Catalog&task=edit_cat&id=<?php echo $rows[$i]->id; ?> ">Edit</a></td> <td><a href="admin.php?page=Categories_Spider_Catalog&task=remove_cat&id=<?php echo $rows[$i]->id; ?> &_wpnonce=<?php echo $sp_cat_nonce; ?> ">Delete</a></td> </tr> <?php } ?> </tbody> </table> <?php wp_nonce_field('nonce_sp_cat', 'nonce_sp_cat'); ?> <input type="hidden" name="oreder_move" id="oreder_move" value="" /> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo esc_html(stripslashes($_POST['asc_or_desc'])); } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo esc_html(stripslashes($_POST['order_by'])); } ?> " /> <input type="hidden" name="saveorder" id="saveorder" value="" /> <?php ?> </form> <?php }
function html_display_form_lists($rows, $pageNav, $sort, $old_version, $can_update_form) { global $wpdb; ?> <script language="javascript"> function confirmation(href,title) { var answer = confirm("Are you sure you want to delete '"+title+"'?"); if (answer) { document.getElementById('admin_form').action=href; document.getElementById('admin_form').submit(); } } function ordering(name,as_or_desc) { document.getElementById('asc_or_desc').value=as_or_desc; document.getElementById('order_by').value=name; document.getElementById('admin_form').submit(); } function doNothing() { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if (keyCode == 13) { if (!e) { var e = window.event; } e.cancelBubble = true; e.returnValue = false; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } </script> <style> .calendar .button { display: table-cell !important; } </style> <form method="post" onkeypress="doNothing()" action="admin.php?page=Form_maker" id="admin_form" name="admin_form"> <br /> <div style="font-size:14px; font-weight:bold"> <a href="http://web-dorado.com/wordpress-form-maker-guide-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a> <br /> This section allows you to create forms. <a href="http://web-dorado.com/wordpress-form-maker-guide-2.html" target="_blank" style="color:blue; text-decoration:none;">More...</a> </div> <table cellspacing="10" width="100%"> <tr> <td style="width:50px"> <img src="<?php echo plugins_url("images/formmakerLogo-48.png", __FILE__); ?> " /> </td> <td style="width:140px;"> <h2 style="vertical-align:top;">Form Maker</h2></td> <td style="width:90px; text-align:right;"><input class="button-secondary action" type="button" value="Add a Form" name="custom_parametrs" onclick="window.location.href='admin.php?page=Form_maker&task=add_form'"/> </td> <?php if ($old_version && $can_update_form) { ?> <td style="width:90px; text-align:right;"><input class="button-primary action" type="button" value=" Update Forms" name="update_forms" onclick="window.location.href='admin.php?page=Form_maker&task=update'"/> </td><?php } if (!$can_update_form && $old_version) { ?> <td style="width:90px; text-align:right;"><input class="button-primary action" type="button" value=" Update Forms" name="update_forms" onclick="alert('You cant update the forms of pro version with the free version. Please get the pro version')"/> </td><?php } ?> <td> <div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:90%"> <a href="http://web-dorado.com/files/fromFormMaker.php" target="_blank" style="color:red; text-decoration:none;"> <img src="<?php echo plugins_url('images/header.png', __FILE__); ?> " border="0" alt="www.web-dorado.com" width="215"><br> Get the full version </a> </div> </td> </tr> </table> <?php $serch_value = ''; if (isset($_POST['serch_or_not'])) { if (esc_html($_POST['serch_or_not']) == "search") { $serch_value = esc_html($_POST['search_events_by_title']); } else { $serch_value = ""; } } $serch_fields = ' <div class="alignleft actions" style="width:250px;"> <label for="search_events_by_title" style="font-size:14px">Title: </label> <input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()"> </div> <div class="alignleft actions"> <input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\';document.getElementById(\'admin_form\').submit();" class="button-secondary action"> <input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=Form_maker\'" class="button-secondary action"> </div>'; print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields); ?> <table class="wp-list-table widefat fixed pages" style="width:95%"> <thead> <TR> <th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style="width:110px"><a href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>ID</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "title") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> " style=""><a href="javascript:ordering('title',<?php if ($sort["sortid_by"] == "title") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Title</span><span class="sorting-indicator"></span></a></th> <th scope="col" id="mail" class="<?php if ($sort["sortid_by"] == "mail") { echo $sort["custom_style"]; } else { echo $sort["default_style"]; } ?> "><a href="javascript:ordering('mail',<?php if ($sort["sortid_by"] == "mail") { echo $sort["1_or_2"]; } else { echo "1"; } ?> )"><span>Email to send submissions to</span><span class="sorting-indicator"></span></a></th> <th style="width:80px">Edit</th> <th style="width:80px">Delete</th> </TR> </thead> <tbody> <?php for ($i = 0; $i < count($rows); $i++) { ?> <tr> <?php $old_version = false; if (strpos($rows[$i]->form, "wdform_table1") === false) { $old_version = true; } ?> <td><?php if (!$old_version) { ?> <a href="admin.php?page=Form_maker&task=edit_form&id=<?php echo $rows[$i]->id; ?> "><?php echo $rows[$i]->id; ?> </a><?php } else { ?> <p style="color:red; cursor:pointer; margin:0px" onclick="alert('Update forms to new version!')"><?php echo $rows[$i]->id; ?> </p><?php } ?> </td> <td><?php if (!$old_version) { ?> <a href="admin.php?page=Form_maker&task=edit_form&id=<?php echo $rows[$i]->id; ?> "><?php echo $rows[$i]->title; ?> </a><?php } else { ?> <p style="color:red; cursor:pointer; margin:0px" onclick="alert('Update forms to new version!')"><?php echo $rows[$i]->title; ?> </p><?php } ?> </td> <td><?php echo $rows[$i]->mail; ?> </td> <td><?php if (!$old_version) { ?> <a href="admin.php?page=Form_maker&task=edit_form&id=<?php echo $rows[$i]->id; ?> ">Edit</a><?php } else { ?> <p style="color:red; cursor:pointer; margin:0px" onclick="alert('Update forms to new version!')"> Edit</p><?php } ?> </td> <td><a href="javascript:confirmation('admin.php?page=Form_maker&task=remove_form&id=<?php echo $rows[$i]->id; ?> ','<?php echo $rows[$i]->title; ?> ')">Delete</a> </td> </tr> <?php } ?> </tbody> </table> <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) { echo esc_html($_POST['asc_or_desc']); } ?> " /> <input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) { echo esc_html($_POST['order_by']); } ?> " /> </form> <?php }