Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. 37 */
  2. 38 var fragments = !fragments ? [] : fragments;
  3. 39 </script>
  4. 40 <?php
  5. 41
  6. 42 // �~@ежим �~@едак�~Bи�~@овани�~O
  7. 43 if(isset($_GET['action']) && $_GET['action'] == "edit"){
  8. 44
  9. 45 $id = trim($_GET['parser_id']);
  10. 46 $query = $wpdb->prepare("SELECT * FROM {$table_name}
  11. 47 WHERE `id` = '%d' AND `mode` = '0'",
  12. 48 array(
  13. 49 $id,
  14. 50 )
  15. 51 );
  16. 52
  17. 53 $data = $wpdb->get_results($query, ARRAY_A);
  18. 54 $data = isset($data[0]) ? $data[0] : false;
  19. 55 if(!empty($data)){
  20. 56 $links_list = $data['links_list'];
  21. 57 $borders_html = "";
  22. 58 $borders_old = "";
  23. 59 $b = unserialize($data['borders']);
  24. 60
  25. 61 if(count($b)>0){
  26. 62 echo '<script type="text/javascript">
  27. 63 fragments = '.json_encode($b).';
  28. 64 jQuery(document).ready(function(){';
  29. 65 foreach($b as $key=>$border){
  30. 66 if($border["mode"] == "title") $is_fr_has_title = true;
  31. 67 $borders_old .= '<p>�~]азвание: '.htmlspecialchars(stripslashes($border['title']))
  32. ).'<br>
  33. 68 <i>ве�~@�~E:</i> <code>'.htmlspecialchars(stripslashess
  34. ($border['top_border'])).'</code><br>
  35. 69 <i>низ:</i> <code>'.htmlspecialchars(stripslashes($boo
  36. rder['bottom_border'])).'</code></p>';
  37. 70
  38. 71 $borders_html .= '<option value="'.($key+1).'"> �~]азвание: '.htmlspecialchars($bb
  39. order['title']).' &amp; �| ежим и�~Aпол�~Lзовани�~O: '.$border['mode'].'
  40. 72 </option>';
  41. 73 //echo 'fragments.push({title:"'.$border['title'].'", top_border:"'.$border['top_border'
  42. ].'", bottom_border:"'.$border['bottom_border'].'", mode: "'.$border['mode'].'"});';
  43. 74 }
  44. 75 echo '});</script>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement