commit
799a1b9539
@ -0,0 +1,29 @@ |
||||
<?php |
||||
|
||||
// Init owncloud |
||||
require_once('../../lib/base.php'); |
||||
|
||||
// We send json data |
||||
header( "Content-Type: application/jsonrequest" ); |
||||
|
||||
// Check if we are a user |
||||
if( !OC_USER::isLoggedIn()){ |
||||
echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); |
||||
exit(); |
||||
} |
||||
|
||||
// Get the params |
||||
$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; |
||||
$foldername = isset( $_GET['foldername'] ) ? $_GET['foldername'] : ''; |
||||
|
||||
if($foldername == '') { |
||||
echo json_encode( array( "status" => "error", "data" => array( "message" => "Empty Foldername" ))); |
||||
exit(); |
||||
} |
||||
error_log('try to create ' . $foldername . ' in ' . $dir); |
||||
if(OC_FILES::newFile($dir, $foldername, 'dir')) { |
||||
echo json_encode( array( "status" => "success", "data" => array())); |
||||
exit(); |
||||
} |
||||
|
||||
echo json_encode( array( "status" => "error", "data" => array( "message" => "Error when creating the folder" ))); |
@ -1,10 +1,18 @@ |
||||
|
||||
<h1>Questions and Answers</h1> |
||||
|
||||
<table cellspacing="0"> |
||||
<tbody> |
||||
<?php foreach($_["kbe"] as $kb): ?> |
||||
<tr> |
||||
<td width="1"><?php if($kb["preview1"] <> "") { echo('<a href="'.OC_HELPER::linkTo( "help", "index.php" ).'?id='.$kb['id'].'"><img class="preview" border="0" src="'.$kb["preview1"].'" /></a>'); } ?> </a></td>
|
||||
<td class="name"><a href="<?php echo(OC_HELPER::linkTo( "help", "index.php" ).'?id='.$kb['id']); ?>" title=""><?php echo $kb["name"]; ?></a><br /><?php echo('<span class="type">'.$kb['description'].'</span>'); ?></td>
|
||||
<td width="1"><?php if($kb["preview1"] <> "") { echo('<img class="preview" border="0" src="'.$kb["preview1"].'" />'); } ?> </a></td>
|
||||
<td class="name"><?php echo $kb["name"]; ?><br /><?php echo('<span class="type">'.$kb['description'].'</span>'); ?><br />
|
||||
<?php if($kb['answer']<>'') echo('<br /><span class="type"><b>Answer:</b></span><br /><span class="type">'.$kb['answer'].'</span>');?> |
||||
</td> |
||||
</tr> |
||||
<?php endforeach; ?> |
||||
</tbody> |
||||
</table> |
||||
<span class="button"><a target="_blank" href="http://apps.owncloud.com/knowledgebase/editquestion.php?action=new">ASK A QUESTION</a></span> |
||||
|
||||
|
||||
|
Loading…
Reference in new issue