Files
crm.e5.pl/modules/EcmProducts/getDescWithEnter.php

14 lines
682 B
PHP
Raw Normal View History

2024-04-27 09:23:34 +02:00
<?php
$w=$GLOBALS['db']->query("select long_description,ecmproduct_id from ecmproduct_language where language='en' and deleted='0'");
while($r=$GLOBALS['db']->fetchByAssoc($w)){
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select id,code,name,product_active,status from ecmproducts where id='".$r['ecmproduct_id']."'"));
$s=str_replace("&lt;","<",$r['long_description']);
$s=str_replace("&gt;",">",$s);
$p=explode("<p>",$s);
$p=explode("</p>",$p[1]);
$p=$p[0];
if(eregi("
",$p) && $rr['product_active'] && $rr['status']!="end_of_line")echo '<a href="index.php?module=EcmProducts&action=EditView&record='.$rr['id'].'">'.$rr['code']." ".$rr['name']."</a><br>";
}
?>