За последние 24 часа нас посетили 17768 программистов и 1625 роботов. Сейчас ищет 1261 программист ...

Помогите пожалуйста исправить ошибку.

Тема в разделе "Вопросы от блондинок", создана пользователем Almaty, 23 мар 2011.

  1. Almaty

    Almaty Активный пользователь

    С нами с:
    23 мар 2011
    Сообщения:
    3
    Симпатии:
    0
    Здравтсвуйте помогите плз выдает ошибку:
    вот код:
    PHP:
    1. <?php
    2. elseif( $action == "pingationmod" ) {
    3.  
    4.  echoheader( "options", "pingationMod" );
    5.  
    6.  echo <<<HTML
    7.  
    8.  <form action="{$PHP_SELF}" method="post">
    9.  
    10.  <div style="padding-top:5px;padding-bottom:2px;">
    11.  
    12.  <table width="100%">
    13.  
    14.  <tr>
    15.  
    16.  <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
    17.  
    18.  <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
    19.  
    20.  <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
    21.  
    22.  </tr>
    23.  
    24.  <tr>
    25.  
    26.  <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
    27.  
    28.  <td style="padding:5px;" bgcolor="#FFFFFF">
    29.  
    30.  <table width="100%">
    31.  
    32.  <tr>
    33.  
    34.  <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">Отправка уведомлений в пинг сервисы</div></td>
    35.  
    36.  </tr>
    37.  
    38.  </table>
    39.  
    40.  <div class="unterline"></div>
    41.  
    42.  <table width="100%">
    43.  
    44.  <tr>
    45.  
    46.  <td style="padding:2px;" height="100" align="center">
    47.  
    48.  HTML;
    49.  
    50.  
    51.  
    52.  echo "Вы действительно хотите отправить уведомления в пинг сервисы, на (<b>" . count( $selected_news ). "</b>) $lang[mass_confirm_1]<br><br>
    53.  
    54. <input class=bbcodes type=submit value=\"   $lang[mass_yes]   \"> &nbsp; <input type=button class=bbcodes value=\"  $lang[mass_no]  \" onclick=\"javascript:document.location='$PHP_SELF?mod=editnews&action=list'\">
    55.  
    56. <input type=hidden name=action value=\"do_mass_ping\">
    57.  
    58. <input type=hidden name=user_hash value=\"{$dle_login_hash}\">
    59.  
    60. <input type=hidden name=mod value=\"massactions\">";
    61.  
    62.  foreach ( $selected_news as $newsid ) {
    63.  
    64.  $newsid = intval($newsid);
    65.  
    66.  echo "<input type=hidden name=selected_news[] value=\"$newsid\">";
    67.  
    68.  }
    69.  
    70.  echo <<<HTML
    71.  
    72.  </tr>
    73.  
    74.  </table>
    75.  
    76.  </td>
    77.  
    78.  <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
    79.  
    80.  </tr>
    81.  
    82.  <tr>
    83.  
    84.  <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
    85.  
    86.  <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
    87.  
    88.  <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
    89.  
    90.  </tr>
    91.  
    92.  </table>
    93.  
    94.  </div></form>
    95.  
    96.  HTML;
    97.  
    98.  echofooter();
    99.  
    100.  exit();
    101.  
    102.  }
    103.  
    104.  elseif( $action == "do_mass_ping" ) {
    105.  
    106.  include ENGINE_DIR .'/inc/include/pingfunction.php';
    107.  
    108.  include ENGINE_DIR .'/data/pingdata.php';
    109.  
    110.  foreach ( $selected_news as $newsid ) {
    111.  
    112.  $newsid = intval($newsid);
    113.  
    114.  $sql_select = "SELECT id, title, date, category, alt_name, flag FROM ".PREFIX ."_post WHERE id=".$newsid;
    115.  
    116.  $sql_result = $db->query( $sql_select );
    117.  
    118.  while ( $row = $db->get_row( $sql_result ) ) {
    119.  
    120.  $row['date'] = strtotime( $row['date'] );
    121.  
    122.  $title = $row['title'];
    123.  
    124.  if( $config['allow_alt_url'] == "yes") {
    125.  
    126.  if( $row['flag'] and $config['seo_type'] ) {
    127.  
    128.  if( $row['category'] and $config['seo_type'] == 2 ) {
    129.  
    130.  $full_link = $config['http_home_url'] .get_url( $row['category'] ) ."/".$row['id'] ."-".$row['alt_name'] .".html";
    131.  
    132.  }else {
    133.  
    134.  $full_link = $config['http_home_url'] .$row['id'] ."-".$row['alt_name'] .".html";
    135.  
    136.  }
    137.  
    138.  }else {
    139.  
    140.  $full_link = $config['http_home_url'] .date( 'Y/m/d/',$row['date'] ) .$row['alt_name'] .".html";
    141.  
    142.  }
    143.  
    144.  }else {
    145.  
    146.  $full_link = $config['http_home_url'] ."index.php?newsid=".$row['id'];
    147.  
    148.  }
    149.  
    150.  }
    151.  
    152.  pingationMod($title, $full_link, 0, $pingdata['service'], $pingdata['zaderjka']);
    153.  
    154.  }
    155.  
    156.  if($pingdata['allow_log']){
    157.  
    158.  saveLog("Массовая отправка уведомлений в пинг сервисы");
    159.  
    160.  }
    161.  
    162.  
    163.  
    164.  clear_cache();
    165.  
    166.  msg( "info", "Уведомления успешно отправлены", "Уведомления успешно отправлены в пинг сервисы", $_SESSION['admin_referrer'] );
    167.  
    168.  }
    P.S. Я абсолютно не владею языком PHP, все надежды на вас.
     
  2. Ensiferum

    Ensiferum Активный пользователь

    С нами с:
    11 июл 2010
    Сообщения:
    1.292
    Симпатии:
    0
    Адрес:
    из секты поклонников Нео
    строку 780 покажи
     
  3. Almaty

    Almaty Активный пользователь

    С нами с:
    23 мар 2011
    Сообщения:
    3
    Симпатии:
    0
    $row['date'] = strtotime( $row['date'] );
     
  4. Benjamin

    Benjamin Активный пользователь

    С нами с:
    23 янв 2009
    Сообщения:
    154
    Симпатии:
    0
    Адрес:
    Тула
    Строки 770-790 покажи.
     
  5. Almaty

    Almaty Активный пользователь

    С нами с:
    23 мар 2011
    Сообщения:
    3
    Симпатии:
    0
    Это начиная с 755 и до конца.
    PHP:
    1.  HTML;
    2.  
    3.  echofooter();
    4.  
    5.  exit();
    6.  
    7.  }
    8.  
    9.  elseif( $action == "do_mass_ping" ) {
    10.  
    11.  include ENGINE_DIR .'/inc/include/pingfunction.php';
    12.  
    13.  include ENGINE_DIR .'/data/pingdata.php';
    14.  
    15.  foreach ( $selected_news as $newsid ) {
    16.  
    17.  $newsid = intval($newsid);
    18.  
    19.  $sql_select = "SELECT id, title, date, category, alt_name, flag FROM ".PREFIX ."_post WHERE id=".$newsid;
    20.  
    21.  $sql_result = $db->query( $sql_select );
    22.  
    23.  while ( $row = $db->get_row( $sql_result ) ) {
    24.  
    25.  $row['date'] = strtotime( $row['date'] );
    26.  
    27.  $title = $row['title'];
    28.  
    29.  if( $config['allow_alt_url'] == "yes") {
    30.  
    31.  if( $row['flag'] and $config['seo_type'] ) {
    32.  
    33.  if( $row['category'] and $config['seo_type'] == 2 ) {
    34.  
    35.  $full_link = $config['http_home_url'] .get_url( $row['category'] ) ."/".$row['id'] ."-".$row['alt_name'] .".html";
    36.  
    37.  }else {
    38.  
    39.  $full_link = $config['http_home_url'] .$row['id'] ."-".$row['alt_name'] .".html";
    40.  
    41.  }
    42.  
    43.  }else {
    44.  
    45.  $full_link = $config['http_home_url'] .date( 'Y/m/d/',$row['date'] ) .$row['alt_name'] .".html";
    46.  
    47.  }
    48.  
    49.  }else {
    50.  
    51.  $full_link = $config['http_home_url'] ."index.php?newsid=".$row['id'];
    52.  
    53.  }
    54.  
    55.  }
    56.  
    57.  pingationMod($title, $full_link, 0, $pingdata['service'], $pingdata['zaderjka']);
    58.  
    59.  }
    60.  
    61.  if($pingdata['allow_log']){
    62.  
    63.  saveLog("Массовая отправка уведомлений в пинг сервисы");
    64.  
    65.  }
    66.  
    67.  
    68.  
    69.  clear_cache();
    70.  
    71.  msg( "info", "Уведомления успешно отправлены", "Уведомления успешно отправлены в пинг сервисы", $_SESSION['admin_referrer'] );
    72.  
    73.  }
    74.  
    75. }
    76. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    77.   Ничего не выбрано
    78.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    79. else {
    80.    
    81.     msg( "info", $lang['mass_noact'], $lang['mass_noact_1'], $_SESSION['admin_referrer'] );
    82.  
    83. }
    84. ?>
     
  6. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    пробелы убери перед HTML в 755 строке.
     
  7. Slepoi_Kot

    Slepoi_Kot Активный пользователь

    С нами с:
    21 май 2011
    Сообщения:
    6
    Симпатии:
    0
    Адрес:
    США
    Проблема

    Parse error: syntax error, unexpected T_SL in /home/sm4k1/domains/cs-crazy.ru/public_html/engine/inc/massactions.php on line 664

    установил пингамод 2,04 (pingationmod 2.0.4) на dle 9.2, установка прошла успешно, всё работает, но теперь когда я хочу удалить новость через админку пишет мне
    Parse error: syntax error, unexpected T_SL in /home/sm4k1/domains/cs-crazy.ru/public_html/engine/inc/massactions.php on line 664

    вот общий код:

    Код (Text):
    1. <?PHP
    2. /*
    3. =====================================================
    4.  DataLife Engine - by SoftNews Media Group
    5. -----------------------------------------------------
    6.  http://dlekey.cn/
    7. -----------------------------------------------------
    8.  Copyright (c) 2004,2011 SoftNews Media Group
    9. =====================================================
    10.  Данный код защищен авторскими правами
    11. =====================================================
    12.  Файл: massaction.php
    13. -----------------------------------------------------
    14.  Назначение: массовые действие
    15. =====================================================
    16. */
    17. if( !defined( 'DATALIFEENGINE' ) OR !defined( 'LOGGED_IN' ) ) {
    18.     die( "Hacking attempt!" );
    19. }
    20.  
    21. if( ! $_SESSION['admin_referrer'] ) {
    22.    
    23.     $_SESSION['admin_referrer'] = "?mod=editnews&amp;action=list";
    24.  
    25. }
    26.  
    27. if( !$user_group[$member_id['user_group']]['admin_editnews'] OR !$user_group[$member_id['user_group']]['allow_all_edit'] ) {
    28.     msg( "error", $lang['mass_error'], $lang['mass_ddenied'], $_SESSION['admin_referrer'] );
    29. }
    30.  
    31. $selected_news = $_REQUEST['selected_news'];
    32.  
    33. if( ! $selected_news ) {
    34.     msg( "error", $lang['mass_error'], $lang['mass_denied'], $_SESSION['admin_referrer'] );
    35. }
    36.  
    37. if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {
    38.    
    39.     die( "Hacking attempt! User not found" );
    40.  
    41. }
    42.  
    43. $action = htmlspecialchars( strip_tags( stripslashes( $_POST['action'] ) ) );
    44.  
    45. $k_mass = false;
    46. $field = false;
    47.  
    48. if( $action == "mass_approve" ) {
    49.     $field = "approve";
    50.     $value = 1;
    51.     $k_mass = true;
    52.     $title = $lang['mass_edit_app_tl'];
    53.     $lang['mass_confirm'] = $lang['mass_edit_app_fr1'];
    54. } elseif( $action == "mass_date" ) {
    55.     $field = "date";
    56.     $value = date( "Y-m-d H:i:s", time() + ($config['date_adjust'] * 60) );
    57.     $k_mass = true;
    58.     $title = $lang['mass_edit_date_tl'];
    59.     $lang['mass_confirm'] = $lang['mass_edit_date_fr1'];
    60. } elseif( $action == "mass_not_approve" ) {
    61.     $field = "approve";
    62.     $value = 0;
    63.     $k_mass = true;
    64.     $title = $lang['mass_edit_app_tl'];
    65.     $lang['mass_confirm'] = $lang['mass_edit_app_fr2'];
    66. } elseif( $action == "mass_fixed" ) {
    67.     $field = "fixed";
    68.     $value = 1;
    69.     $k_mass = true;
    70.     $title = $lang['mass_edit_fix_tl'];
    71.     $lang['mass_confirm'] = $lang['mass_edit_fix_fr1'];
    72. } elseif( $action == "mass_not_fixed" ) {
    73.     $field = "fixed";
    74.     $value = 0;
    75.     $k_mass = true;
    76.     $title = $lang['mass_edit_fix_tl'];
    77.     $lang['mass_confirm'] = $lang['mass_edit_fix_fr2'];
    78. } elseif( $action == "mass_comments" ) {
    79.     $field = "allow_comm";
    80.     $value = 1;
    81.     $k_mass = true;
    82.     $title = $lang['mass_edit_com_tl'];
    83.     $lang['mass_confirm'] = $lang['mass_edit_comm_fr1'];
    84.     $lang[mass_confirm_1] = $lang[mass_confirm_2];
    85. } elseif( $action == "mass_not_comments" ) {
    86.     $field = "allow_comm";
    87.     $value = 0;
    88.     $k_mass = true;
    89.     $title = $lang['mass_edit_com_tl'];
    90.     $lang['mass_confirm'] = $lang['mass_edit_comm_fr2'];
    91.     $lang[mass_confirm_1] = $lang[mass_confirm_2];
    92. } elseif( $action == "mass_rating" ) {
    93.     $field = "allow_rate";
    94.     $value = 1;
    95.     $k_mass = true;
    96.     $title = $lang['mass_edit_rate_tl'];
    97.     $lang['mass_confirm'] = $lang['mass_edit_rate_fr1'];
    98.     $lang[mass_confirm_1] = $lang[mass_confirm_2];
    99. } elseif( $action == "mass_not_rating" ) {
    100.     $field = "allow_rate";
    101.     $value = 0;
    102.     $k_mass = true;
    103.     $title = $lang['mass_edit_rate_tl'];
    104.     $lang['mass_confirm'] = $lang['mass_edit_rate_fr2'];
    105.     $lang[mass_confirm_1] = $lang[mass_confirm_2];
    106. } elseif( $action == "mass_main" ) {
    107.     $field = "allow_main";
    108.     $value = 1;
    109.     $k_mass = true;
    110.     $title = $lang['mass_edit_main_tl'];
    111.     $lang['mass_confirm'] = $lang['mass_edit_main_fr1'];
    112. } elseif( $action == "mass_not_main" ) {
    113.     $field = "allow_main";
    114.     $value = 0;
    115.     $k_mass = true;
    116.     $title = $lang['mass_edit_main_tl'];
    117.     $lang['mass_confirm'] = $lang['mass_edit_main_fr2'];
    118.  
    119. } elseif( $action == "mass_clear_count" ) {
    120.     $field = "news_read";
    121.     $value = 0;
    122.     $k_mass = true;
    123.     $title = $lang['mass_clear_count_2'];
    124.     $lang['mass_confirm'] = $lang['mass_clear_count_1'];
    125.     $lang[mass_confirm_1] = $lang[mass_confirm_2];
    126.  
    127. } elseif( $action == "mass_clear_rating" ) {
    128.     $field = "rating";
    129.     $value = 0;
    130.     $k_mass = true;
    131.     $title = $lang['mass_clear_rating_2'];
    132.     $lang['mass_confirm'] = $lang['mass_clear_rating_1'];
    133.     $lang[mass_confirm_1] = $lang[mass_confirm_2];
    134.  
    135. } elseif( $action == "mass_clear_cloud" ) {
    136.     $field = "tags";
    137.     $value = "";
    138.     $k_mass = true;
    139.     $title = $lang['mass_clear_cloud_2'];
    140.     $lang['mass_confirm'] = $lang['mass_clear_cloud_1'];
    141.     $lang[mass_confirm_1] = $lang[mass_confirm_2];
    142. }
    143.  
    144. if( $_POST['doaction'] == "mass_update" and $field ) {
    145.    
    146.     foreach ( $selected_news as $id ) {
    147.         $id = intval( $id );
    148.         $db->query( "UPDATE " . PREFIX . "_post SET {$field}='{$value}' WHERE id='{$id}'" );
    149.        
    150.         if( $field == "approve" ) {
    151.            
    152.             if( $value ) {
    153.                
    154.                 $db->query( "DELETE FROM " . PREFIX . "_tags WHERE news_id = '{$id}'" );
    155.                 $row = $db->super_query( "SELECT tags FROM " . PREFIX . "_post where id = '{$id}'" );
    156.                
    157.                 if( $row['tags'] ) {
    158.                    
    159.                     $tags = array ();
    160.                    
    161.                     $row['tags'] = explode( ",", $row['tags'] );
    162.                    
    163.                     foreach ( $row['tags'] as $tags_value ) {
    164.                        
    165.                         $tags[] = "('" . $id . "', '" . trim( $tags_value ) . "')";
    166.                     }
    167.                    
    168.                     $tags = implode( ", ", $tags );
    169.                     $db->query( "INSERT INTO " . PREFIX . "_tags (news_id, tag) VALUES " . $tags );
    170.                
    171.                 }
    172.            
    173.             } else {
    174.                
    175.                 $db->query( "DELETE FROM " . PREFIX . "_tags WHERE news_id = '{$id}'" );
    176.            
    177.             }
    178.        
    179.         }
    180.  
    181.         if ( $field == "news_read" ) {
    182.  
    183.             $db->query( "DELETE FROM " . PREFIX . "_views WHERE news_id = '{$id}'" );
    184.  
    185.         }
    186.  
    187.         if ( $field == "rating" ) {
    188.  
    189.             $db->query( "UPDATE " . PREFIX . "_post SET vote_num='0' WHERE id='{$id}'" );
    190.             $db->query( "DELETE FROM " . PREFIX . "_logs WHERE news_id = '{$id}'" );
    191.  
    192.         }
    193.  
    194.         if ( $field == "tags" ) {
    195.  
    196.             $db->query( "DELETE FROM " . PREFIX . "_tags WHERE news_id = '{$id}'" );
    197.  
    198.         }
    199.    
    200.     }
    201.    
    202.     clear_cache();
    203.    
    204.     msg( "info", $lang['db_ok'], $lang['db_ok_1'], $_SESSION['admin_referrer'] );
    205. }
    206.  
    207. if( $k_mass ) {
    208.    
    209.     echoheader( "options", $lang['mass_head'] );
    210.    
    211.     echo <<<HTML
    212. <form action="{$PHP_SELF}" method="post">
    213. <div style="padding-top:5px;padding-bottom:2px;">
    214. <table width="100%">
    215.     <tr>
    216.         <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
    217.         <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
    218.         <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
    219.     </tr>
    220.     <tr>
    221.         <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
    222.         <td style="padding:5px;" bgcolor="#FFFFFF">
    223. <table width="100%">
    224.     <tr>
    225.         <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$title}</div></td>
    226.     </tr>
    227. </table>
    228. <div class="unterline"></div>
    229. <table width="100%">
    230.     <tr>
    231.         <td style="padding:2px;" height="100" align="center">{$lang['mass_confirm']}
    232. HTML;
    233.    
    234.     echo " (<b>" . count( $selected_news ) . "</b>) $lang[mass_confirm_1]<br><br>
    235. <input class=bbcodes type=submit value=\"   $lang[mass_yes]   \"> &nbsp; <input type=button class=bbcodes value=\"  $lang[mass_no]  \" onclick=\"javascript:document.location='$PHP_SELF?mod=editnews&action=list'\">
    236. <input type=hidden name=action value=\"{$action}\">
    237. <input type=hidden name=user_hash value=\"{$dle_login_hash}\">
    238. <input type=hidden name=doaction value=\"mass_update\">
    239. <input type=hidden name=mod value=\"massactions\">";
    240.     foreach ( $selected_news as $newsid ) {
    241.         $newsid = intval($newsid);
    242.         echo "<input type=hidden name=selected_news[] value=\"$newsid\">\n";
    243.     }
    244.    
    245.     echo <<<HTML
    246.     </tr>
    247. </table>
    248. </td>
    249.         <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
    250.     </tr>
    251.     <tr>
    252.         <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
    253.         <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
    254.         <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
    255.     </tr>
    256. </table>
    257. </div></form>
    258. HTML;
    259.    
    260.     echofooter();
    261.     exit();
    262.  
    263. }
    264. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    265.   Подтвреждение удаления
    266.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    267. if( $action == "mass_delete" ) {
    268.    
    269.     echoheader( "options", $lang['mass_head'] );
    270.    
    271.     echo <<<HTML
    272. <form action="{$PHP_SELF}" method="post">
    273. <div style="padding-top:5px;padding-bottom:2px;">
    274. <table width="100%">
    275.     <tr>
    276.         <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
    277.         <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
    278.         <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
    279.     </tr>
    280.     <tr>
    281.         <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
    282.         <td style="padding:5px;" bgcolor="#FFFFFF">
    283. <table width="100%">
    284.     <tr>
    285.         <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['mass_head']}</div></td>
    286.     </tr>
    287. </table>
    288. <div class="unterline"></div>
    289. <table width="100%">
    290.     <tr>
    291.         <td style="padding:2px;" height="100" align="center">{$lang['mass_confirm']}
    292. HTML;
    293.    
    294.     echo "(<b>" . count( $selected_news ) . "</b>) $lang[mass_confirm_1]<br><br>
    295. <input class=bbcodes type=submit value=\"   $lang[mass_yes]   \"> &nbsp; <input type=button class=bbcodes value=\"  $lang[mass_no]  \" onclick=\"javascript:document.location='$PHP_SELF?mod=editnews&action=list'\">
    296. <input type=hidden name=action value=\"do_mass_delete\">
    297. <input type=hidden name=user_hash value=\"{$dle_login_hash}\">
    298. <input type=hidden name=mod value=\"massactions\">";
    299.     foreach ( $selected_news as $newsid ) {
    300.         $newsid = intval($newsid);
    301.         echo "<input type=hidden name=selected_news[] value=\"$newsid\">\n";
    302.     }
    303.    
    304.     echo <<<HTML
    305.     </tr>
    306. </table>
    307. </td>
    308.         <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
    309.     </tr>
    310.     <tr>
    311.         <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
    312.         <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
    313.         <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
    314.     </tr>
    315. </table>
    316. </div></form>
    317. HTML;
    318.    
    319.     echofooter();
    320.     exit();
    321.  
    322. }
    323. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    324.   Удаление новостей
    325.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    326. elseif( $action == "do_mass_delete" ) {
    327.    
    328.     $deleted_articles = 0;
    329.    
    330.     foreach ( $selected_news as $id ) {
    331.        
    332.         $id = intval( $id );
    333.         $row = $db->super_query( "SELECT autor FROM " . PREFIX . "_post where id = '$id'" );
    334.        
    335.         $db->query( "UPDATE " . USERPREFIX . "_users set news_num=news_num-1 where name='{$row['autor']}'" );
    336.        
    337.         $deleted_articles ++;
    338.        
    339.         $db->query( "DELETE FROM " . PREFIX . "_post WHERE id='$id'" );
    340.        
    341.         $db->query( "DELETE FROM " . PREFIX . "_comments WHERE post_id='$id'" );
    342.        
    343.         $db->query( "SELECT onserver FROM " . PREFIX . "_files WHERE news_id = '$id'" );
    344.         while ( $row = $db->get_row() ) {
    345.             @unlink( ROOT_DIR . "/uploads/files/" . $row['onserver'] );
    346.         }
    347.         $db->free();
    348.        
    349.         $db->query( "DELETE FROM " . PREFIX . "_files WHERE news_id = '$id'" );
    350.         $db->query( "DELETE FROM " . PREFIX . "_poll WHERE news_id = '$id'" );
    351.         $db->query( "DELETE FROM " . PREFIX . "_poll_log WHERE news_id = '$id'" );
    352.         $db->query( "DELETE FROM " . PREFIX . "_post_log WHERE news_id = '$id'" );
    353.         $db->query( "DELETE FROM " . PREFIX . "_logs WHERE news_id = '$id'" );
    354.         $db->query( "DELETE FROM " . PREFIX . "_tags WHERE news_id = '$id'" );
    355.        
    356.         $row = $db->super_query( "SELECT images  FROM " . PREFIX . "_images where news_id = '$id'" );
    357.        
    358.         $listimages = explode( "|||", $row['images'] );
    359.        
    360.         if( $row['images'] != "" ) foreach ( $listimages as $dataimages ) {
    361.             $url_image = explode( "/", $dataimages );
    362.            
    363.             if( count( $url_image ) == 2 ) {
    364.                
    365.                 $folder_prefix = $url_image[0] . "/";
    366.                 $dataimages = $url_image[1];
    367.            
    368.             } else {
    369.                
    370.                 $folder_prefix = "";
    371.                 $dataimages = $url_image[0];
    372.            
    373.             }
    374.            
    375.             @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . $dataimages );
    376.             @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . "thumbs/" . $dataimages );
    377.         }
    378.        
    379.         $db->query( "DELETE FROM " . PREFIX . "_images WHERE news_id = '$id'" );
    380.     }
    381.    
    382.     clear_cache();
    383.    
    384.     if( count( $selected_news ) == $deleted_articles ) {
    385.         msg( "info", $lang['mass_head'], $lang['mass_delok'], $_SESSION['admin_referrer'] );
    386.     } else {
    387.         msg( "error", $lang['mass_notok'], "$deleted_articles $lang[mass_i] " . count( $selected_news ) . " $lang[mass_notok_1]", $_SESSION['admin_referrer'] );
    388.     }
    389. }
    390. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    391.   Подтвеждение смены категорий
    392.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    393. elseif( $action == "mass_move_to_cat" ) {
    394.    
    395.     echoheader( "options", $lang['mass_cat'] );
    396.    
    397.     $count = count( $selected_news );
    398.     if( $config['allow_multi_category'] ) $category_multiple = "class=\"cat_select\" multiple";
    399.     else $category_multiple = "";
    400.    
    401.     echo <<<HTML
    402. <form action="{$PHP_SELF}" method="post">
    403. <div style="padding-top:5px;padding-bottom:2px;">
    404. <table width="100%">
    405.     <tr>
    406.         <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
    407.         <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
    408.         <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
    409.     </tr>
    410.     <tr>
    411.         <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
    412.         <td style="padding:5px;" bgcolor="#FFFFFF">
    413. <table width="100%">
    414.     <tr>
    415.         <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['mass_cat_1']}</div></td>
    416.     </tr>
    417. </table>
    418. <div class="unterline"></div>
    419. <table width="100%">
    420.     <tr>
    421.         <td style="padding:2px;" height="100">{$lang['mass_cat_2']} (<b>{$count}</b>) {$lang['mass_cat_3']}
    422. <select name="move_to_category[]" align="absmiddle" {$category_multiple}>
    423. HTML;
    424.    
    425.     echo CategoryNewsSelection( 0, 0 );
    426.     echo "</select>";
    427.    
    428.     foreach ( $selected_news as $newsid ) {
    429.         $newsid = intval($newsid);
    430.         echo "<input type=hidden name=selected_news[] value=\"$newsid\">";
    431.     }
    432.    
    433.     echo <<<HTML
    434. <input type=hidden name=user_hash value="{$dle_login_hash}"><input type="hidden" name="action" value="do_mass_move_to_cat"><input type="hidden" name="mod" value="massactions">&nbsp;<input type="submit" value="&nbsp;&nbsp;{$lang['b_start']}&nbsp;&nbsp;" class="buttons"></td>
    435.     </tr>
    436. </table>
    437. </td>
    438.         <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
    439.     </tr>
    440.     <tr>
    441.         <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
    442.         <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
    443.         <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
    444.     </tr>
    445. </table>
    446. </div></form>
    447. HTML;
    448.    
    449.     echofooter();
    450.     exit();
    451. }
    452. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    453.   Выбор символьного кода
    454.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    455. elseif( $action == "mass_edit_symbol" ) {
    456.    
    457.     echoheader( "options", $lang['mass_cat'] );
    458.    
    459.     $count = count( $selected_news );
    460.    
    461.     echo <<<HTML
    462. <form action="{$PHP_SELF}" method="post">
    463. <div style="padding-top:5px;padding-bottom:2px;">
    464. <table width="100%">
    465.     <tr>
    466.         <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
    467.         <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
    468.         <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
    469.     </tr>
    470.     <tr>
    471.         <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
    472.         <td style="padding:5px;" bgcolor="#FFFFFF">
    473. <table width="100%">
    474.     <tr>
    475.         <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['catalog_url']}</div></td>
    476.     </tr>
    477. </table>
    478. <div class="unterline"></div>
    479. <table width="100%">
    480.     <tr>
    481.         <td style="padding:2px;" height="100" align="center">{$lang['catalog_url']} <input type="text" name="catalog_url" size="15"  class="edit" value="{$row['symbol']}">
    482. HTML;
    483.    
    484.     foreach ( $selected_news as $newsid ) {
    485.         $newsid = intval($newsid);
    486.         echo "<input type=hidden name=selected_news[] value=\"$newsid\">";
    487.     }
    488.    
    489.     echo <<<HTML
    490. <input type=hidden name=user_hash value="{$dle_login_hash}"><input type="hidden" name="action" value="do_mass_edit_symbol"><input type="hidden" name="mod" value="massactions">&nbsp;<input type="submit" value="{$lang['b_start']}" class="edit"></td>
    491.     </tr>
    492. </table>
    493. </td>
    494.         <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
    495.     </tr>
    496.     <tr>
    497.         <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
    498.         <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
    499.         <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
    500.     </tr>
    501. </table>
    502. </div></form>
    503. HTML;
    504.    
    505.     echofooter();
    506.     exit();
    507. }
    508. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    509.   Назначение слов для облака тегов
    510.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    511. elseif( $action == "mass_edit_cloud" ) {
    512.    
    513.     echoheader( "options", $lang['mass_cat'] );
    514.    
    515.     $count = count( $selected_news );
    516.    
    517.     echo <<<HTML
    518. <form action="{$PHP_SELF}" method="post">
    519. <div style="padding-top:5px;padding-bottom:2px;">
    520. <table width="100%">
    521.     <tr>
    522.         <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
    523.         <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
    524.         <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
    525.     </tr>
    526.     <tr>
    527.         <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
    528.         <td style="padding:5px;" bgcolor="#FFFFFF">
    529. <table width="100%">
    530.     <tr>
    531.         <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['addnews_tags']}</div></td>
    532.     </tr>
    533. </table>
    534. <div class="unterline"></div>
    535. <table width="100%">
    536.     <tr>
    537.         <td style="padding:2px;" height="100" align="center">{$lang['addnews_tags']} <input type="text" name="tags" size="45"  class="edit" value="">
    538. HTML;
    539.    
    540.     foreach ( $selected_news as $newsid ) {
    541.         $newsid = intval($newsid);
    542.         echo "<input type=hidden name=selected_news[] value=\"$newsid\">";
    543.     }
    544.    
    545.     echo <<<HTML
    546. <input type=hidden name=user_hash value="{$dle_login_hash}"><input type="hidden" name="action" value="do_mass_edit_cloud"><input type="hidden" name="mod" value="massactions">&nbsp;<input type="submit" value="{$lang['b_start']}" class="edit"></td>
    547.     </tr>
    548. </table>
    549. </td>
    550.         <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
    551.     </tr>
    552.     <tr>
    553.         <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
    554.         <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
    555.         <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
    556.     </tr>
    557. </table>
    558. </div></form>
    559. HTML;
    560.    
    561.     echofooter();
    562.     exit();
    563. }
    564. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    565.   смена категории
    566.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    567. elseif( $action == "do_mass_move_to_cat" ) {
    568.    
    569.     $moved_articles = 0;
    570.    
    571.     $move_to_category = $db->safesql( implode( ',', $_REQUEST['move_to_category'] ) );
    572.    
    573.     foreach ( $selected_news as $id ) {
    574.         $moved_articles ++;
    575.         $id = intval( $id );
    576.        
    577.         $db->query( "UPDATE " . PREFIX . "_post set category='$move_to_category' WHERE id='$id'" );
    578.     }
    579.    
    580.     clear_cache();
    581.    
    582.     if( count( $selected_news ) == $moved_articles ) {
    583.         msg( "info", $lang['mass_cat_ok'], "$lang[mass_cat_ok] ($moved_articles)", $_SESSION['admin_referrer'] );
    584.     } else {
    585.         msg( "error", $lang['mass_cat_notok'], $lang['mass_cat_notok_1'], $_SESSION['admin_referrer'] );
    586.     }
    587. }
    588. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    589.   смена символьного кода
    590.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    591. elseif( $action == "do_mass_edit_symbol" ) {
    592.    
    593.     $edit_articles = 0;
    594.    
    595.     $catalog_url = $db->safesql( dle_substr( htmlspecialchars( strip_tags( stripslashes( trim( $_POST['catalog_url'] ) ) ) ), 0, 3, $config['charset'] ) );
    596.    
    597.     foreach ( $selected_news as $id ) {
    598.         $edit_articles ++;
    599.         $id = intval( $id );
    600.        
    601.         $db->query( "UPDATE " . PREFIX . "_post SET symbol='$catalog_url' WHERE id='$id'" );
    602.     }
    603.    
    604.     clear_cache();
    605.    
    606.     msg( "info", $lang['mass_symbol_ok'], $lang['mass_symbol_ok'] . " ($edit_articles)", $_SESSION['admin_referrer'] );
    607. }
    608. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    609.   смена ключевых слов для облака тегов
    610.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    611. elseif( $action == "do_mass_edit_cloud" ) {
    612.    
    613.     $edit_articles = 0;
    614.    
    615.     if( @preg_match( "/[\||\'|\<|\>|\"|\!|\?|\$|\@|\/|\\\|\&\~\*\+]/", $_POST['tags'] ) ) $_POST['tags'] = "";
    616.     else $_POST['tags'] = @$db->safesql( htmlspecialchars( strip_tags( stripslashes( trim( $_POST['tags'] ) ) ), ENT_QUOTES ) );
    617.  
    618.     if ( $_POST['tags'] ) {
    619.  
    620.         $temp_array = array();
    621.         $tags_array = array();
    622.         $temp_array = explode (",", $_POST['tags']);
    623.  
    624.         if (count($temp_array)) {
    625.  
    626.             foreach ( $temp_array as $value ) {
    627.                 if( trim($value) ) $tags_array[] = trim( $value );
    628.             }
    629.  
    630.         }
    631.  
    632.         if ( count($tags_array) ) $_POST['tags'] = implode(", ", $tags_array); else $_POST['tags'] = "";
    633.  
    634.     }
    635.  
    636.     if ( $_POST['tags'] ) {
    637.         foreach ( $selected_news as $id ) {
    638.             $edit_articles ++;
    639.             $id = intval( $id );
    640.  
    641.             $db->query( "DELETE FROM " . PREFIX . "_tags WHERE news_id = '$id'" );
    642.             $db->query( "UPDATE " . PREFIX . "_post SET tags='{$_POST['tags']}' WHERE id='$id'" );
    643.  
    644.             $tags = array ();
    645.                        
    646.             $tags_array = explode( ",", $_POST['tags'] );
    647.                        
    648.             foreach ( $tags_array as $value ) {
    649.                            
    650.                             $tags[] = "('" . $id . "', '" . trim( $value ) . "')";
    651.             }
    652.                        
    653.             $tags = implode( ", ", $tags );
    654.             $db->query( "INSERT INTO " . PREFIX . "_tags (news_id, tag) VALUES " . $tags );
    655.         }
    656.     }    
    657.     clear_cache();
    658.    
    659.     msg( "info", $lang['mass_cloud_ok'], $lang['mass_cloud_ok'] . " ($edit_articles)", $_SESSION['admin_referrer'] );
    660. }
    661.  
    662. elseif( $action == "pingationmod" ) {
    663. echoheader( "options", "pingationMod" );
    664. echo <<<HTML
    665. <form action="{$PHP_SELF}" method="post">
    666. <div style="padding-top:5px;padding-bottom:2px;">
    667. <table width="100%">
    668. <tr>
    669. <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
    670. <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
    671. <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
    672. </tr>
    673. <tr>
    674. <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
    675. <td style="padding:5px;" bgcolor="#FFFFFF">
    676. <table width="100%">
    677. <tr>
    678. <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">Отправка уведомлений в пинг сервисы</div></td>
    679. </tr>
    680. </table>
    681. <div class="unterline"></div>
    682. <table width="100%">
    683. <tr>
    684. <td style="padding:2px;" height="100" align="center">
    685. HTML;
    686. echo "Вы действительно хотите отправить уведомления в пинг сервисы, на (<b>" . count( $selected_news ). "</b>) $lang[mass_confirm_1]<br><br>
    687. <input class=bbcodes type=submit value=\"   $lang[mass_yes]   \"> &nbsp; <input type=button class=bbcodes value=\"  $lang[mass_no]  \" onclick=\"javascript:document.location='$PHP_SELF?mod=editnews&action=list'\">
    688. <input type=hidden name=action value=\"do_mass_ping\">
    689. <input type=hidden name=user_hash value=\"{$dle_login_hash}\">
    690. <input type=hidden name=mod value=\"massactions\">";
    691. foreach ( $selected_news as $newsid ) {
    692. $newsid = intval($newsid);
    693. echo "<input type=hidden name=selected_news[] value=\"$newsid\">";
    694. }
    695. echo <<<HTML
    696. </tr>
    697. </table>
    698. </td>
    699. <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
    700. </tr>
    701. <tr>
    702. <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
    703. <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
    704. <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
    705. </tr>
    706. </table>
    707. </div></form>
    708. HTML;
    709. echofooter();
    710. exit();
    711. }elseif( $action == "do_mass_ping" ) {
    712. include ENGINE_DIR .'/inc/include/pingfunction.php';
    713. include ENGINE_DIR .'/data/pingdata.php';
    714. foreach ( $selected_news as $newsid ) {
    715. $newsid = intval($newsid);
    716. $sql_select = "SELECT id, title, date, category, alt_name, flag FROM ".PREFIX ."_post WHERE id=".$newsid;
    717. $sql_result = $db->query( $sql_select );
    718. while ( $row = $db->get_row( $sql_result ) ) {
    719. $row['date'] = strtotime( $row['date'] );
    720. $title = $row['title'];
    721. if( $config['allow_alt_url'] == "yes") {
    722. if( $row['flag'] and $config['seo_type'] ) {
    723. if( $row['category'] and $config['seo_type'] == 2 ) {
    724. $full_link = $config['http_home_url'] .get_url( $row['category'] ) ."/".$row['id'] ."-".$row['alt_name'] .".html";
    725. }else {
    726. $full_link = $config['http_home_url'] .$row['id'] ."-".$row['alt_name'] .".html";
    727. }
    728. }else {
    729. $full_link = $config['http_home_url'] .date( 'Y/m/d/',$row['date'] ) .$row['alt_name'] .".html";
    730. }
    731. }else {
    732. $full_link = $config['http_home_url'] ."index.php?newsid=".$row['id'];
    733. }
    734. }
    735. pingationMod($title, $full_link, 0, $pingdata['service'], $pingdata['zaderjka']);
    736. }
    737. if($pingdata['allow_log']){
    738.  
    739. saveLog("Массовая отправка уведомлений в пинг сервисы");
    740. }
    741.  
    742. clear_cache();
    743. msg( "info", "Уведомления успешно отправлены", "Уведомления успешно отправлены в пинг сервисы", $_SESSION['admin_referrer'] );
    744. }
    745. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    746.   Ничего не выбрано
    747.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    748. else {
    749.    
    750.     msg( "info", $lang['mass_noact'], $lang['mass_noact_1'], $_SESSION['admin_referrer'] );
    751.  
    752. }
    753. ?>
    Вот что я добавил туда:

    Код (Text):
    1. elseif( $action == "pingationmod" ) {
    2. echoheader( "options", "pingationMod" );
    3. echo <<<HTML
    4. <form action="{$PHP_SELF}" method="post">
    5. <div style="padding-top:5px;padding-bottom:2px;">
    6. <table width="100%">
    7. <tr>
    8. <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
    9. <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
    10. <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
    11. </tr>
    12. <tr>
    13. <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
    14. <td style="padding:5px;" bgcolor="#FFFFFF">
    15. <table width="100%">
    16. <tr>
    17. <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">Отправка уведомлений в пинг сервисы</div></td>
    18. </tr>
    19. </table>
    20. <div class="unterline"></div>
    21. <table width="100%">
    22. <tr>
    23. <td style="padding:2px;" height="100" align="center">
    24. HTML;
    25. echo "Вы действительно хотите отправить уведомления в пинг сервисы, на (<b>" . count( $selected_news ). "</b>) $lang[mass_confirm_1]<br><br>
    26. <input class=bbcodes type=submit value=\"   $lang[mass_yes]   \"> &nbsp; <input type=button class=bbcodes value=\"  $lang[mass_no]  \" onclick=\"javascript:document.location='$PHP_SELF?mod=editnews&action=list'\">
    27. <input type=hidden name=action value=\"do_mass_ping\">
    28. <input type=hidden name=user_hash value=\"{$dle_login_hash}\">
    29. <input type=hidden name=mod value=\"massactions\">";
    30. foreach ( $selected_news as $newsid ) {
    31. $newsid = intval($newsid);
    32. echo "<input type=hidden name=selected_news[] value=\"$newsid\">";
    33. }
    34. echo <<<HTML
    35. </tr>
    36. </table>
    37. </td>
    38. <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
    39. </tr>
    40. <tr>
    41. <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
    42. <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
    43. <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
    44. </tr>
    45. </table>
    46. </div></form>
    47. HTML;
    48. echofooter();
    49. exit();
    50. }elseif( $action == "do_mass_ping" ) {
    51. include ENGINE_DIR .'/inc/include/pingfunction.php';
    52. include ENGINE_DIR .'/data/pingdata.php';
    53. foreach ( $selected_news as $newsid ) {
    54. $newsid = intval($newsid);
    55. $sql_select = "SELECT id, title, date, category, alt_name, flag FROM ".PREFIX ."_post WHERE id=".$newsid;
    56. $sql_result = $db->query( $sql_select );
    57. while ( $row = $db->get_row( $sql_result ) ) {
    58. $row['date'] = strtotime( $row['date'] );
    59. $title = $row['title'];
    60. if( $config['allow_alt_url'] == "yes") {
    61. if( $row['flag'] and $config['seo_type'] ) {
    62. if( $row['category'] and $config['seo_type'] == 2 ) {
    63. $full_link = $config['http_home_url'] .get_url( $row['category'] ) ."/".$row['id'] ."-".$row['alt_name'] .".html";
    64. }else {
    65. $full_link = $config['http_home_url'] .$row['id'] ."-".$row['alt_name'] .".html";
    66. }
    67. }else {
    68. $full_link = $config['http_home_url'] .date( 'Y/m/d/',$row['date'] ) .$row['alt_name'] .".html";
    69. }
    70. }else {
    71. $full_link = $config['http_home_url'] ."index.php?newsid=".$row['id'];
    72. }
    73. }
    74. pingationMod($title, $full_link, 0, $pingdata['service'], $pingdata['zaderjka']);
    75. }
    76. if($pingdata['allow_log']){
    77.  
    78. saveLog("Массовая отправка уведомлений в пинг сервисы");
    79. }
    80.  
    81. clear_cache();
    82. msg( "info", "Уведомления успешно отправлены", "Уведомления успешно отправлены в пинг сервисы", $_SESSION['admin_referrer'] );
    83. }