<div class="black_block clr_or ssm">
<?php 
$tmp_type = "";
$row['desk'] = stripslashes($row['desk']);
if (strpos($row['desk'], '>Каталог: ') === false){
	$tmp_type = "";
}else{
	$tmp_type = substr($row['desk'], strpos($row['desk'], ">Каталог: "));
	$tmp_type = substr($tmp_type, 10, strpos($tmp_type, "</p>") - 11);
}
$tmp_max = 1;
$tmp_value = '<option value=' . $tmp_max . '>В блокноте (WSH)</option>';
$tmp_path = wshrun($tmp_max, "notepad.exe " . $tmp_type . "/" . $row['name']);
if(mysql_num_rows(mysql_query("select p_tag, word_id from tblTag_131 where p_tag=9 and word_id= " . $_GET['u']))){
	$tmp_max++;
	$tmp_value .= '<option value=' . $tmp_max . '>DllRegisterServer (WSH)</option>';
	$tmp_path .= wshrun($tmp_max, "regsvr32.exe " . $tmp_type . "/" . $row['name']);
}
if(mysql_num_rows(mysql_query("select p_tag, word_id from tblTag_131 where p_tag=10 and word_id= " . $_GET['u']))){
	$tmp_max++;
	$tmp_value .= '<option value=' . $tmp_max . '>DllUnRegisterServer (WSH)</option>';
	$tmp_path .= wshrun($tmp_max, "regsvr32.exe " . $tmp_type . "/" . $row['name'] . " /u");
}
if(mysql_num_rows(mysql_query("select p_tag, word_id from tblTag_131 where p_tag=11 and word_id= " . $_GET['u']))){
	$tmp_max++;
	$tmp_value .= '<option value=' . $tmp_max . '>DllInstall (WSH)</option>';
	$tmp_path .= wshrun($tmp_max, "regsvr32.exe " . $tmp_type . "/" . $row['name'] . " /i");
}


?>
<select class="cinline" id="pr_pn" onchange="faddon(document.getElementById('pr_pn').value, <?php echo $tmp_max; ?>);">
<?php echo $tmp_value; ?>
</select>
&nbsp;<?php if (is_dir("./img/bd/scr/" . $_GET['p'] . "/" . $_GET['u'])){echo "<a class='a_black2' href='./img/bd/scr/" . $_GET['p'] . "/" . $_GET['u'] . "/script.tar.gz'>Скачать все сценарии</a>";}else{echo "Сценарии с использованием данной записи";} ?>
</div>
<?php echo $tmp_path; ?>