Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 37 */
- 38 var fragments = !fragments ? [] : fragments;
- 39 </script>
- 40 <?php
- 41
- 42 // �~@ежим �~@едак�~Bи�~@овани�~O
- 43 if(isset($_GET['action']) && $_GET['action'] == "edit"){
- 44
- 45 $id = trim($_GET['parser_id']);
- 46 $query = $wpdb->prepare("SELECT * FROM {$table_name}
- 47 WHERE `id` = '%d' AND `mode` = '0'",
- 48 array(
- 49 $id,
- 50 )
- 51 );
- 52
- 53 $data = $wpdb->get_results($query, ARRAY_A);
- 54 $data = isset($data[0]) ? $data[0] : false;
- 55 if(!empty($data)){
- 56 $links_list = $data['links_list'];
- 57 $borders_html = "";
- 58 $borders_old = "";
- 59 $b = unserialize($data['borders']);
- 60
- 61 if(count($b)>0){
- 62 echo '<script type="text/javascript">
- 63 fragments = '.json_encode($b).';
- 64 jQuery(document).ready(function(){';
- 65 foreach($b as $key=>$border){
- 66 if($border["mode"] == "title") $is_fr_has_title = true;
- 67 $borders_old .= '<p>�~]азвание: '.htmlspecialchars(stripslashes($border['title']))
- ).'<br>
- 68 <i>ве�~@�~E:</i> <code>'.htmlspecialchars(stripslashess
- ($border['top_border'])).'</code><br>
- 69 <i>низ:</i> <code>'.htmlspecialchars(stripslashes($boo
- rder['bottom_border'])).'</code></p>';
- 70
- 71 $borders_html .= '<option value="'.($key+1).'"> �~]азвание: '.htmlspecialchars($bb
- order['title']).' & �| ежим и�~Aпол�~Lзовани�~O: '.$border['mode'].'
- 72 </option>';
- 73 //echo 'fragments.push({title:"'.$border['title'].'", top_border:"'.$border['top_border'
- ].'", bottom_border:"'.$border['bottom_border'].'", mode: "'.$border['mode'].'"});';
- 74 }
- 75 echo '});</script>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement