[URGENT] [PHP] Please help me unlocking files [Open Game Panel] [++Rep]
#1

Well there is a feature in light fm to lock and unlock server files for admins . Well the feature is quiet usefull but when someone who is not an admin want to change server version i have made addons to do that but the problem is people cant install the addon till the server file is locked . well i tried to hack my way through by setting all admins user admin in light fm module to trick the system to allow users to unlock the files so they can install the server version. well its not a good idea to set everyone admin on litefm it may lead to abuse by port change and slot changes etc. Well i want a way somehow while an addon is executed somehow to unlock the files. I tried find the exact thing that is unlocking the files i could find this but im not sure .

fm_dir.php

Code:
$chatAction = $_POST['secureButton'];
				if($chatAction == get_lang('chattr_yes')){
					$action = 'chattr+i';
				}else{
					$action = 'chattr-i';
				}
				$pathToFile = clean_path( $path . "/" . $_POST['secureFile'] );
				
				$remote->secure_path($action, $pathToFile);

Well curently i have made everyone admin on litfm by modifying



Well some might say its the worst idea but it servers my purpose people are able to unlock file and run the addon that rplaces the files but it oppens door for abuse .


Well ill just show u the exact problem :

see here the addon should replace the samp03svr file






But it wont work as the file is locked so is there any modification i can make to the php codes so the file is unlocked for few seconds when the user clicks on the install addon.





Sorry guys if im troubling you , i have limitations too im a c++ programmers , i dont understand php much my bad , still i managed to set everone admin so they can unlock the file before they install the plugin but still u know like i said it open door to abuse so is there any way the files could be only unlocked when people click install addon.
Reply
#2

Here are some files you may need thanx if you can help me

https://github.com/OpenGamePanel/Ope...modules/litefm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)