예제 #1
0
파일: system.php 프로젝트: houweifeng/sbase
                $selectoption .= "<option value='" . $perm_id . "'>";
                $selectoption .= $_perm['permission_name'] . "</option>";
            }
        }
        if ($selectoption) {
            $user_perm_select .= $selectoption . "</SELECT>";
        } else {
            $user_perm_select = '';
        }
        if ($perm_list) {
            $user_perm_list .= $perm_list;
        } else {
            $user_perm_list = '';
        }
        $user_permission = $user_perm_list . " " . $user_perm_select;
        $arr[$user_id] = array('user_id' => jsescape($_user['user_id']), 'user_name' => jsescape($_user['user_name']), 'user_desc' => jsescape($_user['user_desc']), 'user_perm' => jsescape($user_permission), 'user_admin' => jsescape($user_admin));
    }
}
$string = "<script language='JavaScript'>\n";
$string .= " var DataListArray = new Array();\n";
foreach ($arr as $UID => $USER) {
    $string .= "  DataListArray['" . $UID . "'] = '" . implode(',', $USER) . "';\n";
}
$string .= "DataInit(DataListArray,'content','pagesplit',10,20," . count($title) . ");\n";
$string .= "</script>\n";
echo "<div id='content' valign='top' ></div>\n";
echo "<div id='pagesplit' valign='top' ></div><br>\n";
echo $string;
unset($string);
/****************************************user management ******************************************/
/****************************************user UPDATE form******************************************/
예제 #2
0
	var diff=roundNumber(totals-pago,2);

	if(pago<totals){
		id=idsfpa.toString();

		html = "<tr id='sfpa_"+id+"'>";
		html+= <?php 
echo str_replace('ttarjeta_0', 'ttarjeta_\'+id+\'', jsescape('<td>' . form_dropdown('ttarjeta_0', $ssfpa, '', 'class="ui-widget-content ui-corner-all"') . '</td>'));
?>
;
		html+= "<td align='right'><input type='text' name='tarjeta_"+id+"' id='tarjeta_"+id+"' style='text-align: right;' size=15 class='ui-widget-content ui-corner-all' value='"+diff.toString()+"' autocomplete='off'></td>";
		html+= "<td><span id='delete-sfpa' class='ui-icon ui-icon-closethick' onclick='delsfpa("+id+")'></span></td>";
		html+= "</tr>";
		html+= "<tr id='sfpa_tbanc_"+id+"'>";
		html+= <?php 
echo str_replace('tbanc_0', 'tbanc_\'+id+\'', jsescape('<td>' . form_dropdown('tbanc_0', $tban, '', 'class="ui-widget-content ui-corner-all" style="width:195px;"') . '</td>'));
?>
;
		html+= "<td><input type='text' name='tnum_"+id+"' id='tnum_"+id+"' size=10 class='ui-widget-content ui-corner-all' value='' autocomplete='off'></td>";
		html+= "<td></td>";
		html+= "</tr>";

		$("#_itsfpa").before(html);
		$('input[name^="tarjeta_'+id+'"]').focusout(function() { addsfpa(); });
		$('input[name^="tarjeta_'+id+'"]').numeric(".");
		$('input[name^="tarjeta_'+id+'"]').keyup(function(event) { porpagar(this,event); });
		$('input[name^="tarjeta_'+id+'"]').focus();
		idsfpa+=1;
	}
}
예제 #3
0
                $selectoption .= "<option value='" . $perm_id . "'>";
                $selectoption .= $_perm['permission_name'] . "</option>";
            }
        }
        if ($selectoption) {
            $user_perm_select .= $selectoption . "</SELECT>";
        } else {
            $user_perm_select = '';
        }
        if ($perm_list) {
            $user_perm_list .= $perm_list;
        } else {
            $user_perm_list = '';
        }
        $user_permission = $user_perm_list . " " . $user_perm_select;
        $arr[$user_id] = array('user_name' => jsescape($_user['user_name']), 'user_desc' => jsescape($_user['user_desc']), 'user_status' => jsescape('可用'), 'user_admin' => jsescape($user_admin));
    }
}
$string = "<script language='JavaScript'>\n";
$string .= " var DataListArray = new Array();\n";
foreach ($arr as $UID => $USER) {
    $string .= "  DataListArray['" . $UID . "'] = '" . implode(',', $USER) . "';\n";
}
$string .= "DataInit(DataListArray,'content','pagesplit',10,20," . count($title) . ");\n";
$string .= "</script>\n";
echo "<div id='content' valign='top' ></div>\n";
echo "<div id='pagesplit' valign='top' ></div><br>\n";
echo $string;
unset($string);
/****************************************user management ******************************************/
/****************************************user UPDATE form******************************************/
예제 #4
0
파일: stats.php 프로젝트: houweifeng/sbase
             }
         }
     }
 }
 //total stats
 if ($view_type == 'total') {
     $arr = array();
     $data = $obj->get_client_total($date);
     foreach ($client_day_feilds as $ktitle => $vfeild) {
         $arr['title'][$vfeild] = '^' . jsescape($ktitle);
     }
     if (is_array($data)) {
         for ($i = 0; $i < count($data); $i++) {
             $client = $data[$i]['ClientID'];
             foreach ($client_day_feilds as $ktitle => $vfeild) {
                 $arr[$client][$vfeild] = jsescape($data[$i][$vfeild]);
             }
         }
     }
 }
 $string = "<script language='JavaScript'>\n";
 $string .= " var DataListArray = new Array();\n";
 //html array
 foreach ($arr as $KID => $VARR) {
     $string .= " DataListArray['" . $KID . "'] = '" . implode(',', $VARR) . "';\n";
 }
 $string .= "DataInit(DataListArray,'content',";
 $string .= "'pagesplit',10,20," . count($arr['title']) . ");\n";
 $string .= "</script>\n";
 echo "<div id='content' valign='top' ></div>\n";
 echo "<div id='pagesplit' valign='top' ></div><br>\n";
예제 #5
0
파일: query.php 프로젝트: houweifeng/sbase
     $company_feilds_list = array('INFOID' => '公司ID', 'PRODUCTCNAME' => '公司中文名称', 'PRODUCTENAME' => '公司英文名称', 'URL' => 'URL');
     $data = $objstore->find_company($keyword);
     foreach ($company_feilds_list as $k => $v) {
         $arr['title'][$k] = '^' . jsescape($v);
     }
     if (is_array($data)) {
         for ($i = 0; $i < count($data); $i++) {
             $id = $data[$i]['INFOID'];
             $surl = $data[$i]['URL'];
             foreach ($company_feilds_list as $k => $v) {
                 if ($k == 'INFOID') {
                     $arr[$id][$k] = "^" . jsescape($data[$i][$k]);
                 } else {
                     $link = "<a href='query.php?op=view_info";
                     $link .= "&companyid={$v}&url={$surl}'>" . $data[$i][$k] . "</a>";
                     $arr[$id][$k] = jsescape($link);
                 }
             }
         }
     }
 }
 $string = "<script language='JavaScript'>\n";
 $string .= " var DataListArray = new Array();\n";
 //html array
 foreach ($arr as $KID => $VARR) {
     $string .= " DataListArray['" . $KID . "'] = '" . implode(',', $VARR) . "';\n";
 }
 $string .= "DataInit(DataListArray,'content',";
 $string .= "'pagesplit',10,20," . count($arr['title']) . ");\n";
 $string .= "</script>\n";
 echo "<div id='content' valign='top' ></div>\n";