<?php



$count_company = 15; //最新15条
$text_company = '';
$result = @mysql_query('SELECT username,company,sign FROM '.$sql['pref'].''.$sql['data']['承载成员档案的表名'].' WHERE check_reg="0" AND company<>"" ORDER BY id DESC LIMIT '.$count_company.'', $db);
if (@mysql_num_rows($result) > 0) {
  if (!function_exists('cutstr')) {
    require ('inc/function/cutstr.php');
  }
  while ($row_company = @mysql_fetch_assoc($result)) {
    /*
    $text_company .= ($row_company['sign'] != '' && preg_match('/^https?:\/\/.+/i', $row_company['sign'])) ?
'<a href="user.php?get=card&username='.urlencode($row_company['username']).'" title="浏览商号名片" target="_blank"><img src="inc/images/card.gif" /></a> <a href="'.$row_company['sign'].'" target="_blank" title="浏览商号网址">'.cutstr($row_company['company'], 45).'</a><br />'
:
'<a href="user.php?get=card&username='.urlencode($row_company['username']).'" title="浏览商号名片" target="_blank"><img src="inc/images/card.gif" /> '.cutstr($row_company['company'], 45).'</a><br />';
    */

    $text_company .= '<li><a href="user.php?get=company&username='.urlencode($row_company['username']).'" target="_blank">'.cutstr($row_company['company'], 45).'</a></li> ';
    unset($row_company);
  }
}
@mysql_free_result($result);

if (!empty($text_company)) {
  write_file('inc/require/company_update.txt', '<div class="side">
  <div class="title"><a href="list_company.php" class="more">更多&gt;&gt;</a>新录商号</div>
   <ul class="text">'.$text_company.'</ul></div>');
}
unset($text_company, $count_company);


?>