1. Список говнокодов пользователя varg242

    Всего: 41

  2. JavaScript / Говнокод #16845

    +159

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    $(document).ready(function(){
    	$('.result_count').hide();
    	
    	$('.contentLeft li').on('click',function(){
    		$('.contentLeft li input[type="radio"]').attr('checked',false);
    	$('li.activebutton input[type="radio"]').attr('checked',true);
    		
    		});
    	$('.contentLeftValut li label').on('click',function(){
    		$('.contentLeftValut li').removeClass('act_li');
    		$(this).closest('li').addClass('act_li');
    		$('.contentLeftValut li input[type="radio"]').attr('checked',false);
    		$('li.act_li input[type="radio"]').attr('checked',true);
    	});
    		$('.calculBlock').change(function()
    		{
    			$('.error').html('');
    			var first_array = {"1":1,"2":2,"3":3,"4":4,"5":5,"6":7,"7":10,"8":12,"9":15,"10":17,"11":20,"12":22,"13":25,"14":27,"15":30,"16":32,"17":35,"18":40,"19":45,"20":50,"21":55,"22":60,"23":65,
    "24":70,"25":75,"26":80,"27":85,"28":90,"29":95,"30":100}
    			
    			var two_array = {"1":123.7,"2":154.3,"3":175.4,"4":199.3,"5":212.8,"6":278.3,"7":312.2,
    							 "8":378.5,"9":439.4,"10":472.8,"11":532.8,"12":566.9,"13":621.6,"14":664.3,
    							 "15":739.2,"16":775.1,"17":829.1,"18":929.0,"19":1008.8,"20":1159.3,"21":1260.9,"22":1361.0,"23":1462.7,
    "24":1563.4,"25":1674.3,"26":1785.3,"27":1896.2,"28":2007.1,"29":2118.1,"30":2229.0}
    			
    			
    			var three_array = {"1":20.47,"2":23.66,"3":34.04,"4":37.3,"5":40.57,"6":41.14,"7":56.95,
    							 "8":60.58,"9":66.07,"10":69.73,"11":75.17,"12":79.01,"13":86.63,"14":90.05,
    							 "15":94.93,"16":102.47,"17":109.78,"18":117.89,"19":126.04,"20":134.21,"21":142.31,"22":150.45,"23":158.59,
    "24":166.71,"25":238.12,"26":253.02,"27":267.92,"28":282.82,"29":297.72,"30":312.62}
    			
    			
    			var error = 0;
    			var ves = 0;
    			var result = 0;
    			
    			var firstPlace = Math.ceil($('.firstPlace').val());
    			if (firstPlace == ""||$.isNumeric(firstPlace)){	
    				$('.error').html('Введите точку отправки');	
    				return;
    			}
    			else{
    				var lastPlace = Math.ceil($('.lastPlace').val());	
    					if ((lastPlace == "" ) || ($.isNumeric(lastPlace))){
    					$('.error').html('Введите точку доставки');
    					return;
    				}
    				else{
    					var weight = Math.ceil($('.weight').val());			
    		 				if ((weight=="" ) || (isNaN(weight))){
    						$('.error').html('Введите вес груза');	
    						return;
    						}
    						else{
    							var length = Math.ceil($('.length').val());				
    							if ((length=="" ) || (isNaN(length))){
    								$('.error').html('Введите длину груза');
    								return;
    							}
    							else{
    								var height = Math.ceil($('.height').val());					
    								if ((height=="" ) || (isNaN(height))){
    									$('.error').html('Введите высоту груза');
    									return;
    								}
    								else{
    									var width = Math.ceil($('.width').val());						
    									if ((width=="" ) || (isNaN(width))){
    										$('.error').html('Введите ширину груза');
    										return;
    									}
    									else{
    										var price = Math.ceil($('.price').val());
    										if ((price=="" ) || (isNaN(price))){
    												$('.error').html('Введите цену груза');
    										}
    										else{
    											var ob_ves = length*height*width/5000;
    			 
    			
    											if(weight > Math.round(ob_ves)){
    												ves = weight;	
    												
    											}
    											else{ves = Math.round(ob_ves);
    												 
    												}
    											
    											if( (($('#p_eks').is(':checked')) && ($('#usa').is(':checked'))) || ( ($('#g_eks').is(':checked')) && ($('#usa').is(':checked'))) ){
    												for (var i=1;i <= 30;i++){
    													if (ves <= first_array[i]){
    														result = two_array[i] + ves*4; 
    														break;
    												}
    												}
    											}
    											
    											if( (($('#p_eks').is(':checked')) && ($('#euro').is(':checked'))) || ( ($('#g_eks').is(':checked')) && ($('#euro').is(':checked'))) ){
    												for (var i=1;i <= 30;i++){
    													if (ves <= first_array[i]){

    Ай, блять. Калькулятор.

    varg242, 13 Октября 2014

    Комментарии (2)
  3. JavaScript / Говнокод #13637

    +149

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    function cubeGalleryLayout(ob,cate)
    {
    	var obj = ob;
    	obj.empty();
    	if (cate=="all") obj.append('<div class="gallery_category"><ul><li class="on"><a href="#">All</a></li><li><a href="#">Exterior</a></li><li><a href="#">Interior</a></li><li><a href="#">Movies</a></li></ul></div>');
    	else if (cate=="exterior") obj.append('<div class="gallery_category"><ul><li><a href="#">All</a></li><li><a href="#" class="on">Exterior</a></li><li><a href="#">Interior</a></li><li><a href="#">Movies</a></li></ul></div>');
    	else if (cate=="interior") obj.append('<div class="gallery_category"><ul><li><a href="#">All</a></li><li><a href="#">Exterior</a></li><li><a href="#" class="on">Interior</a></li><li><a href="#">Movies</a></li></ul></div>');
    	else obj.append('<div class="gallery_category"><ul><li><a href="#">All</a></li><li><a href="#">Exterior</a></li><li><a href="#">Interior</a></li><li><a href="#" class="on">Movies</a></li></ul></div>');
    	obj.append('<ul class="gallerylist"></ul>');
    	obj.append('<div class="cube_shadow"><div><img src="/worldwide/images/common/bg/bg_cube_shadow.png" alt="" /></div></div>');
    }

    Тут ещё много веселья: view-source:http://worldwide.hyundai.com/WW/Showroom/Cars/i40/PIP/index.html

    varg242, 21 Августа 2013

    Комментарии (0)
  4. PHP / Говнокод #13109

    +150

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    <?php
    class Router {
        private $available_pages = array('index',
                                         'contacts',
                                         'about',
                                         'clients' => array('index',
                                                           'howto',
                                                           'register',
                                                           'faq'),
                                         'experts' => array('index',
                                                              'why',
                                                              'howto',
                                                              'register',
                                                              'faq')
                                         );
        
        function __construct()
        {
            if(!isset($_GET['act'])) $act = "index";
            else $act=$_GET['act'];
            $path = pathinfo($act);
            if($path["filename"] == "experts" || $path["filename"] == "clients")
            {
                $path['dirname'] = $path["filename"];
                $path['filename'] = "index";
            }
            if($this->isAvailablePage($path))
            {
                $controllerPath = FRONT_TPL.$path['dirname'].'/'.$path['filename'].'.php';
                $controllerName = $path['filename'];
                if(file_exists($controllerPath))
                {
                    include(FRONT_TPL."header.php");
                    include($controllerPath);
                    include(FRONT_TPL."footer.php");
                }
                else $this->error404();
            }
            else $this->error404();
        }
        
        function error404()
        {
            include(FRONT_TPL."header.php");
            include(FRONT_TPL."404.php");
            include(FRONT_TPL."footer.php");
        }
        
        function isAvailablePage($path)
        {
            
            if($path["dirname"] == ".")
            {
                reset($this->available_pages);
                if(in_array($path['filename'], $this->available_pages)) return true;
            }
            else if($path["dirname"] == "experts" || $path["dirname"] == "clients")
            {
                reset($this->available_pages);
                if(in_array($path['filename'], $this->available_pages[$path["dirname"]])) return true;
            }
            else return false;
        }
    }

    Небольшой роутинг

    varg242, 04 Июня 2013

    Комментарии (8)
  5. PHP / Говнокод #12819

    +153

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    <?php
    $g = $_GET;
    unset($g["search"], $g["sortby"], $g["time"], $g["page"]);
    $q_str = $_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"]."?".http_build_query($g);
    ?>
    <script type="text/javascript">
    		!function ($) {
    			$(document).ready(function () {
    		$("#search").keyup(function(e){
    				$("#search-button").attr("href", "//<?=$q_str?>" + "&search=" + $(this).val());
    				});
            }(window.jQuery);

    varg242, 28 Марта 2013

    Комментарии (0)
  6. PHP / Говнокод #12474

    +39

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    <?php
    set_time_limit(86400);
    $begin = new DateTime($_GET["min_date"]);
    $end = new DateTime($_GET["max_date"]);
    
    $begincp = clone $begin;
    $begincp_2 = clone $begin;
    
    $dt_diff = $begin->diff($end);
    $dt_diff = (int) $dt_diff->format("%a");
    
    for($i = 1; $i <= $dt_diff; $i++)
    {
        $begincp_2->modify("+1 day");  
       
        $q = mysql_query("SELECT * FROM `skud_stat` WHERE
                          `arrival` >= '".$begincp->getTimestamp()."' AND
                          `arrival` < '".$begincp_2->getTimestamp()."'
                           ORDER BY `name`");
        
        while($data = mysql_fetch_array($q))
        {
            $workers[$data["name"]][] = $data;
        }
        
        /* Сортировку */
        
        //uksort($workers, "strnatcasecmp");
        //ksort($workers);
        
       
        $coun = 0;
        
        $begincp->modify("+1 day");
    }
    
        /* быстрая сортировка */
        uksort($workers, "strnatcasecmp");
    ?>      
    
    <table class="table table-striped table-hover table-condensed skud-chart">
    	<thead></thead>
    	<tr>
    	  <th style="text-align: left">Имя</th>
    	  <?php
    	  $begin = new DateTime($_GET["min_date"]);
    	  $end = new DateTime($_GET["max_date"]);
    	  
    	  $bgcp = clone $begin;
    	  
    	  $dt_diff = $begin->diff($end);
    	  $dt_diff = (int) $dt_diff->format("%a");
    	  for($i = 1; $i <= $dt_diff; $i++)
    	  {
    	  ?>
    	  <th><?=date("d.m.Y", $bgcp->getTimestamp());?></th>
    	  <?php
    	  $bgcp->modify("+1 day");
    	  }
    	  ?>
    	</tr>
    	<?php
    	foreach($workers as $worker => $arr)
    	{
    	$begin_copy = clone $begin;
    	$begin_copy2 = clone $begin;	
    	?>
    	<tr>
    	  <td class="b"><?=$worker?></td>
    	<?php
    	for($i = 1; $i <= $dt_diff; $i++)
    	{
    	  $begin_copy2->modify("+1 day");
    	  foreach($arr as $day)
    	  {
    	    if($day["arrival"] > $begin_copy->getTimestamp() && $day["leaving"] < $begin_copy2->getTimestamp())
    	    {
    	    /* 28800 - рабочее время (8 часов)
    	       27000 - как погрешность (7 часов 30 минут)
    	    */
    	    ?>
    	    <td><?=date("H:i", $day["arrival"]);?> / <?=date("H:i", $day["leaving"]);?> / <?php if($day["worktime"] < 27000) { ?><b class="notenough"><?php } ?><?=date("H:i", $day["worktime"]);?><?php if($day["worktime"] < 21600) { ?></b><?php } ?></td>
    	    <?php
    	    $success_day = true;
    	    }
    	    else
    	    {
    	    ?>
    	    <!--<td>-</td>-->
    	    <?php
    	    }
    	  }
    	  if(!$success_day)
    	  {
    	  ?>
    	  <td class="naw">-</td>
    	  <?php
    	  }
    	  unset($success_day);
    	  //if($begin_copy->getTimestamp())

    Корпоративная Статистика (!). Читаю из базы и строю отчёт.

    varg242, 24 Января 2013

    Комментарии (2)
  7. PHP / Говнокод #12473

    +40

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    <?php
        if($_POST["phones_csv_load"]) {
            if(is_uploaded_file($_FILES["phones_csv"]["tmp_name"])) {
                if (($handle = fopen($_FILES["phones_csv"]["tmp_name"], "r")) !== FALSE) {
                    $linecount = (exec('perl -pe \'s/\r\n|\n|\r/\n/g\' ' . escapeshellarg($_FILES["phones_csv"]["tmp_name"]) . ' | wc -l')) - 1;
                    for($i = 0; $i <= $linecount; $i++) {
    		    $data = str_getcsv(iconv("cp1251", "utf8", stream_get_line($handle, 8000, "\n")), "\t");
    		    $datetime = explode(" ", $data[28]);
    		    $datetime["date"] = explode(".", $datetime[0]);
    		    $datetime["time"] = explode(":", $datetime[1]);
    		    $datetime["unix_time"] = mktime($datetime["time"][0], $datetime["time"][1], 0, $datetime["date"][1], $datetime["date"][0], "20".$datetime["date"][2]);
    		    $datetime["unix_time_ar"] = mktime($datetime["time"][0], $datetime["time"][1], 0, 0, 0, 0);
    		    $datetime["unix_day"] = mktime(0, 0, 0, $datetime["date"][1], $datetime["date"][0], "20".$datetime["date"][2]);
    		    sort($fullmassive[$datetime["unix_day"]][$data[20]][] = array($data[17]." ".$data[18], $datetime["unix_time"], $data[20], $datetime["unix_day"], $datetime["unix_time_ar"], "inout" => checkInOut($data[3]), md5($data[20]." ".$data[18].$datetime["unix_time"].$datetime["unix_time"]), date("d.m.Y H:i", $datetime["unix_time"]), date("H:i", $datetime["unix_time_ar"])), SORT_NATURAL);
                    }
    		foreach($fullmassive as $fullmassive_day) {
    		    foreach($fullmassive_day as $fullmassive_employee) {
    			usort($fullmassive_employee, 'invenDescSort');
    			$employee["uid"] = $fullmassive_employee[0][2];
    			$employee["in"] = $fullmassive_employee[0][1];
    			$employee["in_date"] = $fullmassive_employee[0][3];
    			$employee["in_time"] = $fullmassive_employee[0][4];
    			$employee["out"] = end($fullmassive_employee)[1];
    			$employee["out_date"] = mktime(0, 0, 0, date("n", end($fullmassive_employee)[1]), date("j", end($fullmassive_employee)[1]), date("Y", end($fullmassive_employee)[1]));
    			$employee["out_time"] = mktime(date("H", end($fullmassive_employee)[1]), date("i", end($fullmassive_employee)[1]), 0, 0, 0, 0);
    			$employee["name"] = $fullmassive_employee[0][0];
    			if($employee["in"] >= end($fullmassive_employee)[1]) $employee["in"] = mktime(10, 0, 0, date("n", $employee["in"]), date("j", $employee["in"]), date("Y", $employee["in"]));
    			else if(end($fullmassive_employee)[1] <= $employee["in"]) $employee["out"] = mktime(18, 0, 0, date("n", $employee["in"]), date("j", $employee["in"]), date("Y", $employee["in"]));
    			else
    			{
    			    if(mktime(date("H", $employee["in"]), 0, 0, 0, 0, 0) < mktime(12, 0, 0, 0, 0, 0)) {
    				$employee["out"] = mktime(18, 0, 0, date("n", $employee["in"]),	date("j", $employee["in"]), date("Y", $employee["in"]));
    			    }
    			    else {
    				$employee["in"] = mktime(10, 0, 0, date("n", $employee["in"]), date("j", $employee["in"]), date("Y", $employee["in"]));
    			    }
    			}
    			if($employee["in_time"] >= end($fullmassive_employee)[4]) $employee["in_time"] = mktime(10, 0, 0, date("n", $employee["in_time"]), date("j", $employee["in_time"]), date("Y", $employee["in_time"]));
    			else if(end($fullmassive_employee)[4] <= $employee["in_time"]) $employee["out_time"] = mktime(18, 0, 0, date("n", $employee["in_time"]), date("j", $employee["in_time"]), date("Y", $employee["in_time"]));
    			$employee["worktime"] = $employee["out"] - $employee["in"];
    			mysql_query("INSERT INTO `skud_stat` SET `name` = '".$employee["name"]."',
    								 `uid` = '".$employee["uid"]."',
    			    				         `arrival` = '".$employee["in"]."',
    								 `arrival_date` = '".$employee["in_date"]."',
    								 `arrival_time` = '".$employee["in_time"]."',
    								 `leaving` = '".$employee["out"]."',
    								 `leaving_date` = '".$employee["out_date"]."',
    								 `leaving_time` = '".$employee["out_time"]."',
    								 `worktime` = '".($employee["worktime"])."'");
    		    }
    		}
                    fclose($handle);
                }
            }
        }
        ?>

    Корпоративная Статистика (!). Читаю из CSV

    varg242, 24 Января 2013

    Комментарии (3)
  8. JavaScript / Говнокод #12307

    +153

    1. 1
    $("#datepicker1").datepicker("setDate", new Date((Math.round((new Date().getTime() / 1000)) - x2) * 1000));

    Из недавнего

    varg242, 18 Декабря 2012

    Комментарии (8)
  9. PHP / Говнокод #11790

    +40

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    Function DateDiff ($interval,$date1,$date2)
    {
        // получает количество секунд между двумя датами 
        $timedifference = $date2 - $date1;
    
        switch ($interval) {
            case 'w':
                $retval = bcdiv($timedifference,604800);
                break;
            case 'd':
                $retval = bcdiv($timedifference,86400);
                break;
            case 'h':
                $retval =bcdiv($timedifference,3600);
                break
            case 'n':
                $retval = bcdiv($timedifference,60);
                break;
            case 's':
                $retval = $timedifference;
                break;
                
        }
        return $retval;
    
    }

    Не моё, где-то на просторах интернета обнаружил.

    varg242, 18 Сентября 2012

    Комментарии (6)
  10. PHP / Говнокод #11788

    +46

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    $confs = array();
    
    		$q = new WP_Query(array('post_type' => 'conference',
    					'posts_per_page' => -1,
    					'meta_key' => 'cd-conference-date-start',
    					'orderby' => 'meta_value_num',
    					'order' => 'DESC'
    					));
    
    		while($q->have_posts()): $q->the_post();
    		$confs[date("Y", get_post_meta($post->ID, 'cd-conference-date-start', true))][] = array('conf_title' => get_the_title(),
    												      'conf_date_start' => get_post_meta($post->ID, 'cd-conference-date-start', true),
    												      'conf_date_end' => get_post_meta($post->ID, 'cd-conference-date-end', true),
    												      'conf_link' => get_permalink(),
    												      'conf_city' => get_post_meta($post->ID, 'cd-conference-city', true),
    												      'conf_icon' => get_the_post_thumbnail()
    												      );
    		endwhile;
    
    		wp_reset_postdata();

    WordPress. Глубже, чем вы себе можете представить.

    varg242, 17 Сентября 2012

    Комментарии (3)
  11. PHP / Говнокод #11669

    +53

    1. 1
    2. 2
    3. 3
    $post_slug = explode("/", trim($_SERVER["REQUEST_URI"], " /"));
    $the_query = new WP_Query(array("name" => $post_slug[1],
                                    "post_type" => "conference"));

    И снова WordPress!'

    URL вида http://somesite.ru/conference/pervaya-konferentsiya-anesteziologov/program/

    varg242, 29 Августа 2012

    Комментарии (5)