[insert_php]
$sql4=”SELECT * FROM sdrtbl_news order by news_date desc”;
$news = $link->get_results($sql4);
$cnt_news=0;
foreach ( $news as $new )
{
$title = str_replace(‘$’, “$ “, $new->news_title);
if($cnt_news==5){break;}
if($new->news_grp ==’1′){
$st_id=$new->stp_idx;
$sql4_D=”select * from sdrtbl_startups where stp_idx=$st_id and stp_cntry=$id”;
$logo = $link->get_row($sql4_D);
if($logo>0){
echo “
“;
echo ““;
if(empty( $logo->stp_logo)){
echo “ “;
}else{
echo “ news_link.'”target=_blank>’.$title.’‘;
echo “ |
“;
$cnt_news++;
}
}else if($new->news_grp ==’2′){
$pp_id=$new->pepl_idx;
$sql4_D=”select * from sdrtbl_people where pepl_idx=$pp_id”;
$logo = $link->get_row($sql4_D);
if($logo>0){
echo “
“;
if(empty($logo->pepl_pic)){
echo “ “;
}else{
echo “ news_link.'”target=_blank>’.$title.’‘;
echo “ |
“;
$cnt_news++;
}
}else if($new->news_grp ==’3′){
$iv_id=$new->invst_idx;
$sql4_D=”select * from sdrtbl_investor where invst_idx=$iv_id”;
$logo = $link->get_row($sql4_D);
if($logo>0){
echo “
“;
if(empty($logo->invst_logo)){
echo “ “;
}else{
echo “ news_link.'”target=_blank>’.$title.’‘;
echo “ |
“;
}else{
echo “
“;
echo $new->news_pblsh.’ –Interactive World Map
[insert_php]
$sql9 = ” SELECT * FROM country_rank order by sm desc limit 10″;
$results9 = $link->get_results($sql9);
$datas=”[‘Country’,’Startups’,’county_idx’]”;
foreach ( $results9 as $result9 )
{
$datas.=”,[‘”.$result9->value.”‘,”.$result9->cnt.”,”.$result9->stp_cntry.”]”;
}
[/insert_php]
[geoChart displaymode=”markers” width=”700px” height=”388px” colorstart=”#4db2ec” colorend=”#10a69f” ]
[insert_php]
echo $datas;
[/insert_php]
[/geoChart]
|
CATEGORIES
[insert_php]
//****************CATEGORY******************
$sql2=”SELECT cm.category1 ct1, cm.category2 ct2, cm.value vlu, count(*) cnt
FROM sdrtbl_category ct ,sdrtbl_common cm , sdrtbl_startups st
WHERE ct.grp=cm.grp
and ct.category1=cm.category1
and ct.category2=cm.category2
and ct.grp=1
and st.stp_cntry=$id
and ct.stp_idx=st.stp_idx
group by ct.category1, ct.category2
order by cnt desc LIMIT 10″;
$categories = $link->get_results($sql2);
$i=1;
foreach ( $categories as $category )
{
echo “
“.$i.” |
“;
echo “ct1.”&ct2=”.$category->ct2.”&ctry=”.$id.”>”.$category->vlu.”(“.$category->cnt.”) |
“;
$i++;
}
[/insert_php]
TOP COMPANIES
[insert_php]
//****************Top Company******************
$sql3=”SELECT stp_idx, stp_name
from sdrtbl_startups
where stp_point!=0
and stp_cntry=$id
order by stp_rank
limit 10″;
$companies = $link->get_results($sql3);
$i=1;
foreach ( $companies as $company )
{
echo “
“.$i.” |
“;
echo “stp_idx.”>”.$company->stp_name.” |
“;
$i++;
}
[/insert_php]
TOP COUNTRIES
TOP INVESTORS
[insert_php]
//****************Top INVESTORS******************
$sql5=”SELECT ivt.invst_idx iv_idx, invst_name, count(*) cnt
FROM sdrtbl_investment ivm, sdrtbl_investor ivt ,sdrtbl_startups st
where ivm.invst_idx=ivt.invst_idx
and ivt.invst_idx!=16
and ivm.stp_idx= st.stp_idx
and st.stp_cntry=$id
group by ivt.invst_idx
order by cnt desc
limit 10″;
$investors = $link->get_results($sql5);
$i=1;
foreach ( $investors as $investor )
{
echo “
“.$i.” |
“;
echo “iv_idx.”>”.$investor->invst_name.” |
“;
$i++;
}
[/insert_php]
|