PHP to ASP.Net conversion -
i converting old php porject on asp.net (vb) , wondered if point me in right direction in order convert final snippet of code.
there 3 functions called within , ahve converted , honest session arrays giving me headache.
i have thought using hashtables , direccasting confusing me further.
any apreciated.
$response = array(); $messages = array(); if (!empty($_post['cbox'])) { if (!empty($_session['opsd_user_'.$_post['cbox']])) { $messages = $_session['opsd_user_'.$_post['cbox']]; } } else { if (!empty($_post['blist']) && $_post['blist'] == 1) { getblist(); } if (!empty($_post['initialize']) && $_post['initialize'] == 1) { getstatus(); if (!empty($_session['opsd_sessionvars'])) { $response['initialize'] = $_session['opsd_sessionvars']; if (!empty($_session['opsd_sessionvars']['opencbid']) && !empty($_session['opsd_user_'.$_session['opsd_sessionvars']['opencbid']])) { $messages = array_merge($messages,$_session['opsd_user_'.$_session['opsd_sessionvars']['opencbid']]); } } } else { if (empty($_session['opsd_sessionvars'])) { $_session['opsd_sessionvars'] = array(); } if (!empty($_post['sessionvars'])) { ksort($_post['sessionvars']); } else { $_post['sessionvars'] = ''; } if (!empty($_post['updatesession']) && $_post['updatesession'] == 1) { $_session['opsd_sessionvars'] = $_post['sessionvars']; } if ($_session['opsd_sessionvars'] != $_post['sessionvars']) { $response['updatesession'] = $_session['opsd_sessionvars']; } } getlasttimestamp(); fetchmessages(); }
i think you're looking session , request.form properties of asp.net page. simple find/replace of $_session session in page should work wonders, should replacement of $_post request.form.
Comments
Post a Comment