Files
crm.twinpol.com/modules/EcmProductB2Bs/getDescWithEnter.php

14 lines
685 B
PHP
Raw Normal View History

2025-05-12 15:44:39 +00: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=EcmProductB2Bs&action=EditView&record='.$rr['id'].'">'.$rr['code']." ".$rr['name']."</a><br>";
}
?>