Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F2114857
addreview_direct.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Nov 18, 4:59 PM
Size
8 KB
Mime Type
text/x-php
Expires
Fri, Nov 20, 4:59 PM (40 m, 53 s)
Engine
blob
Format
Raw Data
Handle
988422
Attached To
rINP In-Portal
addreview_direct.php
View Options
<?php
##############################################################
##In-portal ##
##############################################################
## In-portal ##
## Intechnic Corporation ##
## All Rights Reserved, 1998-2002 ##
## ##
## No portion of this code may be copied, reproduced or ##
## otherwise redistributed without proper written ##
## consent of Intechnic Corporation. Violation will ##
## result in revocation of the license and support ##
## privileges along maximum prosecution allowed by law. ##
##############################################################
// new startup: begin
define
(
'REL_PATH'
,
'admin'
);
$relation_level
=
count
(
explode
(
'/'
,
REL_PATH
)
);
define
(
'FULL_PATH'
,
realpath
(
dirname
(
__FILE__
)
.
str_repeat
(
'/..'
,
$relation_level
)
)
);
require_once
FULL_PATH
.
'/kernel/startup.php'
;
// new startup: end
$pathtolocal
=
$pathtoroot
.
"kernel/"
;
require_once
(
$pathtoroot
.
$admin
.
"/include/elements.php"
);
require_once
(
$pathtoroot
.
"kernel/admin/include/navmenu.php"
);
require_once
(
$pathtoroot
.
$admin
.
"/browse/toolbar.php"
);
require_once
(
$pathtoroot
.
$admin
.
"/listview/listview.php"
);
//Multiedit init
$en
=
(
int
)
GetVar
(
'en'
);
$ids
=
GetVar
(
'reviewlist'
);
$objEditItems
=
new
clsItemReviewList
();
$objEditItems
->
CopyToEditTable
(
null
,
$ids
);
$objEditItems
->
SetTable
(
'edit'
);
if
(
$ids
)
{
$ReviewId
=
is_array
(
$ids
)?
array_shift
(
$ids
):
$ids
;
$Rev
=
$objEditItems
->
GetItem
(
$ReviewId
);
$action
=
'm_review_direct_edit'
;
}
$envar
=
"env="
.
BuildEnv
()
.
"&en=$en"
;
/*$m = GetModuleArray();
foreach($m as $key => $value)
{
$path = $pathtoroot.$value."admin/include/parser.php";
if( file_exists($path) ) include_once($path);
}
$module_info=$objModules->ExecuteFunction('GetModuleInfo','review_section');
$section = $module_info[$Rev->Get('Module')]; */
$section
=
'in-portal:editreview_direct'
;
$ado
=
&
GetADODBConnection
();
/**
* Returns username by user id specified
*
* @param int $user_id
* @return string
* @access public
*/
function
getUsernameByID
(
$user_id
)
{
global
$objUsers
;
if
(!(
$user_id
>
0
)
||
!
$user_id
)
return
'root'
;
$u
=
$objUsers
->
GetUser
(
$user_id
);
return
$u
->
Get
(
'Login'
);
}
$user_id
=
is_numeric
(
$Rev
->
Get
(
"CreatedById"
))?
$Rev
->
Get
(
'CreatedById'
):
$objSession
->
Get
(
'PortalUserId'
);
$login_name
=
getUsernameByID
(
$user_id
);
$title
=
GetTitle
(
'la_text_Review'
,
'la_tab_General'
,
$Rev
->
UniqueId
());
$objListToolBar
=
new
clsToolBar
();
$objListToolBar
->
Add
(
"img_save"
,
"la_Save"
,
"#"
,
"swap('img_save','toolbar/tool_select_f2.gif');"
,
"swap('img_save', 'toolbar/tool_select.gif');"
,
"edit_submit('review','ReviewEditStatus','admin/reviews.php',1);"
,
$imagesURL
.
"/toolbar/tool_select.gif"
);
$objListToolBar
->
Add
(
"img_cancel"
,
"la_Cancel"
,
"#"
,
"swap('img_cancel','toolbar/tool_cancel_f2.gif');"
,
"swap('img_cancel', 'toolbar/tool_cancel.gif');"
,
"edit_submit('review','ReviewEditStatus','admin/reviews.php',-1);"
,
$imagesURL
.
"/toolbar/tool_cancel.gif"
);
int_header
(
$objListToolBar
,
NULL
,
$title
);
if
(
$objSession
->
GetVariable
(
"HasChanges"
)
==
1
)
{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php
int_hint_red
(
admin_language
(
"la_Warning_Save_Item"
));
?>
</td>
</tr>
</table>
<?php
}
?>
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<FORM ID="review" NAME="review" method="POST" ACTION="">
<?php
int_subsection_title
(
"Review"
);
?>
<tr
<?php
int_table_color
();
?>
>
<td valign="top" colspan="3">
<?php
echo
prompt_language
(
"la_prompt_Enable_HTML"
);
?>
<input type="checkbox" ID="html_enable" tabindex="1" name="html_enable" value="1"
<?php
if
(
$Rev
->
Get
(
"TextFormat"
)==
1
)
echo
"CHECKED"
;
?>
>
<br>
<?php
int_hint
(
prompt_language
(
"la_Warning_Enable_HTML"
));
?>
</td>
</tr>
<tr
<?php
int_table_color
();
?>
>
<td valign="top"><span class="text">
<?php
echo
prompt_language
(
"la_prompt_ReviewId"
);
?>
</span></td>
<td>
<span class="text">
<?php
echo
$Rev
->
Get
(
"ReviewId"
);
?>
</span>
</td>
<td><span class="text"> </span></td>
</tr>
<tr
<?php
int_table_color
();
?>
>
<td valign="top"><span class="text" id="prompt_createdby">
<?php
echo
prompt_language
(
"la_prompt_CreatedBy"
);
?>
</span></td>
<td>
<span class="text">
<input type="text" tabindex="1" ValidationType="exists" name="createdby" class="text" size="40" value="
<?php
echo
inp_textarea_unescape
(
$login_name
);
?>
">
<a href="#">
<img src="
<?php
echo
$imagesURL
;
?>
/icon24_link_user.gif" style="cursor:hand" border="0"
ONCLICK="OpenUserSelector('','','
<?php
echo
$envar
;
?>
&Selector=radio&destform=review&destfield=createdby&IdField=Login');">
</a>
</span>
</td>
<td><span class="text"> </span></td>
</tr>
<tr
<?php
int_table_color
();
?>
>
<td valign="top"><SPAN id="prompt_review_body" class="text">
<?php
echo
prompt_language
(
"la_prompt_ReviewText"
);
?>
</SPAN><br>
<a href="#">
<img src="
<?php
echo
$imagesURL
;
?>
/icon24_link_editor.gif" style="cursor:hand" border="0"
ONCLICK="document.getElementById('html_enable').checked = true; OpenEditor('§ion=
<?php
echo
$section
;
?>
','link','review_body');">
</a>
</td>
<td>
<textarea rows="8" tabindex="2" ValidationType="exists" name="review_body" id="review_body" cols="70" class="text">
<?php
echo
inp_textarea_unescape
(
inp_htmlize
(
$Rev
->
parsetag
(
"review_text"
)));
?>
</textarea>
</td>
<td></td>
</tr>
<?php
int_subsection_title
(
"General"
);
?>
<tr
<?php
int_table_color
();
?>
>
<td valign="top" class="text">
<?php
echo
prompt_language
(
"la_prompt_Status"
);
?>
</td>
<td>
<input type="radio" tabindex="3" name="status" class="text" value="1"
<?php
if
(
$Rev
->
Get
(
"Status"
)
==
1
)
echo
"checked"
;
?>
>
<?php
echo
prompt_language
(
"la_val_Active"
);
?>
<input type="radio" tabindex="3" name="status" class="text" value="2"
<?php
if
(
$Rev
->
Get
(
"Status"
)
==
2
)
echo
"checked"
;
?>
>
<?php
echo
prompt_language
(
"la_val_Pending"
);
?>
<input type="radio" tabindex="3" name="status" class="text" value="0"
<?php
if
(
$Rev
->
Get
(
"Status"
)
==
0
)
echo
"checked"
;
?>
>
<?php
echo
prompt_language
(
"la_val_Disabled"
);
?>
</td>
<td class="text"> </td>
</tr>
<tr
<?php
int_table_color
();
?>
>
<td valign="top" class="text">
<?php
echo
prompt_language
(
"la_prompt_Priority"
);
?>
</td>
<td>
<input type="text" tabindex="4" name="review_priority" class="text" size="3" value="
<?php
echo
$Rev
->
Get
(
"Priority"
);
?>
">
</td>
<td class="text"> </td>
</tr>
<tr
<?php
int_table_color
();
?>
>
<td valign="top"><SPAN ID="prompt_review_date" class="text">
<?php
echo
prompt_language
(
"la_prompt_CreatedOn"
);
?>
</SPAN></td>
<td>
<input type="text" name="review_date" tabindex="5" id="review_date_id" datepickerIcon="
<?php
echo
$adminURL
;
?>
/images/ddarrow.gif" class="text" size="20" value="
<?php
echo
$Rev
->
parsetag
(
"review_created_date"
);
?>
">
<span class="small">
<?php
echo
prompt_language
(
"la_prompt_DateFormat"
);
?>
</span></td>
<td></td>
</tr>
<tr
<?php
int_table_color
();
?>
>
<td valign="top"><SPAN id="prompt_review_time" class="text">
<?php
echo
prompt_language
(
"la_prompt_CreatedOn_Time"
);
?>
</SPAN></td>
<td>
<input type="text" tabindex="6" name="review_time" class="text" size="20" value="
<?php
echo
$Rev
->
parsetag
(
"review_created_time"
);
?>
">
<span class="small">
<?php
echo
prompt_language
(
"la_prompt_TimeFormat"
);
?>
</span></td>
<td></td>
</tr>
<INPUT TYPE="hidden" NAME="CreatedById" value = "
<?php
echo
$Rev
->
Get
(
"CreatedById"
);
?>
">
<input type="hidden" name="ReviewId" value ="
<?php
echo
$Rev
->
Get
(
"ReviewId"
);
?>
">
<input type="hidden" name="ItemId" value ="
<?php
echo
$Rev
->
Get
(
"ItemId"
);
?>
">
<input type="hidden" name="ItemType" value ="
<?php
echo
$Rev
->
Get
(
"ItemType"
);
?>
">
<input type="hidden" name="Action" value="
<?php
echo
$action
;
?>
">
<input type="hidden" name="ReviewEditStatus" VALUE="0">
</FORM>
</TABLE>
<FORM NAME="save_edit_buttons" ID="save_edit_buttons" method="POST" ACTION="">
<input type=hidden NAME="Action" VALUE="save_cat_edit">
<input type="hidden" name="ReviewEditStatus" VALUE="0">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="
<?php
echo
$_SERVER
[
"PHP_SELF"
].
"?"
.
$envar
;
?>
" name="viewmenu">
<input type="hidden" name="fieldname" value="">
<input type="hidden" name="varvalue" value="">
<input type="hidden" name="varvalue2" value="">
<input type="hidden" name="Action" value="">
</form>
<script src="
<?php
echo
$adminURL
;
?>
/include/calendar.js"></script>
<SCRIPT language="JavaScript">
initCalendar("review_date_id", CalDateFormat);
MarkAsRequired(document.getElementById("review"));
</SCRIPT>
<!-- END CODE-->
<?php
int_footer
();
?>
Event Timeline
Log In to Comment